Anduin Xue

let today = new Beginning();

Featured Posts


UWP 一个技术上成功但商业上失败的框架之死;一个现代的操作系统究竟应该提供什么?

2023年初,我习惯性的打开UWP的Mail app,来收发一下日常Email。但是,令我遗憾的是,它已经建议我尝试新版Mail App了。 不出我所料,新的Windows自带的Mail app是网页套壳的,而不是UWP。这意味着微软自从VSCode和Teams的成功之后,在网页套壳的道路上越走越远。以至于将网页套壳的魔爪继续伸向Outlook。 我曾经在Windows 10发布之初,盼望着会有一天用上 UWP 的 Visual Studio,谁知等了数年,却用上了 exe 的 MSEdge 和 网页套壳的 Mail。 UWP 这个本是 Windows 最后一次技术上的变革已经宣告失败。但,我想在念它的悼词之前,或许还可以回顾这个框架的一生。它诞生时的野心、困难、逆天的技术变革、解决了大量的问题、新的平台等。 UWP 本是优秀的框架 如果一定要让我总结一下 UWP,我想最好的说法就是:成功 …

C# Microsoft Windows Microsoft Store UWP

Install your own NFS ESXI storage server

Why Recently I was building a VMware ESXI cluster, aka Vsphere. We all know that Vsphere clusters require separate storage so that ESXI hosts can migrate virtual machines between multiple hosts. There are professional solutions like Dell PowerStore. However, those machines are really really expensive. I guess about 20,000 USD. So how can we get a similar solution as an ESXI storage server with  …

Linux Storage NFS VMware ESXI Vsphere Dell IPMI Debian Server

Install Nextcloud on a Ubuntu 20.04\22.04 server

Step 1 - Buy a server and basic configuration You can buy a pure server at Vultr. After you installing a pure Ubuntu, or buying a new cloud Ubuntu server, you need to first finish the basic authentication configuration. Follow instructions here to: Delete other accounts. Create your own account instead of root. Disable password login and force to use SSH key to log in. Disable root account.  …

Web Linux Ubuntu IT Apache2 PHP MySQL Certbot Nextcloud Storage

Install Windows 11 on Vultr cloud machine

In this blog, I gonna draft a solution for you to install any Windows OS on the Vultr cloud server.   Before starting Before starting, there are several points about why I choose Vultr and why you need to build a Windows 11 image on Vultr. Vultr is cheap Compared with other cloud service providers, Vultr is cheap. A 4GB RAM, 80GB SSD machine, costs about 24USD per month. While other platforms  …

PowerShell Windows Server Cloud Windows Windows 11 DISM Bcdedit Vultr Cloud PC

Validate an object in any C# projects

Sometimes, we need to check if the input is valid. Usually, we may do this: if (string.IsNullOrWhiteSpace(InputArgument.TargetMachine) || string.IsNullOrWhiteSpace(InputArgument.PatchId)) { throw new ArgumentException($"Invalid input argument! Patch ID: '{InputArgument.PatchId}', Target Machine: '{InputArgument.TargetMachine}'!");  …

ASP.NET Core C# .NET Validation

Install Windows 11 side-by-side without a USB drive

This tutorial only for existing Windows users which needs to install the second Windows along-side it without USB disk or CD. How When you have the Windows installer, you can directly unzip the install.wim to a new partition. This process does not need to restart or enter the PE environment, so no USB storage disk nor CD is required.   After the decompression is complete, directly boot the new  …

Windows 10 PowerShell Windows Windows 11 Install DISM Bcdedit Boot BCD

FFmpeg 用法概览

背景 最近买了个4K,144Hz的 HDR 显示器。新的显示器很不错,于是我想先进行测试一下。 于是我下载了非常多 4K 视频,准备观赏观赏。但是很快发现,怎么得到最优质的播放体验还是一个深坑。而衡量视频质量,除了看分辨率,还要看编码格式,码率,色彩,HDR等信息。 显然,现在折腾视频,最方便的工具就是 ffmpeg 了。FFmpeg 是一个开放源代码的自由软件,可以执行音频和视频多种格式的录影、转换、串流功能,非常适合快速、批量的修改视频。 开始之前 安装ffmpeg ffmpeg 的最新版下载地址始终都是: https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z 直接将其下载,解压,放到一个地方,将 exe 文件所在路径加入环境变量 PATH 即可。 了解视频的编码格式 开始之前,需要先了解平时经常使用的编码格式和平台支持情况,以及什 …

bash FFmpeg

C# run tasks in a threads pool with fixed size

Imagine I have 100 tasks to run. But my machine has only 16 core. So I expect that every core will run one task in parallel. And once a core is idle, assign a new task to it. That will be very easy for C# with Task. But before starting, we gonna create a thread-safe queue for saving our tasks. public class SafeQueue<T> { private readonly Queue<T> queue = new Queue&  …

C# Async Task Multi-Threading


Best-practice for authentication after creating a new Linux server

This article helps you change the following items if your cloud provider didn't do that for you. Create your own account instead of root. Disable password login and force to use SSH key to log in. Disable root account. Enable sudo without password. Before starting the process, make sure you have a valid SSH key-pair locally. Fist, connect to the server. (With root password). you@local  …

bash Linux Ubuntu SSH

微信的架构是如何实现分布式消息分发?

我们每天的生活都离不开微信。微信基本上已经成了在中国生活的一部分。 但是,微信有些方面的功能总是看起来令人觉得有些奇怪。例如: 微信几乎是第一款需要手机扫码才能登录PC端的 微信群和微信聊天记录在切换设备后会完全无法同步 你无法得知自己是否被一个微信好友拉黑了 你不能同时在多个移动设备上同时登录微信 从产品的角度来看,这些设定看起来彷佛是在给用户制造障碍,也成了大家普遍对微信的槽点。那么,微信的团队为什么要这么设计,而为什么又不改良它的体验呢?我想或许问题并不只是产品和需求分析这么简单,而是还需要进一步探寻架构上的本质。 在我生活在澳大利亚期间,我发现一件很有趣的事情:在澳大利亚,我使用微信给同样在澳大利亚的好友发送微信消息,他也可以几乎瞬间收到。假想微信在国内建立单点的服务器,那么这种性能一定不足以支撑澳大利亚内的通信。数据从澳洲抵达中国再从中国推送到澳洲至少需要500ms。而表现来看 …

Web WeChat Distributed Messging IM

EF second layer cache to enhance your SQL database performance based on Redis

Entity-Framework Core is a lightweight, extensible, open-source, and cross-platform version of the popular Entity Framework data access technology. It really helps the developer to build applications which access database easily. But in most cases, we may cache some results which do not change frequently, to reduce access to our database. For example, the home page of a blog may not change  …

ASP.NET Core C# SQL Server SQL Entity Framework Core Azure Redis Caching Cache