Anduin

let today = new Beginning();

All Posts


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


Install Windows store app with WinGet

Now winget supports to install a Microsoft store app. First, you need to get the store app Id. Go to the Microsoft official website: https://www.microsoft.com/en-US/ And search the store app here. For example:   Click it. And now you have the address. So, for example, the 'to do app' has ID: 9nblggh5r558 You can use command to open store: ms-windows-store://pdp/?ProductId=9 …

PowerShell Windows Winget Microsoft Store UWP Store

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 Windows Windows 11 Install DISM Bcdedit Boot BCD

Retry with exponetial back-off on C#

Just built a simple retry engine in C#. /// /// Retry engine. /// public class RetryEngine { private static Random rnd = new Random(); private readonly ILogger logger; /// /// Creates new retry engine. /// /// Logger public RetryEngine( …

C# .NET Retry

找到玄学问题的根源的方法 - 夹逼调试法

背景 最近经常会有人找我问一些非常有趣,但是又非常玄学的问题。这类玄学问题我指的是正常情况下明明能工作,现在却不知为何无法工作的情况。 这些问题往往和非常多的难以预料的因素(例如环境)有关。例如:为什么我无法将一个文件签入到git? 解决大部分玄学问题,往往需要我主动在他的电脑上进行大量操作、环境分析,才能知道到底是哪里对程序产生了影响。或往往需要我反复沟通数十条消息才能真正判断问题所在。而且这类问题,由于正常情况下是能工作的,所以非常难以通过Google和Stack Overflow解决。 后来我想,与其每次都花费大量时间帮别人解决问题,不如抽象出一套能够解决上述问题的通用方法,来让大部分人能够自行解决这些问题。 夹逼调试法由此诞生。 夹逼调试法 夹逼调试法,指的是通过两个方向共同限制作用,使得问题根源的可能范围集中在最小化的条件变化中。 夹逼调试法适用于解决: 平时或 …


The simplest way to retry in PowerShell

$attempt = 0 do { try { Do-SomeThing-That-May-Crash-Here $success = $true } catch { if ($attempt -eq 5) { throw } Write-Host "Task failed. Attempt $attempt. Will retry in next $(5 * $attempt) seconds. Error: $($Error[0])" -ForegroundColor Yellow Start-Sleep -Seconds $(5 * $attempt) } $attempt++ } until($ …

PowerShell Retry

时评:国家对于子女教育方面的政策还需要多方面配套

之前看到中央办公厅 国务院办公室印发了减轻学生作业和校外培训负担的意见。(中共中央办公厅 国务院办公厅印发《关于进一步减轻义务教育阶段学生作业负担和校外培训负担的意见》_中央有关文件_中国政府网 (www.gov.cn)) 从意见中看得出,其主要目的之一,仍然是为了降低现在家长的育儿压力。而目前的现状仍然更倾向于是:家长没有那么多精力来管教孩子的业余生活,而课外生活往往又内卷于做题和研究解题技巧这些意义不大的事情上。通过标准教育流程的学生,往往精于解题技巧,却对社会本身的运行原理理解并不深入,生存能力也并不高,反而在业余时间找不到舒适又能够被所有人许可的娱乐方式。 而在6月8日,人民时评一篇报道:以制度效能守护健康上网(人民时评)--理论-中国共产党新闻网 (people.com.cn),其主要方向仍然围绕在避免未成年人的过度网络游戏、消费行为上。要求增加更多对未成年人在网络游戏上的制度建 …

China Politics Education


Build a common cache service for your C# app.

Recently, I found that almost every time I creates a new .NET app, I gonna need cache service. While Microsoft officially provides the IMemoryCache, I found that it is pretty complicated for you to use it. For it requires a lot of code. So I wrapped it to a more common one. Before starting, make sure the project references Microsoft.Extensions.Caching.Memory and Microsoft.Extensions.Logging. …

ASP.NET Core C# .NET Core Performance .NET Cache MemoryCache