Moonglade

Modern Markdown blogging with AI-powered localization and search.

All Posts


Open Su Kang Ma in one second

This article introduces a method from 2021 for bypassing Alipay or WeChat mini-programs to directly access the web version of the Su Health Code via a browser, thereby accelerating the QR code scanning process. The author points out that daily use is inconvenient because mini-programs load slowly and rely on specific apps, whereas the Su Health Code is essentially a web application whose real URL can be obtained through packet capture. Users can access this official link on a PC to obtain a QR code containing a Token, then pin that URL to their phone’s home screen to achieve instant access to the health code, thus eliminating dependence on applications such as Alipay. The article also analyzes the legality of this method, confirming that it accesses the official website of the Suzhou Public Security Bureau and retrieves status through normal API interfaces, rather than storing data illegally; it also explains that the Token is time-sensitive and must be re-obtained after expiration. In addition, this method supports displaying the health code on a tablet or computer, which is useful in emergency situations such as a dead phone battery. Finally, the author reminds readers that this method may no longer be valid currently, and mentions that the Travel Card also has a web version, which can serve as a backup solution.

Views 2,302
Browser Access China Health Code Sukang Code Web Web Based Solution

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....

Views 280
.NET Base64 C# Compress GZip string extension


Use Windows as a stateless OS on your devices

This is a tutorial article on automated optimization scripts for the Windows operating system, designed to complete multiple system configurations in one go using PowerShell and CMD commands. The core content covers system cleanup and environment optimization, including emptying the Recycle Bin, removing startup items, deleting 3D objects, and cleaning up desktop files to enhance tidiness. In terms of performance and experience, the script sets the power plan to Ultimate Performance mode, disables sleep on AC power, disables mouse acceleration to optimize control, and forces the use of the dark theme and the Chinese input method. Network and security settings involve setting the network type to Private to enable more features, configuring UAC to the default protection level, and optionally enabling Remote Desktop connections. Additionally, the script addresses the active probing issue in Windows 11, synchronizes to China Standard Time, displays file extensions, pins the code repository to Quick Access, and finally uses Winget to batch upgrade applications and install Windows system updates. This script is suitable for developers or advanced users who want to quickly configure a development environment tailored to their personal preferences. However, some operations, such as emptying the desktop and changing network properties, carry risks and should be executed with caution.

Views 917
Automation Configuration Device PowerShell Reimage Windows Windows 11





Finding the Root Cause of Mystical Problems - The Bisection Debugging Method

This article proposes a general problem-solving strategy called the "Squeeze Debugging Method," designed to rapidly identify technical failures that behave normally in ideal environments but exhibit anomalies in specific ones. The core logic of this method involves constructing an ideal environment E2 that guarantees normal program execution and comparing it with the actual environment E1 where the anomaly occurs, thereby identifying the set of differences between the two. Subsequently, through a bidirectional approach, the characteristics of the ideal environment are incrementally applied to the faulty environment, or vice versa, while observing whether the anomalous behavior changes, thus narrowing down the range of potential causes. The article emphasizes that this method is particularly effective for "mystical" issues that are difficult to resolve through conventional search methods. Its objective is to identify "potential conditions" that may contribute to the problem, rather than establishing strict necessary and sufficient conditions. Through two case studies—Spotify failing to run and an aircraft engine startup failure—the article demonstrates how to execute this debugging process in practice. It highlights that this method efficiently helps developers or users quickly identify key influencing factors from complex environmental variables, enabling them to independently resolve difficult-to-reproduce or pinpoint anomalies.

Views 788
Computer Science Debugging Environment Analysis Problem Solving Software Development System Issues