The Android system provides user-accessible storage space, allowing users to manage their files with ease (compared to iOS). However, some applications create numerous folders directly in the storage root directory, disrupting file management and posing a significant nuisance for users with organizational preferences. To address this, I developed an Xposed module. This module hooks into Android's File class. Whenever an app attempts to read or write files/folders in the root directory, the module first checks if the target exists. If it exists, the operation proceeds normally; if not, the operation is redirected to the /Android/files directory. Compared to XInternalSD,...

Troubleshooting a Linux Memory Leak
Root Cause I recently developed a VPS monitoring system using PHP, consisting of both server-side and client-side components. At 3 PM today, I added a service monitoring feature to check running services on VPS instances. Since all my VPSes run Debian 8, I used service --status-all to retrieve service statuses. After successful testing, I moved on to other tasks. Around 9 PM, I received an alert email from NodeQuery indicating high memory usage on one of my VPS instances since 7 PM. Checking my monitoring system, I found this VPS consuming 400M/500M memory. Another VPS showed even higher usage at 600M/1G, though it didn't trigger alerts due to larger total memory. The mystery was:...
Bilibili Danmaku Filter Tool
With the growing number of Bilibili users, many elementary school students have joined the platform and posted a large volume of danmaku that violates etiquette, significantly impacting other users' viewing experience. Many users have even turned off danmaku entirely because of this, but what's the point of using Bilibili without danmaku? I wrote a small program in Python 3 to filter out elementary school-level danmaku (this program also served as practice for a recent Python programming class). The code can be found at https://github.com/xddxdd/bilibili-dmshield . To use the filtering feature, you can either: Point the IP of comment.bilibili.com to 127.0.0.1 via the hosts file, or Use browser extensions like FoxyProxy or SwitchyOmega to route comment.bilibili....
Bilibili Bottom Danmaku to LRC Tool
Bilibili is never short of amazing works from talented creators, including original music, covers, and captivating "guichu" remixes. Sometimes we want to save these to devices that can play music with lyrics but not video (like certain MP3 players), or use them as background music while displaying lyrics on our desktop. The problem is, many excellent works can't be found in mainstream music apps. Even when available (e.g., on NetEase Cloud Music, rumored to have close ties with Bilibili), some tracks lack lyrics—especially new releases. But when you turn on Bilibili's danmaku, you'll find many volunteer "subtitle masters" have created bottom-aligned danmaku. By extracting the timestamps and content of these danmaku, we can quickly generate lyric files (like LRC)....

Rummy Card Counting Program
In English class, our foreign teacher introduced us to the card game Rummy. This game has no official rules, so there are many variations among players. The rules our teacher taught us are as follows: The game requires at least one deck of playing cards, depending on the number of players, with all jokers removed. At the start, each player is dealt 7 cards. After dealing, flip the top card from the deck and place it aside. During each player's turn, they must perform the following actions: Choose to take the top card from the face-down deck or take any number of cards from the face-up discard pile. When taking cards from the discard pile, you must use the bottommost card you picked up during this turn according to condition 2 below. (Cannot keep it in hand or discard it)...

Configuring Hurricane Electric IPv6 Tunnel on OpenVZ, Enabling the Entire Address Pool and Using it Alongside Native IPv6
AlphaRacks is a cost-effective hosting provider, offering VPS with 1 CPU, 512MB RAM, and 10GB storage for just $9.9/year. However, this provider is quite stingy with IPv6 addresses, requiring users to justify their need for IPv6. It's said they provide up to 20 addresses? But they may not allocate the full amount. For example, when I explained I needed IPv6 to serve IPv6-only users, the provider replied: We've added 1 IPv6 address to your VPS. A single IPv6 address is insufficient for my needs. Fortunately, Hurricane Electric in the US offers IPv6 tunneling services , providing each user with 5 tunnels. Each tunnel includes a /64 address pool, and users can instantly activate a /48 address pool with one click. Despite this generous service, using it on OpenVZ VPS requires extra effort....

Enabling Color Display in Bash
The default Bash command line in Linux is always black text on a white background, which can appear somewhat monotonous. However, we can add a few lines of commands to make Bash display information in color. This not only enhances visual appeal but also helps highlight important content. Edit the .profile file in your home directory: nano ~/.profile ``` Add the following at the end of the file: export LS_OPTIONS='--color=auto' eval "`dircolors`" alias ls='ls $LS_OPTIONS' alias ll='ls $LS_OPTIONS -l' alias l='ls $LS_OPTIONS -lA' PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[00m\]@\[\033[01;36m\]\h\[\033[00m\]:[\[\033[01;34m\]\w\[\033[00m\]]\$ ' ``` Save and exit, then either restart Bash or enter: source ~/.bashrc ``` You will now see a colorful command line....
How to Fix Slow OpenSSH Login
Today when connecting to an Azure China virtual machine, I noticed extremely slow login response. Even with a good network environment, it took over ten seconds to display the password prompt. After searching on Google, I discovered the issue was caused by DNS reverse lookup. OpenSSH performs a reverse lookup on your IP during login to determine if your IP is on the system's blacklist. However, China Telecom doesn't provide reverse lookup for residential IP addresses, causing OpenSSH to wait until the lookup times out before establishing the connection. The solution is simply to disable reverse lookup. sudo nano /etc/ssh/sshd_config # Add "UseDNS no" at the end of the file, then save and close sudo service ssh restart If the connection remains slow after this configuration,...
Using the Latest Version of Flash on Ubuntu Firefox
About a year ago, Adobe ceased new feature development for its Flash plugin on Linux systems, providing only security updates. The Linux version of Flash remained at version 11.2, while the latest Windows version had already advanced to 15.0. However, Adobe collaborated with Google to develop Pepper Flash, which is integrated into the Chrome browser. Both Chrome and its built-in Pepper Flash have consistently stayed up-to-date on Linux. This raises the question: Since Pepper Flash is exclusive to Chrome, how can we make it work in Firefox? Some hoped Mozilla would actively support Pepper Flash, but the Firefox development team rejected the proposal: https://bugzilla.mozilla.org/show_bug.cgi?id=729481 Consequently,...
Compiling and Installing App Inventor on Ubuntu
App Inventor is a simple Android programming tool developed by MIT. By dragging and dropping objects on a webpage and setting up code in a flowchart-like manner, you can generate your own Android applications. If you install App Inventor's companion software on your Android phone or tablet, you can modify the interface on your computer and see changes reflected instantly on your mobile device. MIT provides an online version of App Inventor accessible through email registration. However, their website runs on Google App Engine. As we all know, Google's services have poor accessibility in China. Therefore, it's best to install it locally for uninterrupted programming. Download the source code First, you'll need a GitHub account. Visit https://github....