Morning Run on Margaret Island, Budapest

Budapest wakes up slowly, but the Danube is already busy with light. At 5:02 a.m. on July 12, 2025, I slipped out of the hotel, shoes squeaking faintly on the cobblestones, and followed the cool air toward Margaret Island (Margit-sziget). The island sits like a park set afloat between Buda and Pest, and at dawn it belongs almost entirely to runners. Morning Numbers Distance: 10.55 km Time: 55m 20s Average pace: 5'15"/km Calories burned: 654 kcal The lap is familiar on paper—two loops of the red track that wraps the island—but it never feels repetitive. The surface has just enough give, and the trees form a tunnel that lets the sunrise drip through in thin ribbons of gold. ...

July 12, 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