Posts
Find First and Last Position of Element in Sorted Array
Problem URL: https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/
Essentially a binary search problem, searching for the start and end positions
Modifying the Parent Commit of a Historical Commit
Half a year ago, when merging the hotfix branch, the merge direction was reversed, causing the hotfix branch to become the new main branch. There was no solution at the time, but today I revisited the issue and attempted to fix it.
ArchLinux Configuration Guide
This is a navigation page that records my configuration process. You can follow the page order for setup or just search for specific information.
Playing NieR:Automata on Linux
This guide uses NieR:Automata running on Steam as an example, with Intel + Nvidia hardware platform.
Generally speaking, most Windows games can be run through wine.
This article is part of the ArchLinux Configuration Guide.
Of course, you can also read it separately.
Pacman Universal Configuration
Configuration file reference: Arch manual pages
You can directly copy and replace your pacman.conf file (remember to back up)
This article is part of the ArchLinux Configuration Guide.
Of course, you can also read it separately
Seamlessly Migrating from Firefox Stable to Developer Edition
Mozilla's Major Blunder: Certificate Expiration Renders Firefox Extensions Unusable Worldwide This morning Mozilla played a not-so-small joke on Firefox users worldwide. Many woke up to find all their browser extensions non-functional, including on mobile versions.
Thus, how to seamlessly transfer data became the primary goal.
First, back up Firefox's user data folder. On Linux, this is the
.mozillafolder in the user directory.WebSocket+TLS+CDN+Web: Deploying V2Ray with Apache2
Many online tutorials contain errors - this article aims to provide corrections and comprehensive guidance.
This article references official documentation, Plain Language Tutorial, Github issue, and https://ferrummagnus.com/2017/12/22/v2ray-websocket-tls-apache/, but you don't need to check them.
Prerequisites: You have a server running Apache2 with an established blog.
Python3 Download and Parse xml.gz Files
Scenario: Need to fetch a GZip-compressed XML file from the web and parse it using Python3.
Requirement: Want to parse the raw data directly without saving as a file first.
Common approach: First save as a file, then use Python3's gzip library to open and parse the file.
Load Balancing V2Ray Multi-Protocol Multi-Server Setup with HAProxy
V2Ray's built-in load balancing strategy only offers random selection, which is clearly insufficient for unstable networks.
ShadowSocks can use HAProxy for load balancing, but V2Ray supports multiple protocols, making this approach impractical.
We can leverage Docker's features to create a network that uses HAProxy for load balancing while automatically maintaining a list of available nodes (utilizing HAProxy's health check feature and V2Ray's Dokodemo-door).
NOTE: Almost all code in this article can be copied and used directly, but I strongly recommend reading the comments carefully.
Converting EXT4 Root Filesystem to XFS (Arch Linux)
XFS offers more modern features compared to EXT4 and performs better when handling large numbers of files
References: XFS vs EXT4, Why did CENTOS 7.0 choose XFS as the default filesystem? What are the advantages of XFS over ext?, Ext4 vs XFS – Which one to choose?
NOTE: Since XFS cannot shrink partitions, it's recommended to use LVM for flexibility
Prerequisites: Arch Linux system with LVM+EXT4 disk management
Technical references: Change Root File System from Ext4 to Xfs on Archlinux, XFS (简体中文), LVM (简体中文)