<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Signal Lab</title><description>Hands-on notes on edge hardware, local LLMs, Spring AI and the tooling around them.</description><link>https://yanshuai.name/</link><item><title>Moving a static Astro site from my own server to Cloudflare Workers</title><link>https://yanshuai.name/blog/moving-static-site-to-cloudflare-workers/</link><guid isPermaLink="true">https://yanshuai.name/blog/moving-static-site-to-cloudflare-workers/</guid><description>Why I moved a static Astro site off a self-hosted nginx, the steps and the traps I hit, the limits of the free plan, and which kinds of sites fit this setup.</description><pubDate>Mon, 12 Oct 2026 00:00:00 GMT</pubDate></item><item><title>OpenAI&apos;s 720 math manuscripts and the cost of checking</title><link>https://yanshuai.name/blog/openai-math-manuscripts-verification/</link><guid isPermaLink="true">https://yanshuai.name/blog/openai-math-manuscripts-verification/</guid><description>OpenAI released about 720 AI-generated mathematical manuscripts and many mathematicians reacted badly. What happened, what Lean can and cannot check, and why engineers who generate code with AI have the same problem.</description><pubDate>Sun, 11 Oct 2026 00:00:00 GMT</pubDate></item><item><title>Python 3.15: what changes for everyday code</title><link>https://yanshuai.name/blog/python-315-whats-new/</link><guid isPermaLink="true">https://yanshuai.name/blog/python-315-whats-new/</guid><description>Python 3.15.0 was released on 9 October 2026. The changes I think matter most for working code: UTF-8 by default, lazy imports, the new sampling profiler, frozendict and sentinel, typing updates, the JIT, and the removals that can break things. Plus my upgrade plan.</description><pubDate>Sun, 11 Oct 2026 00:00:00 GMT</pubDate></item><item><title>nginx behind a Cloudflare Tunnel: real client IPs and a maintenance page</title><link>https://yanshuai.name/blog/cloudflare-tunnel-nginx-real-ip/</link><guid isPermaLink="true">https://yanshuai.name/blog/cloudflare-tunnel-nginx-real-ip/</guid><description>Why the usual Cloudflare IP allow-list is the wrong real_ip setting behind a Tunnel, and a small nginx config that also serves a proper 503 maintenance page.</description><pubDate>Sat, 26 Sep 2026 00:00:00 GMT</pubDate></item><item><title>Org-mode and Markdown: which I use for what</title><link>https://yanshuai.name/blog/org-mode-vs-markdown/</link><guid isPermaLink="true">https://yanshuai.name/blog/org-mode-vs-markdown/</guid><description>A practical comparison of Org-mode and Markdown for notes, runnable documentation and publishing a blog, with the export step that makes them work together.</description><pubDate>Sun, 20 Sep 2026 00:00:00 GMT</pubDate></item><item><title>A small RAG endpoint with Spring AI and Ollama</title><link>https://yanshuai.name/blog/spring-ai-rag-service/</link><guid isPermaLink="true">https://yanshuai.name/blog/spring-ai-rag-service/</guid><description>A Spring Boot endpoint that answers questions over your own notes, using Ollama for chat and embeddings.</description><pubDate>Thu, 03 Sep 2026 00:00:00 GMT</pubDate></item><item><title>An old Pi 3B+ as an RTSP camera with MediaMTX</title><link>https://yanshuai.name/blog/raspberry-pi-rtsp-camera-mediamtx/</link><guid isPermaLink="true">https://yanshuai.name/blog/raspberry-pi-rtsp-camera-mediamtx/</guid><description>Hardware H.264 from rpicam-vid, republished through MediaMTX as RTSP so any player or script on the network can read it.</description><pubDate>Wed, 12 Aug 2026 00:00:00 GMT</pubDate></item><item><title>How I let a coding agent work in my repositories</title><link>https://yanshuai.name/blog/coding-agent-guardrails/</link><guid isPermaLink="true">https://yanshuai.name/blog/coding-agent-guardrails/</guid><description>Coding agents can now edit files and run commands for a long time without asking. The setup I use to keep that safe and reviewable: a branch, a sandbox, tests as the contract, and small diffs.</description><pubDate>Thu, 09 Jul 2026 00:00:00 GMT</pubDate></item><item><title>Spring AI 2.0: my upgrade plan for a small service</title><link>https://yanshuai.name/blog/spring-ai-2-upgrade-notes/</link><guid isPermaLink="true">https://yanshuai.name/blog/spring-ai-2-upgrade-notes/</guid><description>Spring AI 2.0.0 was released on 12 June 2026 on top of Spring Boot 4. The order I would upgrade in, the breaking changes that hit a typical chat-plus-tools service, and what to test.</description><pubDate>Thu, 18 Jun 2026 00:00:00 GMT</pubDate></item><item><title>Mosquitto, Telegraf, InfluxDB 2 and Grafana in one compose file</title><link>https://yanshuai.name/blog/mqtt-influxdb-grafana-docker-compose/</link><guid isPermaLink="true">https://yanshuai.name/blog/mqtt-influxdb-grafana-docker-compose/</guid><description>Read an SHT31 on a Raspberry Pi, publish JSON over MQTT, store it in InfluxDB and chart it in Grafana, all from one compose file.</description><pubDate>Thu, 04 Jun 2026 00:00:00 GMT</pubDate></item><item><title>Python 3.15 beta: lazy imports for faster CLI startup</title><link>https://yanshuai.name/blog/python-315-lazy-imports/</link><guid isPermaLink="true">https://yanshuai.name/blog/python-315-lazy-imports/</guid><description>Python 3.15.0b1 is out with PEP 810 explicit lazy imports. How the lazy keyword works, where it is allowed, how to measure the gain, and how to stay compatible with older Python.</description><pubDate>Thu, 14 May 2026 00:00:00 GMT</pubDate></item><item><title>Gemma 4 with Ollama: picking a size</title><link>https://yanshuai.name/blog/gemma-4-local-ollama/</link><guid isPermaLink="true">https://yanshuai.name/blog/gemma-4-local-ollama/</guid><description>Google released Gemma 4 under Apache 2.0 on 2 April 2026. How the four sizes differ, how to choose one for your hardware, and the Ollama settings that matter.</description><pubDate>Wed, 15 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Measure memory use before you buy a bigger Raspberry Pi</title><link>https://yanshuai.name/blog/raspberry-pi-measure-ram-before-buying/</link><guid isPermaLink="true">https://yanshuai.name/blog/raspberry-pi-measure-ram-before-buying/</guid><description>Raspberry Pi prices went up again because of memory costs. How to measure how much RAM your workload really needs, so you do not pay for memory you will not use.</description><pubDate>Tue, 10 Feb 2026 00:00:00 GMT</pubDate></item><item><title>Tailwind CSS v4 with Astro: yes for a dashboard, no for a Markdown site</title><link>https://yanshuai.name/blog/tailwind-v4-astro-some-pages/</link><guid isPermaLink="true">https://yanshuai.name/blog/tailwind-v4-astro-some-pages/</guid><description>How Tailwind v4 is added to an Astro 5 project with the Vite plugin, what the CSS-first config looks like, what changed from v3, and why Markdown-heavy sites stay on plain CSS while my sensor dashboard uses Tailwind.</description><pubDate>Tue, 09 Dec 2025 00:00:00 GMT</pubDate></item><item><title>Python 3.14 template strings and lazy annotations, tried on real code</title><link>https://yanshuai.name/blog/python-314-t-strings-annotations/</link><guid isPermaLink="true">https://yanshuai.name/blog/python-314-t-strings-annotations/</guid><description>Two Python 3.14 changes that affect everyday code: t-strings for safe string building, and annotations that are evaluated only when needed. Small examples and what to check before upgrading.</description><pubDate>Tue, 21 Oct 2025 00:00:00 GMT</pubDate></item><item><title>From Java 21 to JDK 25 LTS: the changes I care about for services</title><link>https://yanshuai.name/blog/jdk-25-from-21-upgrade-notes/</link><guid isPermaLink="true">https://yanshuai.name/blog/jdk-25-from-21-upgrade-notes/</guid><description>Java 25 is the new long-term support release. The changes since 21 that I care about for services: no more pinning with synchronized, compact object headers, AOT cache, scoped values, and simpler main methods.</description><pubDate>Tue, 23 Sep 2025 00:00:00 GMT</pubDate></item><item><title>Gemini CLI and Claude Code on the same small task</title><link>https://yanshuai.name/blog/gemini-cli-vs-claude-code/</link><guid isPermaLink="true">https://yanshuai.name/blog/gemini-cli-vs-claude-code/</guid><description>I gave the same small Python task to Gemini CLI and Claude Code. Notes on setup, context files, permission prompts, sandboxing, how each handled a failing test, and what each costs as of August 2025.</description><pubDate>Tue, 19 Aug 2025 00:00:00 GMT</pubDate></item><item><title>uv for Python projects: from pip replacement to my default tool</title><link>https://yanshuai.name/blog/uv-daily-use/</link><guid isPermaLink="true">https://yanshuai.name/blog/uv-daily-use/</guid><description>uv started in 2024 as a fast replacement for pip and pip-tools, and grew into a project manager. How I use it now for projects, one-file scripts, Python versions and Docker images, and the old pip habit that bites.</description><pubDate>Tue, 17 Jun 2025 00:00:00 GMT</pubDate></item><item><title>Spring AI 1.0 in a small service: ChatClient, tool calling and Ollama</title><link>https://yanshuai.name/blog/spring-ai-1-0-ollama-tools/</link><guid isPermaLink="true">https://yanshuai.name/blog/spring-ai-1-0-ollama-tools/</guid><description>Spring AI reached 1.0 on 20 May 2025. A minimal Spring Boot service that talks to a local Ollama model, returns typed results, and calls a Java method as a tool, plus notes from moving off the milestones.</description><pubDate>Tue, 27 May 2025 00:00:00 GMT</pubDate></item><item><title>Java virtual threads compared with goroutines, Kotlin coroutines, asyncio and Rust async</title><link>https://yanshuai.name/blog/virtual-threads-vs-coroutines/</link><guid isPermaLink="true">https://yanshuai.name/blog/virtual-threads-vs-coroutines/</guid><description>How Java virtual threads differ from Go goroutines, Kotlin coroutines, Python asyncio and Rust async/await: stacks, scheduling, preemption, function colouring, blocking, pinning, cancellation, debugging and memory. With the same small program in each language.</description><pubDate>Wed, 16 Apr 2025 00:00:00 GMT</pubDate></item><item><title>Running YOLO11 with ONNX Runtime from Rust (ort 2.0 RC)</title><link>https://yanshuai.name/blog/yolo11-onnx-runtime-rust-ort/</link><guid isPermaLink="true">https://yanshuai.name/blog/yolo11-onnx-runtime-rust-ort/</guid><description>Export YOLO11n to ONNX, load it with the ort crate, preprocess with the image crate, and decode boxes with NMS. Notes on the pre-release API and on deployment.</description><pubDate>Tue, 15 Apr 2025 00:00:00 GMT</pubDate></item><item><title>A few weeks with a terminal coding agent (the Claude Code preview)</title><link>https://yanshuai.name/blog/terminal-coding-agent-first-notes/</link><guid isPermaLink="true">https://yanshuai.name/blog/terminal-coding-agent-first-notes/</guid><description>A few weeks with a coding agent that reads the repository, edits files and runs commands. Which tasks went well, which did not, and the small habits I changed.</description><pubDate>Tue, 25 Mar 2025 00:00:00 GMT</pubDate></item><item><title>Moving from Conda to uv: a default venv instead of base</title><link>https://yanshuai.name/blog/conda-to-uv/</link><guid isPermaLink="true">https://yanshuai.name/blog/conda-to-uv/</guid><description>I replaced Miniconda with uv for my everyday Python work. Why I switched, how I set up a global default venv to take the place of conda base, a small zsh setup for switching venvs, and the traps when a project has its own .venv.</description><pubDate>Tue, 11 Mar 2025 00:00:00 GMT</pubDate></item><item><title>A small MCP server in Python for home sensor data</title><link>https://yanshuai.name/blog/mcp-server-python-sensors/</link><guid isPermaLink="true">https://yanshuai.name/blog/mcp-server-python-sensors/</guid><description>Write a Model Context Protocol server with the official Python SDK and FastMCP, test it with the inspector, connect it to a desktop client, and avoid the stdout trap.</description><pubDate>Tue, 18 Feb 2025 00:00:00 GMT</pubDate></item><item><title>Workflow engines in Java: notes from using BPMN with Flowable and Camunda</title><link>https://yanshuai.name/blog/java-workflow-engines-flowable-camunda/</link><guid isPermaLink="true">https://yanshuai.name/blog/java-workflow-engines-flowable-camunda/</guid><description>When a BPMN workflow engine is worth it and when a status column plus a scheduler is enough. BPMN basics, embedding Flowable 7.1 in Spring Boot 3, the Camunda 7 and Camunda 8 situation as of late 2024, and the pitfalls I hit.</description><pubDate>Tue, 12 Nov 2024 00:00:00 GMT</pubDate></item><item><title>Two kinds of reports in Java: fixed-layout PDF with JasperReports, data exports with POI and EasyExcel</title><link>https://yanshuai.name/blog/java-reports-jasperreports-excel-export/</link><guid isPermaLink="true">https://yanshuai.name/blog/java-reports-jasperreports-excel-export/</guid><description>How I split report work in Spring Boot projects: JasperReports for printable PDF documents, Apache POI SXSSF or EasyExcel for large Excel exports. Templates, CJK fonts, memory, streaming responses, number and date formats, and tests. Versions as of October 2024.</description><pubDate>Tue, 29 Oct 2024 00:00:00 GMT</pubDate></item><item><title>Java startup time: CDS, Spring AOT and GraalVM native image</title><link>https://yanshuai.name/blog/java-startup-cds-aot-native-image/</link><guid isPermaLink="true">https://yanshuai.name/blog/java-startup-cds-aot-native-image/</guid><description>When Java startup time matters and when it does not, how to measure it honestly, and what CDS, Spring Boot 3.3 CDS support, Spring AOT, GraalVM native image and CRaC each give you.</description><pubDate>Tue, 17 Sep 2024 00:00:00 GMT</pubDate></item><item><title>tmux on remote machines: sessions, a short config and a project script</title><link>https://yanshuai.name/blog/tmux-remote-sessions/</link><guid isPermaLink="true">https://yanshuai.name/blog/tmux-remote-sessions/</guid><description>How I use tmux on Pis and servers over SSH: sessions that survive a dropped connection, the keys I use, a short config, and a 20-line script that opens the same window layout for every project.</description><pubDate>Tue, 09 Jul 2024 00:00:00 GMT</pubDate></item><item><title>Virtual threads in Spring Boot 3.2: what to check before you turn them on</title><link>https://yanshuai.name/blog/java21-virtual-threads-spring-boot/</link><guid isPermaLink="true">https://yanshuai.name/blog/java21-virtual-threads-spring-boot/</guid><description>One property switches a Spring Boot app to virtual threads. This post explains where they help, where they do not, and the pitfalls: pinning, connection pools and ThreadLocal.</description><pubDate>Tue, 21 May 2024 00:00:00 GMT</pubDate></item><item><title>Llama 3 8B with Ollama on my own machine</title><link>https://yanshuai.name/blog/llama3-ollama-local/</link><guid isPermaLink="true">https://yanshuai.name/blog/llama3-ollama-local/</guid><description>Meta released Llama 3 in 8B and 70B sizes. How to run the 8B model with Ollama, call it from code, and what hardware you really need.</description><pubDate>Thu, 25 Apr 2024 00:00:00 GMT</pubDate></item><item><title>Docker Compose: wait for a healthy database, not a started one</title><link>https://yanshuai.name/blog/compose-healthcheck-depends-on/</link><guid isPermaLink="true">https://yanshuai.name/blog/compose-healthcheck-depends-on/</guid><description>depends_on alone only waits for a container to start. Use a healthcheck and condition: service_healthy so your app starts after the database is ready.</description><pubDate>Tue, 19 Mar 2024 00:00:00 GMT</pubDate></item><item><title>Choosing a garbage collector for a Spring Boot service: G1, generational ZGC or Parallel</title><link>https://yanshuai.name/blog/choosing-gc-spring-boot/</link><guid isPermaLink="true">https://yanshuai.name/blog/choosing-gc-spring-boot/</guid><description>What G1, Parallel, ZGC with the new generational mode in JDK 21, and Shenandoah each optimise for, why heap size comes first, and how to compare collectors with GC logs, JFR and latency percentiles under load.</description><pubDate>Sun, 12 Nov 2023 00:00:00 GMT</pubDate></item><item><title>Branch protection and pull requests for a one-person project</title><link>https://yanshuai.name/blog/github-branch-protection-solo-project/</link><guid isPermaLink="true">https://yanshuai.name/blog/github-branch-protection-solo-project/</guid><description>Why I protect main and open pull requests even when I am the only developer, which settings to turn on, which ones block you when you work alone, and classic branch protection vs the new repository rulesets.</description><pubDate>Sat, 23 Sep 2023 00:00:00 GMT</pubDate></item><item><title>JMH microbenchmarks without fooling yourself</title><link>https://yanshuai.name/blog/jmh-microbenchmarks/</link><guid isPermaLink="true">https://yanshuai.name/blog/jmh-microbenchmarks/</guid><description>Why a loop with System.nanoTime gives wrong answers, how to set up JMH 1.36 with Maven, the annotations that matter, how to read the score and error, and when a microbenchmark is the wrong tool.</description><pubDate>Sun, 16 Jul 2023 00:00:00 GMT</pubDate></item><item><title>Cloudflare WARP and Zero Trust: reaching the home LAN without opening ports</title><link>https://yanshuai.name/blog/cloudflare-warp-zero-trust-home-network/</link><guid isPermaLink="true">https://yanshuai.name/blog/cloudflare-warp-zero-trust-home-network/</guid><description>How to route a home subnet through a cloudflared tunnel and reach it from a laptop and a phone with the WARP client: enrollment rules, the proxy setting, split tunnels, and how it compares to a public hostname tunnel and to WireGuard.</description><pubDate>Sat, 17 Jun 2023 00:00:00 GMT</pubDate></item><item><title>Training a custom YOLOv8 model for BirdGuard, from labelling to evaluation</title><link>https://yanshuai.name/blog/yolov8-custom-bird-detector/</link><guid isPermaLink="true">https://yanshuai.name/blog/yolov8-custom-bird-detector/</guid><description>Why the COCO &quot;bird&quot; class was not enough for my feeder camera, and the full path I followed to a custom YOLOv8 model: collecting frames, labelling, dataset layout, a split by day, training with ultralytics 8.0, reading the metrics, and export to ONNX.</description><pubDate>Sat, 22 Apr 2023 00:00:00 GMT</pubDate></item><item><title>Finding why a Java service is slow: JFR, Mission Control and async-profiler</title><link>https://yanshuai.name/blog/java-profiling-jfr-async-profiler/</link><guid isPermaLink="true">https://yanshuai.name/blog/java-profiling-jfr-async-profiler/</guid><description>How I profile a slow Spring Boot service: start a JFR recording on a running JVM, read it in JDK Mission Control, then use async-profiler flame graphs for CPU, allocation and wall-clock time, also inside containers.</description><pubDate>Sat, 18 Mar 2023 00:00:00 GMT</pubDate></item><item><title>Replacing cron jobs with systemd timers</title><link>https://yanshuai.name/blog/systemd-timers-instead-of-cron/</link><guid isPermaLink="true">https://yanshuai.name/blog/systemd-timers-instead-of-cron/</guid><description>How to replace a cron job with a systemd timer, why missed runs and logs are better with timers, and when cron is still the simpler choice.</description><pubDate>Sat, 25 Feb 2023 00:00:00 GMT</pubDate></item><item><title>A small Rust CLI with clap 4 derive</title><link>https://yanshuai.name/blog/rust-cli-clap-derive/</link><guid isPermaLink="true">https://yanshuai.name/blog/rust-cli-clap-derive/</guid><description>The minimal setup for a Rust command-line tool with clap 4: arguments, subcommands, defaults and good error messages.</description><pubDate>Sat, 11 Feb 2023 00:00:00 GMT</pubDate></item><item><title>YOLOv8 on a CPU: export to ONNX and run without PyTorch</title><link>https://yanshuai.name/blog/yolov8-onnx-runtime-cpu/</link><guid isPermaLink="true">https://yanshuai.name/blog/yolov8-onnx-runtime-cpu/</guid><description>Ultralytics released YOLOv8 in January 2023. How to export a YOLOv8 detection model to ONNX and run it with ONNX Runtime and OpenCV, including letterbox resize, output decoding and NMS.</description><pubDate>Sat, 28 Jan 2023 00:00:00 GMT</pubDate></item><item><title>Full-text search for test logs with Elasticsearch 8</title><link>https://yanshuai.name/blog/elasticsearch-test-log-search/</link><guid isPermaLink="true">https://yanshuai.name/blog/elasticsearch-test-log-search/</guid><description>A small Elasticsearch 8 setup in Docker for searching test results, stack traces and long logs across many runs: index design, an analyzer that keeps class names and error codes searchable, bulk indexing from Python, queries, and when PostgreSQL full-text search is enough.</description><pubDate>Thu, 24 Nov 2022 00:00:00 GMT</pubDate></item><item><title>Grouping test failures across runs with error fingerprints and Pandas</title><link>https://yanshuai.name/blog/test-failure-fingerprints-pandas/</link><guid isPermaLink="true">https://yanshuai.name/blog/test-failure-fingerprints-pandas/</guid><description>How I pull test results out of Azure DevOps, turn each error message into a short fingerprint, store it in PostgreSQL and use Pandas and Plotly to see which failures are new, which are old and which tests are flaky.</description><pubDate>Thu, 27 Oct 2022 00:00:00 GMT</pubDate></item><item><title>MQTT retained messages and last will: knowing when a sensor is gone</title><link>https://yanshuai.name/blog/mqtt-retained-last-will/</link><guid isPermaLink="true">https://yanshuai.name/blog/mqtt-retained-last-will/</guid><description>How retained messages and the last will work in MQTT, how to combine them into an online/offline status, and the traps with stale retained values.</description><pubDate>Sat, 15 Oct 2022 00:00:00 GMT</pubDate></item><item><title>CPU inference with ONNX Runtime in Python</title><link>https://yanshuai.name/blog/onnx-runtime-cpu-inference-python/</link><guid isPermaLink="true">https://yanshuai.name/blog/onnx-runtime-cpu-inference-python/</guid><description>How to export a PyTorch image model to ONNX, run it with ONNX Runtime on a CPU-only server or a Raspberry Pi, and avoid the common preprocessing and threading mistakes.</description><pubDate>Sat, 24 Sep 2022 00:00:00 GMT</pubDate></item><item><title>Running a Selenium regression suite in Azure DevOps pipelines</title><link>https://yanshuai.name/blog/selenium-azure-devops-pipeline/</link><guid isPermaLink="true">https://yanshuai.name/blog/selenium-azure-devops-pipeline/</guid><description>A YAML pipeline that builds and runs a C# Selenium suite with headless Chrome, keeps ChromeDriver in step with the agent, publishes TRX results with failure screenshots, and reruns failed tests without hiding them.</description><pubDate>Wed, 24 Aug 2022 00:00:00 GMT</pubDate></item><item><title>Basic rate limiting in nginx for a small API</title><link>https://yanshuai.name/blog/nginx-rate-limiting/</link><guid isPermaLink="true">https://yanshuai.name/blog/nginx-rate-limiting/</guid><description>A short limit_req setup for a self-hosted API or login page, with the two settings people usually get wrong.</description><pubDate>Sat, 13 Aug 2022 00:00:00 GMT</pubDate></item><item><title>Stop using Thread.Sleep: fixing flaky Selenium tests with dynamic waits in C#</title><link>https://yanshuai.name/blog/selenium-dynamic-waits-csharp/</link><guid isPermaLink="true">https://yanshuai.name/blog/selenium-dynamic-waits-csharp/</guid><description>Why fixed sleeps make UI tests on a Power Apps portal both slow and flaky, and how to replace them with WebDriverWait, small custom conditions and a reusable wait helper in Selenium 4 for .NET.</description><pubDate>Wed, 27 Jul 2022 00:00:00 GMT</pubDate></item><item><title>Moving from docker-compose to docker compose (Compose V2)</title><link>https://yanshuai.name/blog/docker-compose-v2-migration/</link><guid isPermaLink="true">https://yanshuai.name/blog/docker-compose-v2-migration/</guid><description>Compose V2 is now generally available. How to install it on a Linux server and a Raspberry Pi, and the small differences that can break your scripts.</description><pubDate>Sat, 14 May 2022 00:00:00 GMT</pubDate></item><item><title>My checklist for a new headless Raspberry Pi</title><link>https://yanshuai.name/blog/raspberry-pi-headless-checklist/</link><guid isPermaLink="true">https://yanshuai.name/blog/raspberry-pi-headless-checklist/</guid><description>The steps every new Pi gets: a user and SSH set up before the first boot, key-only logins, a service user, one venv per project, a systemd unit for the Python script, and a size limit for the journal.</description><pubDate>Sun, 10 Apr 2022 00:00:00 GMT</pubDate></item><item><title>Moving a server Pi to the 64-bit Raspberry Pi OS</title><link>https://yanshuai.name/blog/raspberry-pi-os-64-bit/</link><guid isPermaLink="true">https://yanshuai.name/blog/raspberry-pi-os-64-bit/</guid><description>The 64-bit Raspberry Pi OS left beta in February 2022. Which boards can use it, who should move, and the steps for a server Pi.</description><pubDate>Sat, 12 Feb 2022 00:00:00 GMT</pubDate></item><item><title>Booting a Raspberry Pi 4 from a USB SSD</title><link>https://yanshuai.name/blog/pi4-usb-ssd-boot/</link><guid isPermaLink="true">https://yanshuai.name/blog/pi4-usb-ssd-boot/</guid><description>Why an SSD is a good upgrade for a Pi 4 that runs all the time, how to set it up, and which USB adapters cause trouble.</description><pubDate>Sat, 29 Jan 2022 00:00:00 GMT</pubDate></item><item><title>raspistill is gone in Bullseye: moving camera scripts to libcamera-apps</title><link>https://yanshuai.name/blog/bullseye-libcamera-apps/</link><guid isPermaLink="true">https://yanshuai.name/blog/bullseye-libcamera-apps/</guid><description>Bullseye replaces the old Raspberry Pi camera stack with libcamera. How the new commands map to raspistill and raspivid, how to stream to ffmpeg, what breaks (picamera, /dev/video0), and when to stay on Buster.</description><pubDate>Sat, 27 Nov 2021 00:00:00 GMT</pubDate></item><item><title>Python 3.10 match/case for routing MQTT messages, and its traps</title><link>https://yanshuai.name/blog/python-310-match-mqtt-topics/</link><guid isPermaLink="true">https://yanshuai.name/blog/python-310-match-mqtt-topics/</guid><description>Structural pattern matching arrived in Python 3.10. A practical example that routes MQTT topics and payloads, plus the pitfalls with capture patterns and when a dict of handlers is still better.</description><pubDate>Sat, 16 Oct 2021 00:00:00 GMT</pubDate></item><item><title>Laying out Docker Compose stacks on a home server</title><link>https://yanshuai.name/blog/home-lab-compose-stacks-under-srv/</link><guid isPermaLink="true">https://yanshuai.name/blog/home-lab-compose-stacks-under-srv/</guid><description>One directory per stack under /srv, data next to the compose file, secrets in .env. A simple layout that makes backups and moving to a new machine easy.</description><pubDate>Sat, 14 Aug 2021 00:00:00 GMT</pubDate></item><item><title>Flux queries for InfluxDB 2: the ones my dashboards need</title><link>https://yanshuai.name/blog/influxdb-2-flux-in-practice/</link><guid isPermaLink="true">https://yanshuai.name/blog/influxdb-2-flux-in-practice/</guid><description>After some months with InfluxDB 2, the Flux patterns I use for sensor data: Grafana variables, pivot, map for unit conversion, joining two measurements, and a downsampling task.</description><pubDate>Sat, 15 May 2021 00:00:00 GMT</pubDate></item><item><title>Publishing a home Grafana through a Cloudflare Tunnel, without port forwarding</title><link>https://yanshuai.name/blog/cloudflare-tunnel-free-grafana/</link><guid isPermaLink="true">https://yanshuai.name/blog/cloudflare-tunnel-free-grafana/</guid><description>Cloudflare made its Tunnel (formerly Argo Tunnel) free for everyone. How to publish a home Grafana with a named tunnel and an ingress config, and what to protect before you do it.</description><pubDate>Sat, 24 Apr 2021 00:00:00 GMT</pubDate></item><item><title>Java var and records: rules that keep the code readable</title><link>https://yanshuai.name/blog/java-var-and-records/</link><guid isPermaLink="true">https://yanshuai.name/blog/java-var-and-records/</guid><description>var (Java 10) and records (final in Java 16) both cut boilerplate. Where each one fits, where it makes code harder to read, and the traps I hit with both.</description><pubDate>Sat, 27 Mar 2021 00:00:00 GMT</pubDate></item><item><title>From InfluxDB 1.x to 2.0: orgs, buckets, tokens and Flux</title><link>https://yanshuai.name/blog/influxdb-2-from-1x/</link><guid isPermaLink="true">https://yanshuai.name/blog/influxdb-2-from-1x/</guid><description>InfluxDB 2.0 reached general availability. The new concepts (orgs, buckets, tokens, Flux), how Telegraf and Grafana connect, how to upgrade, and why my own Pi stays on 1.8 for now.</description><pubDate>Wed, 18 Nov 2020 00:00:00 GMT</pubDate></item><item><title>A simple GitHub Actions CI for a small Python project</title><link>https://yanshuai.name/blog/github-actions-python-ci/</link><guid isPermaLink="true">https://yanshuai.name/blog/github-actions-python-ci/</guid><description>One workflow file that runs lint and tests on several Python versions with pip caching, plus the set-env change you need to know about this month.</description><pubDate>Wed, 14 Oct 2020 00:00:00 GMT</pubDate></item><item><title>ffmpeg with an IP camera: snapshots, 5-minute recordings and clips</title><link>https://yanshuai.name/blog/ffmpeg-camera-recordings/</link><guid isPermaLink="true">https://yanshuai.name/blog/ffmpeg-camera-recordings/</guid><description>The ffmpeg commands I use with an RTSP camera: one JPEG per minute, continuous recording into 5-minute files under systemd, and cutting a clip out of a recording without re-encoding.</description><pubDate>Wed, 16 Sep 2020 00:00:00 GMT</pubDate></item><item><title>Smaller Docker rebuilds for Spring Boot 2.3 with layered jars</title><link>https://yanshuai.name/blog/spring-boot-layered-jars-docker/</link><guid isPermaLink="true">https://yanshuai.name/blog/spring-boot-layered-jars-docker/</guid><description>Spring Boot 2.3 can split a fat jar into layers. How to enable it, write the Dockerfile, and when buildpacks are the better choice.</description><pubDate>Wed, 26 Aug 2020 00:00:00 GMT</pubDate></item><item><title>Running YOLOv4 with the OpenCV DNN module on a CPU</title><link>https://yanshuai.name/blog/yolov4-opencv-dnn-cpu/</link><guid isPermaLink="true">https://yanshuai.name/blog/yolov4-opencv-dnn-cpu/</guid><description>How to run YOLOv4 and YOLOv4-tiny with OpenCV 4.4 in Python, without Darknet or a GPU, how I pick input size and thresholds, and when this is too slow.</description><pubDate>Wed, 19 Aug 2020 00:00:00 GMT</pubDate></item><item><title>Docker on a Raspberry Pi 4: install, Compose, and the ARM image problem</title><link>https://yanshuai.name/blog/docker-on-raspberry-pi-arm-images/</link><guid isPermaLink="true">https://yanshuai.name/blog/docker-on-raspberry-pi-arm-images/</guid><description>How to install Docker and docker-compose on Raspbian Buster, and how to check that an image really supports 32-bit ARM before you build a stack on it.</description><pubDate>Wed, 15 Apr 2020 00:00:00 GMT</pubDate></item><item><title>Porting my last Python 2 scripts to Python 3</title><link>https://yanshuai.name/blog/python2-to-python3-checklist/</link><guid isPermaLink="true">https://yanshuai.name/blog/python2-to-python3-checklist/</guid><description>Python 2 reached end of life on 1 January 2020. How I find and port the small Python 2 scripts that still run on Raspberry Pi and Linux servers.</description><pubDate>Wed, 08 Jan 2020 00:00:00 GMT</pubDate></item><item><title>A small port checker with Rust async/await and Tokio 0.2</title><link>https://yanshuai.name/blog/rust-async-await-tokio-02/</link><guid isPermaLink="true">https://yanshuai.name/blog/rust-async-await-tokio-02/</guid><description>Rust 1.39 stabilized async/await and Tokio 0.2 is built on it. A small program that checks many hosts at once, and the things that confused me while writing it.</description><pubDate>Wed, 11 Dec 2019 00:00:00 GMT</pubDate></item><item><title>f-strings, dataclasses and the walrus operator: Python 3.6 to 3.8 in my scripts</title><link>https://yanshuai.name/blog/python-36-to-38-features/</link><guid isPermaLink="true">https://yanshuai.name/blog/python-36-to-38-features/</guid><description>Three Python releases, three features that changed how my scripts look. How each works, the traps I hit, and the places where I still do not use them.</description><pubDate>Tue, 22 Oct 2019 00:00:00 GMT</pubDate></item><item><title>WireGuard on a home server: reaching my Pis from outside</title><link>https://yanshuai.name/blog/wireguard-home-server/</link><guid isPermaLink="true">https://yanshuai.name/blog/wireguard-home-server/</guid><description>How I set up WireGuard on an Ubuntu 18.04 home server to reach Grafana and the Raspberry Pis on my home network from a laptop and a phone, and what to watch out for.</description><pubDate>Wed, 18 Sep 2019 00:00:00 GMT</pubDate></item><item><title>Raspberry Pi 4 for headless projects: power, USB-C cables and heat</title><link>https://yanshuai.name/blog/raspberry-pi-4-power-and-heat/</link><guid isPermaLink="true">https://yanshuai.name/blog/raspberry-pi-4-power-and-heat/</guid><description>The Raspberry Pi 4 is much faster than the 3 B+, but it needs more care with power and cooling. Notes on the USB-C cable problem, throttling, and where I would use it.</description><pubDate>Wed, 17 Jul 2019 00:00:00 GMT</pubDate></item><item><title>Moving headless Pis to Raspbian Buster with a fresh install</title><link>https://yanshuai.name/blog/raspbian-buster-fresh-install/</link><guid isPermaLink="true">https://yanshuai.name/blog/raspbian-buster-fresh-install/</guid><description>Raspbian Buster came out together with the Raspberry Pi 4. The Raspberry Pi team does not recommend upgrading from Stretch. How I plan to move headless Pis to a fresh image.</description><pubDate>Fri, 28 Jun 2019 00:00:00 GMT</pubDate></item><item><title>Moving a small crate to the Rust 2018 edition</title><link>https://yanshuai.name/blog/rust-2018-edition/</link><guid isPermaLink="true">https://yanshuai.name/blog/rust-2018-edition/</guid><description>Rust 1.31 shipped the Rust 2018 edition. What an edition is, what is different in daily code, and how to move a crate with cargo fix.</description><pubDate>Wed, 12 Dec 2018 00:00:00 GMT</pubDate></item><item><title>Grafana behind nginx with Let&apos;s Encrypt on Ubuntu 18.04</title><link>https://yanshuai.name/blog/nginx-lets-encrypt-grafana/</link><guid isPermaLink="true">https://yanshuai.name/blog/nginx-lets-encrypt-grafana/</guid><description>Put Grafana behind an nginx reverse proxy with a free TLS certificate from Let&apos;s Encrypt, with automatic renewal and the settings Grafana needs.</description><pubDate>Wed, 12 Sep 2018 00:00:00 GMT</pubDate></item><item><title>MQTT sensor data into InfluxDB with Telegraf, on a Raspberry Pi</title><link>https://yanshuai.name/blog/telegraf-influxdb-on-raspberry-pi/</link><guid isPermaLink="true">https://yanshuai.name/blog/telegraf-influxdb-on-raspberry-pi/</guid><description>Telegraf&apos;s mqtt_consumer instead of a home-made bridge script, InfluxDB 1.x on a Raspberry Pi with a retention policy, and the tag, test and SD card mistakes to avoid.</description><pubDate>Wed, 09 May 2018 00:00:00 GMT</pubDate></item><item><title>REPL-driven Clojure in Emacs with CIDER and Leiningen</title><link>https://yanshuai.name/blog/clojure-repl-emacs-cider/</link><guid isPermaLink="true">https://yanshuai.name/blog/clojure-repl-emacs-cider/</guid><description>My setup for writing Clojure from Emacs: Leiningen, cider-jack-in, evaluating forms in the buffer, keeping state in an atom, reloading namespaces, and the stale-code pitfalls.</description><pubDate>Sun, 29 Oct 2017 00:00:00 GMT</pubDate></item><item><title>Clojure macros: code is data, and when not to write one</title><link>https://yanshuai.name/blog/clojure-macros-when-not-to/</link><guid isPermaLink="true">https://yanshuai.name/blog/clojure-macros-when-not-to/</guid><description>How Lisp code is just lists, a small timing macro built step by step with syntax-quote, unquote and gensyms, how to debug it with macroexpand, and why functions come first.</description><pubDate>Sun, 20 Aug 2017 00:00:00 GMT</pubDate></item><item><title>Clojure persistent collections: why immutable does not mean slow</title><link>https://yanshuai.name/blog/clojure-persistent-collections/</link><guid isPermaLink="true">https://yanshuai.name/blog/clojure-persistent-collections/</guid><description>How Clojure vectors and maps share structure with 32-way tries, what &quot;effectively O(1)&quot; means, when to use transients, and where you really pay a cost.</description><pubDate>Sun, 18 Jun 2017 00:00:00 GMT</pubDate></item><item><title>Keras 2 and transfer learning for a small image classifier</title><link>https://yanshuai.name/blog/keras-2-transfer-learning/</link><guid isPermaLink="true">https://yanshuai.name/blog/keras-2-transfer-learning/</guid><description>What changed in Keras 2.0, and how I train a small image classifier on my own camera photos with a pretrained VGG16 and little data.</description><pubDate>Sun, 26 Mar 2017 00:00:00 GMT</pubDate></item><item><title>Git rebase or merge: the rules we use in a small team</title><link>https://yanshuai.name/blog/git-rebase-vs-merge-small-team/</link><guid isPermaLink="true">https://yanshuai.name/blog/git-rebase-vs-merge-small-team/</guid><description>When to rebase and when to merge in a small team, the commands I use, and the one rule that keeps shared history safe.</description><pubDate>Sun, 13 Nov 2016 00:00:00 GMT</pubDate></item><item><title>Free HTTPS with Let&apos;s Encrypt, certbot and nginx</title><link>https://yanshuai.name/blog/certbot-nginx-webroot/</link><guid isPermaLink="true">https://yanshuai.name/blog/certbot-nginx-webroot/</guid><description>Getting a Let&apos;s Encrypt certificate with certbot in webroot mode, configuring nginx for HTTPS, and automatic renewal on Debian Jessie.</description><pubDate>Sun, 22 May 2016 00:00:00 GMT</pubDate></item><item><title>rsync backups with daily snapshots (--link-dest)</title><link>https://yanshuai.name/blog/rsync-link-dest-snapshots/</link><guid isPermaLink="true">https://yanshuai.name/blog/rsync-link-dest-snapshots/</guid><description>The rsync options I use to back up a small server, why a mirror is not enough, and a --link-dest script that keeps dated snapshots and survives a failed run.</description><pubDate>Sun, 24 Apr 2016 00:00:00 GMT</pubDate></item><item><title>Org-mode as an engineering notebook: a simple file layout</title><link>https://yanshuai.name/blog/org-mode-engineering-notebook/</link><guid isPermaLink="true">https://yanshuai.name/blog/org-mode-engineering-notebook/</guid><description>How I keep project notes, commands and decisions in Emacs Org-mode files so I can find and reuse them later.</description><pubDate>Mon, 13 Jul 2015 00:00:00 GMT</pubDate></item><item><title>A small REST service with Spring Boot 1.2 and Java 8</title><link>https://yanshuai.name/blog/spring-boot-1-2-rest-service/</link><guid isPermaLink="true">https://yanshuai.name/blog/spring-boot-1-2-rest-service/</guid><description>The Spring Boot 1.2 setup I start small JSON APIs from: Maven, @SpringBootApplication, a controller with validation, configuration, Actuator health checks, and running it as a service.</description><pubDate>Mon, 30 Mar 2015 00:00:00 GMT</pubDate></item><item><title>Java 8 streams: the patterns I use and six pitfalls</title><link>https://yanshuai.name/blog/java-8-streams-pitfalls/</link><guid isPermaLink="true">https://yanshuai.name/blog/java-8-streams-pitfalls/</guid><description>Everyday Java 8 stream patterns, and the mistakes that cause exceptions or slow code: toMap duplicates, parallel streams, Optional.get and more.</description><pubDate>Mon, 12 Jan 2015 00:00:00 GMT</pubDate></item><item><title>Running a small Python service in Docker</title><link>https://yanshuai.name/blog/docker-small-python-service/</link><guid isPermaLink="true">https://yanshuai.name/blog/docker-small-python-service/</guid><description>How I package a small Flask service with Docker 1.3/1.4 on one Linux server: Dockerfile, data volume, restart policy, logs, docker exec, and the traps I hit.</description><pubDate>Mon, 15 Dec 2014 00:00:00 GMT</pubDate></item></channel></rss>