Anduin

let today = new Beginning();

All Posts


Best practice after installing Windows Server | Why you should NEVER use 'Administrator' user?

This article helps you change the following items if your cloud provider didn't do that for you. Rename server, (optional) join AD domain. Create your own account instead of Administrator. Disable Administrator login. Change remote desktop default port. Disable IIS dangerous protocol. Install some very infrastructure tools. After you buying a Windows Server from some cloud provider, or just  …

Security Windows Server Cloud Configuration

Install WinGet on Windows Server

Before starting, you need to make sure that you are NOT running under Administrator account! Administrator account can NOT start store apps. After starting new Windows Server, start a new PowerShell session with Administrator privilege. Run the following commands: function Install-Package { param ( [string]$PackageFamilyName ) Write-Host "Querying latest $PackageFamilyName  …

PowerShell Windows Server Install Winget Automation

精准防控面临的问题来自于健康码的设计需要革新

问题:层层加“码”真的提高了防疫的标准了吗? 最近苏州疫情严重。之前出入公司只检查苏康码是绿码就可以同行了。后来防疫标准提高了,要求同时还需要出示行程码不带星才可以进入。再后来为了限制外地人员,又搞出来了一个出入码。导致每次进一次园区都需要工卡、苏康码、行程码、出入证一堆证件。。。把一队汽车堵住了,而更让人疑惑就是:额外增加一个码,真的更加安全了吗?是否其中某些码的功能已经覆盖了呢? 例如:行程码中带有上海,往往意味着比较危险。但是病毒并不是按行政区划传播的。上海也有安全的地方,苏州也有危险的地方。例如上海的滴水湖就几乎没有病例。假如我去一趟滴水湖导致行程码带了星就不能进入园区,似乎也不合理。 额外增加一些码产生的问题相当的多:例如很多人有两部手机,或可以偷偷借来一部手机,来骗到绿码、通行证混进社区。这又不得不花费法律成本和道德来纠正这些问题。 或许对于基层来说,为  …

China Health Code Shanghai COVID-19

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

Lint markdown with customized rule by JavaScript

Recently, I have a repository with a lot of markdown files. Anduin2017/HowToCook: 程序员在家做饭方法指南。Programmer's guide about how to cook at home (Chinese only). (github.com) I installed some markdown lint plugins. However, there are some customized need for me to lint files. I think it might be a good idea to lint it with node JS, since it configures easily in GitHub pipeline and works with some  …

GitHub node JavaScript GitHub Actions Continuous Integration

Raise up Visual Studio Code correctly in your C# client-side program

When I search this topic from Google, I always get results with 'How to write C# program in VS Code'. But what I was working on is an editor, which allows the user to open VS Code to edit a folder. My UI is like this: So what should I do to open the folder in VSCode? Code is below: Process.Start(new ProcessStartInfo { UseShellExecute = true, // IMPORTANT: …

C# VSCode WPF

Auto backup for Minecraft on Linux

Recently, I was addicted to Minecraft. And I hosted a server. In order to backup the server automatically, I have tried many solutions. Git solution Git solution requires a lot of CPU when compressing the objects. And may impact the game performance since Java itself requires a lot of CPU. So I finally gave up Git.   Copy solution Copy the world folder to anther place is super simple. Before try  …

bash Linux Minecraft Backup

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

在一秒钟内打开苏康码

之前每次进公司,为了打开苏康码,都得翻半天支付宝和微信的小程序,非常痛苦。 尤其是手机卡住了,网不稳了,小程序框架本身就加载半天,弄得我经常尴尬的卡在门外,迟到,难受。 不过,我怎么看怎么感觉,这个苏康码好像就是个网页呀,如果能抠出来URL,自己用浏览器打开,岂不是相当方便快捷? 还可以省去天天翻各种小程序了。   获取苏康码 在下面地址获取苏康码: https://scm.szgaj.cn/wjw/health_skm.html (这并不需要你有任何App例如微信、支付宝,可以在PC上操作)   (防钓鱼:         这个URL的意思,看起来是 https://苏城码.苏州公安局.中国/微警务/健康_苏康码.html。经过检查备案信息,确实属于苏州公安局。再加上有HTTPS,应该不是钓鱼链接,可以放心输入个人信息)     加速这个过程 在你通过浏览器获取到苏康码后,可以复制  …

Web China Health Code

C# Play with GZip.

A extension class for string to add GZip features. Copy the following code to your project first. using System; using System.IO; using System.IO.Compression; using System.Text; public static class GZipExtensions { private static byte[] Zip(string str) { var bytes = Encoding.UTF8.GetBytes(str); using (var msi = new MemoryStream(  …

C# .NET Compress GZip Base64

Directly talk to any enterprise Microsoft Teams user

Recently, we found that you can directly talk with any Microsoft Teams (Work or School) user. Before starting Before starting, you need to have Microsoft Teams (Work or School) installed and sign in with your work or school account. To buy it, reference Microsoft 365: Compare Microsoft 365 Enterprise plans   Find a person The approach is pretty simple. First, you need to grab his email address.  …

Microsoft Teams Microsoft 365

Use Windows as a stateless OS on your devices

Why stateless device, stateless OS? OS might be buggy Now Windows 11 is very buggy. Stuck everyday. Unresponsive everyday. Store stop working every day. Since those tiny problems emerge endlessly on Windows 11. Often inexplicable systems will fall into weird failures. Solving these problems is very difficult, and it may require us to understand how Windows works. However,  …

PowerShell Windows Windows 11 Automation Configuration Device Reimage