Moonglade

Modern Markdown blogging with AI-powered localization and search.

All Posts


Bootstrap dark theme minimum style

Now Apple is forcing all apps in its app store to support dark mode. Also, most native Android apps already support the dark theme. Viewing a screen which white background when you enabled dark mode on your device will greatly harm the viewer's eyes. Like lots of websites are mad...

Views 624
Bootstrap CSS Dark theme Media Query Style Web




Publish app from Azure DevOps to non-global Azure like Azure CN

This article describes how to publish an application to a non-global Azure environment, such as Azure CN, using Azure DevOps. Because the global configuration cannot directly recognize subscriptions in these environments, you must manually create a service connection. First, register a new application in Azure Active Directory to obtain the application ID and client secret, and then assign the Contributor role to this application in the target subscription to grant resource management permissions. Next, in the Azure DevOps project settings, add a new Azure Resource Manager service connection, select the manual configuration mode, and specify the custom environment (such as Azure China Cloud). Then, fill in the subscription ID, name, application ID, secret, and tenant ID, verify, and save the connection. After completing these steps, you can reference this service connection in your pipeline to achieve successful deployment to non-global Azure environments.

Views 1,171
Azure Azure App Service Azure CN Azure DevOps China DevOps

Linux Cheatsheet for Windows Users

This document provides a guide to efficient practices for Linux system administration. First, it details the use of terminal multiplexers such as tmux and screen, including creating, detaching from, and reattaching to sessions, as well as sending commands to the background, with special emphasis on the convenience of executing scripts within screen. Next, it introduces the installation and configuration of SteamCMD, explicitly stating that there is no need to create a dedicated user; it can be run directly with the current account. It also demonstrates how to update game servers, such as Project Zomboid, using scripts. In terms of system monitoring, the article provides a comprehensive comparison of tools including top, htop, free, netstat, iotop, iostat, ifstat, iftop, dstat, sar, vmstat, nmon, atop, and glances, covering real-time monitoring and historical data analysis for CPU, memory, disk I/O, and network traffic. Finally, it summarizes a series of practical command-line tips, including counting lines of code, batch Git operations, testing disk write and SSH transfer speeds, generating UUIDs, generating random numbers, and using dd to create bootable drives, all aimed at improving operational efficiency and system troubleshooting capabilities.

Views 407
Bash Scripting Linux Linux Tools System Monitoring Ubuntu bash




Getting the Push Stream URL and Playback URL for Tencent Cloud Live in C#

This article documents the practical process of integrating Tencent Cloud live streaming push functionality in a C# environment. Since Tencent Cloud officially provides code examples only in Java and PHP, and the push URL must be generated on the client side, the author successfully reverse-engineered the Java examples to decipher the generation logic of the critical parameter `txTime`, confirming it to be a Unix timestamp counting from January 1, 1970. Subsequently, the author implemented the complete signing algorithm in C#, including calculating the MD5 value, string concatenation, and conversion to hexadecimal format, ultimately generating valid push and playback addresses. The article details the complete code implementation from timestamp conversion and MD5 encryption to final URL construction, resolving the difficulty C# developers face in understanding the signing mechanism due to the lack of official documentation support. It provides a reusable technical solution and code reference for integrating live streaming features in similar scenarios.

Views 613
.NET Core C# China Live Streaming Tencent Cloud Tencent Cloud Live