Building Driver-Hub: A Feishu Web App for GitLab Project Management

Overview This article introduces Driver-Hub, a Feishu (Lark) Web Application I built to connect with our internal GitLab server. The app allows searching projects, browsing branches, viewing commits, and downloading code archives directly from Feishu’s workplace UI. The implementation is purely web-based. Traditional bot features were removed — users open Driver-Hub in Feishu, interact with form controls, and the app communicates with GitLab APIs through FastAPI. 1. Feishu Developer Platform Setup Before writing any code, configure a Feishu developer app to host the Driver-Hub UI. ...

November 10, 2025
Doom Emacs running perfectly in Windows Terminal

Fixing Doom Emacs Icon Garbling in Windows Terminal (MSYS2 + Mingw64)

When running Doom Emacs under Mingw64 inside Windows Terminal, you may find the UI symbols (like those from Nerd Font) showing up as random blocks or question marks. This issue is almost always caused by Windows console encoding not using UTF-8, even though your Emacs and fonts are already configured correctly. This article explains why it happens and how to fix it completely — including installing Nerd Fonts via Scoop, adjusting Windows Terminal profiles, and ensuring UTF-8 consistency across all layers. ...

November 9, 2025

Rebuilding My Windows 10 Development Environment

A reproducible Windows 10 Pro 22H2 workstation setup for cross-platform development: zsh, PowerShell, Doom Emacs, MicroPython, Windows Terminal, and proxy-friendly package mirrors.

November 6, 2025

ROM Packaging with --just-symbols

“Premature optimization is the root of all evil.” — Donald Knuth Overview Goal: Package low-level firmware as a ROM image plus symbol export. The application imports that symbol table during its own link stage, so it can call into ROM code without ever touching the original sources. ROM stays frozen and reusable; the APP continues to evolve. Key techniques: ld --just-symbols to reuse symbol addresses Exporting stable symbols __weak rewriting for patches Shared RAM segments Interface consistency constraints Equivalent implementation in Keil using --symdefs I. ROM Packaging with gcc --just-symbols Gather ROM code into a dedicated section Tag the reusable functions with __attribute__((section(".rom"))) so the object files collect them neatly. ...

September 24, 2025

Makefile Tutorial: Taming the Beast

What is make? Picture a pile of Lego bricks scattered across the floor. You want a spaceship, not a cleanup headache. make is the friend who reads the instructions, remembers what you built yesterday, and only asks you to rebuild the wing your dog stepped on. Under the hood, make reads a Makefile and decides: Which targets are out of date and need rebuilding. Which commands to run—and in what order. Whether it should also tidy up, set permissions, or run your tests. Many IDEs quietly call make for you. Using it directly feels like hiring the butler instead of hoping he overhears you. ...

July 1, 2025

Talking USBTMC: From Boring Descriptors to Glorious SCPI Replies

Plug in a new USB gadget and sometimes it politely announces, “I’m a lab instrument, not a thumb drive.” That’s USBTMC—the USB Test and Measurement Class—quietly enabling oscilloscopes, power supplies, and homebrew boards to speak SCPI without drama. Anatomy of a USBTMC Device USBTMC Class Codes: Class Codes A proper USBTMC device struts onto the bus with a few essentials: Control Endpoint (EP0): Mandatory. Think of it as the bouncer at the club—everybody has to check in here. Bulk-IN (EP1): The data firehose coming back from the device. Bulk-OUT (EP2): Where the host pours SCPI commands like *IDN? into your gadget. Interrupt-IN (EP3): Optional, but handy for poking the host when something interesting happens. The Communication Model ...

June 16, 2025

MicroPython on STM32: Because Blinking LEDs is a Lifestyle

If you’ve ever stared at a microcontroller and wondered why you were still wrestling with header files instead of just writing Python, MicroPython is the escape hatch. It squeezes Python down to MCU size and still leaves room to blink LEDs with flair. What is MicroPython? MicroPython is the language you already know, trimmed and caffeinated to run directly on microcontrollers. You can drop .py files onto the board, poke at it interactively, and still drive GPIO, ADC, or PWM with readable, concise code. ...

May 31, 2025
Hugo + Nginx + Cloudflare Deployment

Deploying luoyao.info with Hugo, Nginx, and Cloudflare on Debian 12 Lightsail

When I decided to rebuild my personal site luoyao.info, I wanted a setup that’s fast, stable, and easy to maintain. After trying several stacks, I settled on Hugo + Nginx + Cloudflare, running on a Debian 12 Lightsail instance. This post documents the full deployment process—from server setup to SSL configuration—so you can reproduce it easily. 1. Environment Overview Component Description VPS Amazon Lightsail (Debian 12) Domain luoyao.info (managed via Cloudflare) SSL Mode Full (Strict) Web Server Nginx Site Generator Hugo Extended v0.150 Access SSH key (passwordless login) 2. Prepare the Server ssh admin@<YOUR_LIGHTSAIL_IP> sudo timedatectl set-timezone Asia/Shanghai sudo apt update sudo apt install -y nginx git unzip curl 3. Install Hugo (Extended) The Debian package is outdated, so install the latest release manually: ...

May 15, 2025

Why I’m Blogging Again

Back in 2010 I dove into WordPress, spent weekends tweaking themes, and posted whenever inspiration struck. I also tinkered with the server far more than I wrote. Inevitably the machine crashed, backups were missing, and the archive vanished in one swoop. (Lesson learned: backups are dull right up until they become priceless.) I attempted a few comebacks, but work ramped up and two small kids arrived, so the blog went into hibernation. ...

May 5, 2025