From 4a85614028b9bc99c2fbdb680f786e4baa619890 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 14 Feb 2026 22:45:07 +0200 Subject: Update content for html --- about/resources.html | 194 ++--- gemfeed/2008-06-26-perl-poetry.html | 1 + .../2011-05-07-perl-daemon-service-framework.html | 1 + .../2022-05-27-perl-is-still-a-great-choice.html | 1 + ...iling-guprecords:-uptime-records-with-raku.html | 1 + gemfeed/2025-06-22-task-samurai.html | 1 + .../2025-08-05-local-coding-llm-with-ollama.html | 1 + .../2025-11-02-perl-new-features-and-foostats.html | 1 + ...eta-slash-commands-for-prompts-and-context.html | 3 +- ...4-til-meta-slash-commands-for-ai-workflows.html | 110 +++ ...02-15-loadbars-resurrected-from-perl-to-go.html | 253 +++++++ gemfeed/atom.xml | 786 ++++++++++----------- gemfeed/index.html | 2 + .../loadbars.gif | Bin 0 -> 93467 bytes index.html | 4 +- uptime-stats.html | 2 +- 16 files changed, 830 insertions(+), 531 deletions(-) create mode 100644 gemfeed/2026-02-14-til-meta-slash-commands-for-ai-workflows.html create mode 100644 gemfeed/2026-02-15-loadbars-resurrected-from-perl-to-go.html create mode 100644 gemfeed/loadbars-resurrected-from-perl-to-go/loadbars.gif diff --git a/about/resources.html b/about/resources.html index fc8ac3a7..25e9d15b 100644 --- a/about/resources.html +++ b/about/resources.html @@ -50,112 +50,112 @@ In random order:


Technical references



I didn't read them from the beginning to the end, but I am using them to look up things. The books are in random order:


Self-development and soft-skills books



In random order:


Here are notes of mine for some of the books

@@ -164,31 +164,31 @@ Some of these were in-person with exams; others were online learning lectures only. In random order:


Technical guides



These are not whole books, but guides (smaller or larger) which I found very useful. in random order:


Podcasts



@@ -197,31 +197,31 @@ In random order:


Podcasts I liked



I liked them but am not listening to them anymore. The podcasts have either "finished" (no more episodes) or I stopped listening to them due to time constraints or a shift in my interests.


@@ -230,26 +230,26 @@ This is a mix of tech and non-tech newsletters I am subscribed to. In random order:


Magazines I like(d)



This is a mix of tech I like(d). I may not be a current subscriber, but now and then, I buy an issue. In random order:


diff --git a/gemfeed/2008-06-26-perl-poetry.html b/gemfeed/2008-06-26-perl-poetry.html index d54b7210..dcbd8ae7 100644 --- a/gemfeed/2008-06-26-perl-poetry.html +++ b/gemfeed/2008-06-26-perl-poetry.html @@ -196,6 +196,7 @@ This is perl, v5.8.8 built Other related posts are:

+2026-02-14 TIL: Meta slash-commands for reusable AI prompts and context
2025-08-05 Local LLM for Coding with Ollama on macOS (You are currently reading this)
2025-06-22 Task Samurai: An agentic coding learning experiment

diff --git a/gemfeed/2025-11-02-perl-new-features-and-foostats.html b/gemfeed/2025-11-02-perl-new-features-and-foostats.html index 7e3ab9c9..85c36f60 100644 --- a/gemfeed/2025-11-02-perl-new-features-and-foostats.html +++ b/gemfeed/2025-11-02-perl-new-features-and-foostats.html @@ -449,6 +449,7 @@ http://www.gnu.org/software/src-highlite -->
Other related posts are:

+2026-02-15 Loadbars resurrected: From Perl to Go after 15 years
2025-11-02 Perl New Features and Foostats (You are currently reading this)
2023-05-01 Unveiling guprecords.raku: Global Uptime Records with Raku
2022-05-27 Perl is still a great choice
diff --git a/gemfeed/2026-02-14-meta-slash-commands-for-prompts-and-context.html b/gemfeed/2026-02-14-meta-slash-commands-for-prompts-and-context.html index 3e086905..38934e1b 100644 --- a/gemfeed/2026-02-14-meta-slash-commands-for-prompts-and-context.html +++ b/gemfeed/2026-02-14-meta-slash-commands-for-prompts-and-context.html @@ -235,7 +235,8 @@
Other related posts:

-2026-02-14 Meta slash-commands to manage prompts and context (You are currently reading this)
+2026-02-14 TIL: Meta slash-commands for reusable AI prompts and context
+2026-02-14 Meta slash-commands to manage prompts and context for coding agents (You are currently reading this)
2026-02-02 A tmux popup editor for Cursor Agent CLI prompts

E-Mail your comments to paul@nospam.buetow.org :-)
diff --git a/gemfeed/2026-02-14-til-meta-slash-commands-for-ai-workflows.html b/gemfeed/2026-02-14-til-meta-slash-commands-for-ai-workflows.html new file mode 100644 index 00000000..246d1d3f --- /dev/null +++ b/gemfeed/2026-02-14-til-meta-slash-commands-for-ai-workflows.html @@ -0,0 +1,110 @@ + + + + +TIL: Meta slash-commands for reusable AI prompts and context + + + + + +

+Home | Markdown | Gemini +

+

TIL: Meta slash-commands for reusable AI prompts and context


+
+Published at 2026-02-14T14:00:00+02:00
+
+Short post in "This week I learned" style: what I tried, why it worked, and how you can replicate it. Format: Problem → Approach → Copy/paste → Result → Gotchas. Full reference for the meta-commands lives in a separate post.
+
+Full reference: Meta slash-commands to manage prompts and context for coding agents
+
+

TIL


+
+

Problem


+
+When I use a coding agent (Cursor Agent, Claude Code CLI, Ampcode, etc.), I repeat the same requests: "review this function," "explain this error," "add tests for this module," "format this as a blog post." Typing long prompts from scratch is tedious; ad-hoc prompts are easy to forget. I also keep pasting the same background (API conventions, project rules, infra notes) into every session so the agent doesn't guess blindly.
+
+

Approach


+
+Treat prompts and context as first-class artefacts: store them as markdown files (one per slash-command or per context) in a dotfiles repo. Use a small set of *meta* slash-commands so the agent itself creates, updates, and deletes these files from the conversation—no hand-editing. Two kinds of artefacts:
+
+
    +
  • Commands — Reusable workflows (e.g. review-code, explain-error). Live in commands/ as .md files.
  • +
  • Context — Reusable background (API guidelines, runbooks, personas). Live in context/ as .md files; you *load* one at session start so the agent has it in mind.
  • +

+

Copy/paste


+
+Minimal workflow:
+
+
+/load-context api-guidelines
+
+
+Then ask the agent to implement a feature or fix a bug; it already has the guidelines.
+
+To turn something you just did into a reusable command:
+
+
+/create-command review-code
+
+
+Full command reference (all meta-commands, parameters, examples):
+
+Meta slash-commands — full reference
+
+

Result


+
+No more retyping long prompts; same prompt library across Cursor Agent, Claude Code CLI, OpenCode, Ampcode. Context is load-on-demand per session instead of pasting walls of text. Everything is versioned in git and synced across machines.
+
+

Gotchas


+
+
    +
  • Requires an agent that supports custom slash-commands (or reading prompt files from disk).
  • +
  • Context is explicit: you must run /load-context <name> at session start; it's not implicit like some "skills" systems.
  • +
  • A flat directory of commands can grow; if it gets unwieldy, consider grouping by skill or exposing via an MCP server later.
  • +

+

Before/After


+
+
    +
  • Before: Retyping or pasting long prompts each time; pasting API/project context into every session; prompts scattered and inconsistent across tools.
  • +
  • After: /load-context <name> once per session; /<command> for repeatable tasks; commands and context in git, same library across agents.
  • +

+

Workflow recipe


+
+
    +
  • Steps: (1) Create or update context/commands via meta-commands when you have something worth reusing. (2) Start a session → run /load-context <name>. (3) Use slash-commands or ask ad-hoc; agent has background and consistent prompts.
  • +
  • Tools: Cursor Agent (CLI), Claude Code CLI, OpenCode, Ampcode; markdown in e.g. ~/Notes/Prompts/commands/ and ~/Notes/Prompts/context/.
  • +
  • Impact: Saves retyping and keeps prompts consistent; one-time cost is creating the first context/command with the agent.
  • +

+

Micro-template (quick reference)


+
+| Meta-command | Purpose | Good for |
+|--------------------|--------------------------------|-------------------------------------------|
+| /create-command | Create new slash-command | Turn current or recurring tasks into one |
+| /update-command | Edit existing slash-command | Refine after use |
+| /delete-command | Remove slash-command file | Clean up unused commands |
+| /create-context | Create new context file | Capture project/infra knowledge once |
+| /update-context | Edit existing context file | Keep context up to date |
+| /delete-context | Remove context file | Remove outdated context |
+| /load-context | Load context into conversation | Give agent background before tasks |
+
+Example usage: /load-context api-guidelines, /create-command review-code, /update-command review-code. Full details and examples in the main post linked above.
+
+Other related posts:
+
+2026-02-14 Meta slash-commands to manage prompts and context for coding agents
+2026-02-02 A tmux popup editor for Cursor Agent CLI prompts
+
+E-Mail your comments to paul@nospam.buetow.org :-)
+
+Back to the main site
+ + + diff --git a/gemfeed/2026-02-15-loadbars-resurrected-from-perl-to-go.html b/gemfeed/2026-02-15-loadbars-resurrected-from-perl-to-go.html new file mode 100644 index 00000000..0c530143 --- /dev/null +++ b/gemfeed/2026-02-15-loadbars-resurrected-from-perl-to-go.html @@ -0,0 +1,253 @@ + + + + +Loadbars resurrected: From Perl to Go after 15 years + + + + + +

+Home | Markdown | Gemini +

+

Loadbars resurrected: From Perl to Go after 15 years


+
+Published at 2026-02-14T22:43:27+02:00
+
+Who remembers Loadbars? The small, humble server load monitoring tool I wrote back in November 2010 as a Perl+SDL project during my first job after graduating from university as a Linux Sysadmin. That was over 15 years ago. After being effectively dead for more than a decade, Loadbars is working again -- rewritten in Go from Perl with the help of AI (Claude Code), and it even works on macOS now (as a client).
+
+Loadbars in action
+
+Loadbars on Codeberg
+
+

Table of Contents


+
+
+

What Loadbars is (and isn't)


+
+Loadbars is a real-time server load monitoring tool. It connects to one or more Linux hosts via SSH and shows CPU, memory, and network usage as vertical colored bars in an SDL window. You can also run it locally without SSH. It shows the current state only -- like top or vmstat, but visual and across multiple hosts at once. All you need is a working SSH connection through an SSH Agent.
+
+It is not a tool for collecting loads and drawing graphs for later analysis. There is no history, no recording, no database. Tools like Prometheus or Grafana require significant setup time before producing results. Loadbars lets you observe the current state immediately. You install one binary, point it at your servers, and see what's happening right now.
+
+
+┌─ Loadbars 0.9.0 ──────────────────────────────────────────┐
+│                                                           │
+│  ████  ████  ████  ██  ████  ████  ████  ██  ░░██  ░░██   │
+│  ████  ████  ████  ██  ████  ████  ████  ██  ░░██  ░░██   │
+│  ████  ████  ████  ██  ████  ████  ████  ██  ░░██  ░░██   │
+│  ████  ████  ████  ██  ████  ████  ████  ██  ░░██  ░░██   │
+│  ████  ████  ████  ██  ████  ████  ████  ██  ░░██  ░░██   │
+│  ▓▓▓▓  ▓▓▓▓  ▓▓▓▓  ▓▓  ▓▓▓▓  ▓▓▓▓  ▓▓▓▓  ▓▓  ░░▓▓  ░░▓▓   │
+│   CPU   cpu0  cpu1  mem  CPU   cpu0  cpu1  mem  net   net │
+│  └──── host1 ────┘      └──── host2 ────┘                 │
+└───────────────────────────────────────────────────────────┘
+
+
+

Why the rewrite was necessary


+
+I'd have liked to have kept the Perl version. Perl was the first language I learned properly, and I have a soft spot for it. But there was an (for me) unresolvable multithreading issue related to recent Perl and SDL library versions. Perl's ithreads and SDL doesn't work reliably anymore, and debugging decade-old thread-safety issues in XS bindings is not a productive use of time.
+
+I actually tried to fix the Perl version first. I had Claude Code (CLI, running Opus 5.3) attempt to resolve the segfault involving Perl's multi-threading and SDL. It couldn't—the issue is deep in the XS bindings and not something you can fix from Perl-land (nor did I want to invest my own time in it either). So the more pragmatic thing to do was to let Claude Code rewrite the whole thing in Go instead. That worked without any major issues. The Go version is cleaner, faster to build, easier to deploy (single static binary), and now has proper unit tests.
+
+The important thing: for the user, nothing changes. The rewrite's usage, look, and feel are de-facto identical to the old Perl version. The same hotkeys, the same bar layout, the same colors, the same config file format. If you used Loadbars ten years ago, you can pick up the new version and everything works exactly as you remember. The only difference is under the hood.
+
+

A brief history


+
+The first commit is from November 5, 2010—over 13 years ago. Back then, it was called cpuload and was a quick Perl+SDL hack I wrote at work to keep an eye on a fleet of Linux servers. It grew into Loadbars over the following weeks, gaining memory and network monitoring, ClusterSSH integration, and a config file. The last meaningful Perl development was around 2013. Around that time, there were already a couple of colleagues who used Loadbars frequently. But then I changed my job role and later even jobs, and I stopped development of Loadbars.
+
+For the next decade, it sat dormant. I occasionally thought about reviving it, but Perl+SDL threading issues made it impractical. In February 2026, I finally sat down with Claude Code and let it rewrite the whole thing in Go in a single session.
+
+

Features


+
+

CPU monitoring


+
+CPU usage is shown as vertical colored bars. Each bar is stacked from bottom to top with the following segments:
+
+
    +
  • System (blue) -- kernel CPU time
  • +
  • User (yellow) -- user-space CPU time; turns dark yellow above 50%, orange above 70%
  • +
  • Nice (green) -- low-priority user processes
  • +
  • Idle (black) -- unused CPU
  • +
  • IOwait (purple) -- waiting for disk I/O
  • +
  • IRQ / SoftIRQ (white) -- interrupt handling
  • +
  • Guest (red) -- time spent running virtual CPUs
  • +
  • Steal (red) -- time stolen by the hypervisor
  • +

+Press 1 to toggle between one aggregate bar per host and one bar per core. Press e for extended mode, which adds a 1px peak line showing the maximum system+user percentage over the last N samples.
+
+

Memory monitoring


+
+Press 2 to toggle memory bars. Each host gets one bar split in two halves:
+
+
    +
  • Left half: RAM usage (dark grey = used, black = free)
  • +
  • Right half: Swap usage (grey = used, black = free)
  • +

+

Network monitoring


+
+Press 3 to toggle network bars. Loadbars sums RX and TX bytes across all non-loopback interfaces (e.g. eth0, wlan0, enp0s3) and shows the combined total. Loopback (lo) is always excluded. Each net bar has two halves:
+
+
    +
  • Left half: RX (received) growing from the top (light green)
  • +
  • Right half: TX (transmitted) growing from the bottom (light green)
  • +

+Network utilization is shown as a percentage of the configured link speed. The default link speed is gbit (1 Gbps). Change it with --netlink or in the config file. Press f/v to scale the link speed up or down during runtime (cycles through mbit, 10mbit, 100mbit, gbit, 10gbit).
+
+If the net bar is red, it means no non-loopback interface was found on that host.
+
+

All hotkeys


+
+
+Key     Action
+─────   ──────────────────────────────────────────────────
+1       Toggle CPU cores (aggregate vs per-core bars)
+2       Toggle memory bars
+3       Toggle network bars (aggregated across interfaces)
+e       Toggle extended display (peak line on CPU bars)
+h       Print hotkey list to stdout
+q       Quit
+w       Write current settings to ~/.loadbarsrc
+a / y   Increase / decrease CPU average samples
+d / c   Increase / decrease net average samples
+f / v   Link scale up / down (net utilization reference)
+Arrows  Resize window (left/right: width, up/down: height)
+
+
+

SSH and multi-host support


+
+Loadbars connects to remote hosts via SSH using public key authentication. No agent or special setup is needed on the remote side -- Loadbars embeds a small bash script in the binary and runs it via bash -s over SSH. The remote hosts only need bash and /proc (i.e. Linux).
+
+
+loadbars --hosts server1,server2,server3
+
+loadbars --hosts root@server1,root@server2
+
+loadbars servername{01..50}.example.com --showcores 1
+
+
+Shell brace expansion works for specifying ranges of hosts. You can also use ClusterSSH cluster definitions from /etc/clusters:
+
+
+loadbars --cluster production
+
+
+When no hosts are given, Loadbars runs locally on localhost without SSH.
+
+

Config file


+
+Loadbars reads ~/.loadbarsrc on startup. Any option from --help can be set there without the leading --. Comments use #. Press w during runtime to write the current settings to the config file.
+
+
+showcores=1
+showmem=1
+shownet=1
+extended=1
+netlink=gbit
+cpuaverage=10
+netaverage=15
+height=150
+barwidth=1200
+
+
+

macOS support


+
+macOS is supported as a client for monitoring remote Linux servers via SSH. Local monitoring on macOS is not supported because it requires the /proc filesystem. The SDL window is automatically brought to the foreground on macOS.
+
+

Building from source


+
+Loadbars requires Go 1.25+ and SDL2. Install the SDL2 development libraries for your platform:
+
+
+# Fedora / RHEL / CentOS
+sudo dnf install SDL2-devel
+
+# macOS
+brew install sdl2
+
+
+Then build with Mage (recommended) or plain Go:
+
+
+mage build
+./loadbars --hosts localhost
+
+# or without Mage:
+go build -o loadbars ./cmd/loadbars
+
+
+Install to ~/go/bin:
+
+
+mage install
+
+
+Run tests:
+
+
+mage test
+# or: go test ./...
+
+
+

Tested platforms


+
+
    +
  • Fedora Linux 43 and most modern Linux distributions (RHEL, CentOS, Ubuntu, Debian, etc.)
  • +
  • macOS (Darwin) as a client connecting to remote Linux servers via SSH
  • +

+Remote hosts must be Linux with /proc and bash.
+
+

Future-proof with Go


+
+One of the reasons I chose Go for the rewrite is Go's compatibility promise. The Go 1 compatibility guarantee means that code written today will continue to compile and work with future Go releases. No more bitrotted XS bindings, no more ithreads headaches, no more hunting for compatible versions of SDL Perl modules.
+
+The Go SDL2 bindings (go-sdl2) are actively maintained, and SDL2 itself is a stable, well-supported library. The entire application compiles to a single static binary with no runtime dependencies beyond SDL2. Deploy it anywhere, run it for years.
+
+

The AI rewrite experience


+
+This resurrection would not have been really possible without the help of AI. The rewrite was done with Claude Code CLI (Anthropic's coding agent) running Claude Opus 5.3. I pointed it at the Perl source, and let it produce the Go equivalent. The process was surprisingly smooth -- the rewrite worked without any major issues. There were some minor bugs (such as network bars not showing up initially, and/or some pixel errors in the bars), but they were sorted by Claude by providing screenshots of the problems.
+
+E-Mail your comments to paul@nospam.buetow.org :-)
+
+Other related posts:
+
+2026-02-15 Loadbars resurrected: From Perl to Go after 15 years (You are currently reading this)
+2025-11-02 Perl New Features and Foostats
+2025-09-14 Bash Golf Part 4
+2025-03-05 Sharing on Social Media with Gos v1.0.0
+2024-03-03 A fine Fyne Android app for quickly logging ideas programmed in Go
+2023-12-10 Bash Golf Part 3
+2023-06-01 KISS server monitoring with Gogios
+2022-05-27 Perl is still a great choice
+2022-01-01 Bash Golf Part 2
+2021-11-29 Bash Golf Part 1
+2011-05-07 Perl Daemon (Service Framework)
+2008-06-26 Perl Poetry
+
+Back to the main site
+ + + diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index 78173b79..ff77d61a 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,11 +1,358 @@ - 2026-02-14T13:44:46+02:00 + 2026-02-14T22:43:28+02:00 foo.zone feed To be in the .zone! https://foo.zone/ + + Loadbars resurrected: From Perl to Go after 15 years + + https://foo.zone/gemfeed/2026-02-15-loadbars-resurrected-from-perl-to-go.html + 2026-02-14T22:43:27+02:00 + + Paul Buetow aka snonux + paul@dev.buetow.org + + Who remembers Loadbars? The small, humble server load monitoring tool I wrote back in November 2010 as a Perl+SDL project during my first job after graduating from university as a Linux Sysadmin. That was over 15 years ago. After being effectively dead for more than a decade, Loadbars is working again -- rewritten in Go from Perl with the help of AI (Claude Code), and it even works on macOS now (as a client). + +
+

Loadbars resurrected: From Perl to Go after 15 years


+
+Who remembers Loadbars? The small, humble server load monitoring tool I wrote back in November 2010 as a Perl+SDL project during my first job after graduating from university as a Linux Sysadmin. That was over 15 years ago. After being effectively dead for more than a decade, Loadbars is working again -- rewritten in Go from Perl with the help of AI (Claude Code), and it even works on macOS now (as a client).
+
+Loadbars in action
+
+Loadbars on Codeberg
+
+

Table of Contents


+
+
+

What Loadbars is (and isn't)


+
+Loadbars is a real-time server load monitoring tool. It connects to one or more Linux hosts via SSH and shows CPU, memory, and network usage as vertical colored bars in an SDL window. You can also run it locally without SSH. It shows the current state only -- like top or vmstat, but visual and across multiple hosts at once. All you need is a working SSH connection through an SSH Agent.
+
+It is not a tool for collecting loads and drawing graphs for later analysis. There is no history, no recording, no database. Tools like Prometheus or Grafana require significant setup time before producing results. Loadbars lets you observe the current state immediately. You install one binary, point it at your servers, and see what's happening right now.
+
+
+┌─ Loadbars 0.9.0 ──────────────────────────────────────────┐
+│                                                           │
+│  ████  ████  ████  ██  ████  ████  ████  ██  ░░██  ░░██   │
+│  ████  ████  ████  ██  ████  ████  ████  ██  ░░██  ░░██   │
+│  ████  ████  ████  ██  ████  ████  ████  ██  ░░██  ░░██   │
+│  ████  ████  ████  ██  ████  ████  ████  ██  ░░██  ░░██   │
+│  ████  ████  ████  ██  ████  ████  ████  ██  ░░██  ░░██   │
+│  ▓▓▓▓  ▓▓▓▓  ▓▓▓▓  ▓▓  ▓▓▓▓  ▓▓▓▓  ▓▓▓▓  ▓▓  ░░▓▓  ░░▓▓   │
+│   CPU   cpu0  cpu1  mem  CPU   cpu0  cpu1  mem  net   net │
+│  └──── host1 ────┘      └──── host2 ────┘                 │
+└───────────────────────────────────────────────────────────┘
+
+
+

Why the rewrite was necessary


+
+I'd have liked to have kept the Perl version. Perl was the first language I learned properly, and I have a soft spot for it. But there was an (for me) unresolvable multithreading issue related to recent Perl and SDL library versions. Perl's ithreads and SDL doesn't work reliably anymore, and debugging decade-old thread-safety issues in XS bindings is not a productive use of time.
+
+I actually tried to fix the Perl version first. I had Claude Code (CLI, running Opus 5.3) attempt to resolve the segfault involving Perl's multi-threading and SDL. It couldn't—the issue is deep in the XS bindings and not something you can fix from Perl-land (nor did I want to invest my own time in it either). So the more pragmatic thing to do was to let Claude Code rewrite the whole thing in Go instead. That worked without any major issues. The Go version is cleaner, faster to build, easier to deploy (single static binary), and now has proper unit tests.
+
+The important thing: for the user, nothing changes. The rewrite's usage, look, and feel are de-facto identical to the old Perl version. The same hotkeys, the same bar layout, the same colors, the same config file format. If you used Loadbars ten years ago, you can pick up the new version and everything works exactly as you remember. The only difference is under the hood.
+
+

A brief history


+
+The first commit is from November 5, 2010—over 13 years ago. Back then, it was called cpuload and was a quick Perl+SDL hack I wrote at work to keep an eye on a fleet of Linux servers. It grew into Loadbars over the following weeks, gaining memory and network monitoring, ClusterSSH integration, and a config file. The last meaningful Perl development was around 2013. Around that time, there were already a couple of colleagues who used Loadbars frequently. But then I changed my job role and later even jobs, and I stopped development of Loadbars.
+
+For the next decade, it sat dormant. I occasionally thought about reviving it, but Perl+SDL threading issues made it impractical. In February 2026, I finally sat down with Claude Code and let it rewrite the whole thing in Go in a single session.
+
+

Features


+
+

CPU monitoring


+
+CPU usage is shown as vertical colored bars. Each bar is stacked from bottom to top with the following segments:
+
+
    +
  • System (blue) -- kernel CPU time
  • +
  • User (yellow) -- user-space CPU time; turns dark yellow above 50%, orange above 70%
  • +
  • Nice (green) -- low-priority user processes
  • +
  • Idle (black) -- unused CPU
  • +
  • IOwait (purple) -- waiting for disk I/O
  • +
  • IRQ / SoftIRQ (white) -- interrupt handling
  • +
  • Guest (red) -- time spent running virtual CPUs
  • +
  • Steal (red) -- time stolen by the hypervisor
  • +

+Press 1 to toggle between one aggregate bar per host and one bar per core. Press e for extended mode, which adds a 1px peak line showing the maximum system+user percentage over the last N samples.
+
+

Memory monitoring


+
+Press 2 to toggle memory bars. Each host gets one bar split in two halves:
+
+
    +
  • Left half: RAM usage (dark grey = used, black = free)
  • +
  • Right half: Swap usage (grey = used, black = free)
  • +

+

Network monitoring


+
+Press 3 to toggle network bars. Loadbars sums RX and TX bytes across all non-loopback interfaces (e.g. eth0, wlan0, enp0s3) and shows the combined total. Loopback (lo) is always excluded. Each net bar has two halves:
+
+
    +
  • Left half: RX (received) growing from the top (light green)
  • +
  • Right half: TX (transmitted) growing from the bottom (light green)
  • +

+Network utilization is shown as a percentage of the configured link speed. The default link speed is gbit (1 Gbps). Change it with --netlink or in the config file. Press f/v to scale the link speed up or down during runtime (cycles through mbit, 10mbit, 100mbit, gbit, 10gbit).
+
+If the net bar is red, it means no non-loopback interface was found on that host.
+
+

All hotkeys


+
+
+Key     Action
+─────   ──────────────────────────────────────────────────
+1       Toggle CPU cores (aggregate vs per-core bars)
+2       Toggle memory bars
+3       Toggle network bars (aggregated across interfaces)
+e       Toggle extended display (peak line on CPU bars)
+h       Print hotkey list to stdout
+q       Quit
+w       Write current settings to ~/.loadbarsrc
+a / y   Increase / decrease CPU average samples
+d / c   Increase / decrease net average samples
+f / v   Link scale up / down (net utilization reference)
+Arrows  Resize window (left/right: width, up/down: height)
+
+
+

SSH and multi-host support


+
+Loadbars connects to remote hosts via SSH using public key authentication. No agent or special setup is needed on the remote side -- Loadbars embeds a small bash script in the binary and runs it via bash -s over SSH. The remote hosts only need bash and /proc (i.e. Linux).
+
+
+loadbars --hosts server1,server2,server3
+
+loadbars --hosts root@server1,root@server2
+
+loadbars servername{01..50}.example.com --showcores 1
+
+
+Shell brace expansion works for specifying ranges of hosts. You can also use ClusterSSH cluster definitions from /etc/clusters:
+
+
+loadbars --cluster production
+
+
+When no hosts are given, Loadbars runs locally on localhost without SSH.
+
+

Config file


+
+Loadbars reads ~/.loadbarsrc on startup. Any option from --help can be set there without the leading --. Comments use #. Press w during runtime to write the current settings to the config file.
+
+
+showcores=1
+showmem=1
+shownet=1
+extended=1
+netlink=gbit
+cpuaverage=10
+netaverage=15
+height=150
+barwidth=1200
+
+
+

macOS support


+
+macOS is supported as a client for monitoring remote Linux servers via SSH. Local monitoring on macOS is not supported because it requires the /proc filesystem. The SDL window is automatically brought to the foreground on macOS.
+
+

Building from source


+
+Loadbars requires Go 1.25+ and SDL2. Install the SDL2 development libraries for your platform:
+
+
+# Fedora / RHEL / CentOS
+sudo dnf install SDL2-devel
+
+# macOS
+brew install sdl2
+
+
+Then build with Mage (recommended) or plain Go:
+
+
+mage build
+./loadbars --hosts localhost
+
+# or without Mage:
+go build -o loadbars ./cmd/loadbars
+
+
+Install to ~/go/bin:
+
+
+mage install
+
+
+Run tests:
+
+
+mage test
+# or: go test ./...
+
+
+

Tested platforms


+
+
    +
  • Fedora Linux 43 and most modern Linux distributions (RHEL, CentOS, Ubuntu, Debian, etc.)
  • +
  • macOS (Darwin) as a client connecting to remote Linux servers via SSH
  • +

+Remote hosts must be Linux with /proc and bash.
+
+

Future-proof with Go


+
+One of the reasons I chose Go for the rewrite is Go's compatibility promise. The Go 1 compatibility guarantee means that code written today will continue to compile and work with future Go releases. No more bitrotted XS bindings, no more ithreads headaches, no more hunting for compatible versions of SDL Perl modules.
+
+The Go SDL2 bindings (go-sdl2) are actively maintained, and SDL2 itself is a stable, well-supported library. The entire application compiles to a single static binary with no runtime dependencies beyond SDL2. Deploy it anywhere, run it for years.
+
+

The AI rewrite experience


+
+This resurrection would not have been really possible without the help of AI. The rewrite was done with Claude Code CLI (Anthropic's coding agent) running Claude Opus 5.3. I pointed it at the Perl source, and let it produce the Go equivalent. The process was surprisingly smooth -- the rewrite worked without any major issues. There were some minor bugs (such as network bars not showing up initially, and/or some pixel errors in the bars), but they were sorted by Claude by providing screenshots of the problems.
+
+E-Mail your comments to paul@nospam.buetow.org :-)
+
+Other related posts:
+
+2026-02-15 Loadbars resurrected: From Perl to Go after 15 years (You are currently reading this)
+2025-11-02 Perl New Features and Foostats
+2025-09-14 Bash Golf Part 4
+2025-03-05 Sharing on Social Media with Gos v1.0.0
+2024-03-03 A fine Fyne Android app for quickly logging ideas programmed in Go
+2023-12-10 Bash Golf Part 3
+2023-06-01 KISS server monitoring with Gogios
+2022-05-27 Perl is still a great choice
+2022-01-01 Bash Golf Part 2
+2021-11-29 Bash Golf Part 1
+2011-05-07 Perl Daemon (Service Framework)
+2008-06-26 Perl Poetry
+
+Back to the main site
+
+
+
+ + TIL: Meta slash-commands for reusable AI prompts and context + + https://foo.zone/gemfeed/2026-02-14-til-meta-slash-commands-for-ai-workflows.html + 2026-02-14T14:00:00+02:00 + + Paul Buetow aka snonux + paul@dev.buetow.org + + Short post in 'This week I learned' style: what I tried, why it worked, and how you can replicate it. Format: Problem → Approach → Copy/paste → Result → Gotchas. Full reference for the meta-commands lives in a separate post. + +
+

TIL: Meta slash-commands for reusable AI prompts and context


+
+Published at 2026-02-14T14:00:00+02:00
+
+Short post in "This week I learned" style: what I tried, why it worked, and how you can replicate it. Format: Problem → Approach → Copy/paste → Result → Gotchas. Full reference for the meta-commands lives in a separate post.
+
+Full reference: Meta slash-commands to manage prompts and context for coding agents
+
+

TIL


+
+

Problem


+
+When I use a coding agent (Cursor Agent, Claude Code CLI, Ampcode, etc.), I repeat the same requests: "review this function," "explain this error," "add tests for this module," "format this as a blog post." Typing long prompts from scratch is tedious; ad-hoc prompts are easy to forget. I also keep pasting the same background (API conventions, project rules, infra notes) into every session so the agent doesn't guess blindly.
+
+

Approach


+
+Treat prompts and context as first-class artefacts: store them as markdown files (one per slash-command or per context) in a dotfiles repo. Use a small set of *meta* slash-commands so the agent itself creates, updates, and deletes these files from the conversation—no hand-editing. Two kinds of artefacts:
+
+
    +
  • Commands — Reusable workflows (e.g. review-code, explain-error). Live in commands/ as .md files.
  • +
  • Context — Reusable background (API guidelines, runbooks, personas). Live in context/ as .md files; you *load* one at session start so the agent has it in mind.
  • +

+

Copy/paste


+
+Minimal workflow:
+
+
+/load-context api-guidelines
+
+
+Then ask the agent to implement a feature or fix a bug; it already has the guidelines.
+
+To turn something you just did into a reusable command:
+
+
+/create-command review-code
+
+
+Full command reference (all meta-commands, parameters, examples):
+
+Meta slash-commands — full reference
+
+

Result


+
+No more retyping long prompts; same prompt library across Cursor Agent, Claude Code CLI, OpenCode, Ampcode. Context is load-on-demand per session instead of pasting walls of text. Everything is versioned in git and synced across machines.
+
+

Gotchas


+
+
    +
  • Requires an agent that supports custom slash-commands (or reading prompt files from disk).
  • +
  • Context is explicit: you must run /load-context <name> at session start; it's not implicit like some "skills" systems.
  • +
  • A flat directory of commands can grow; if it gets unwieldy, consider grouping by skill or exposing via an MCP server later.
  • +

+

Before/After


+
+
    +
  • Before: Retyping or pasting long prompts each time; pasting API/project context into every session; prompts scattered and inconsistent across tools.
  • +
  • After: /load-context <name> once per session; /<command> for repeatable tasks; commands and context in git, same library across agents.
  • +

+

Workflow recipe


+
+
    +
  • Steps: (1) Create or update context/commands via meta-commands when you have something worth reusing. (2) Start a session → run /load-context <name>. (3) Use slash-commands or ask ad-hoc; agent has background and consistent prompts.
  • +
  • Tools: Cursor Agent (CLI), Claude Code CLI, OpenCode, Ampcode; markdown in e.g. ~/Notes/Prompts/commands/ and ~/Notes/Prompts/context/.
  • +
  • Impact: Saves retyping and keeps prompts consistent; one-time cost is creating the first context/command with the agent.
  • +

+

Micro-template (quick reference)


+
+| Meta-command | Purpose | Good for |
+|--------------------|--------------------------------|-------------------------------------------|
+| /create-command | Create new slash-command | Turn current or recurring tasks into one |
+| /update-command | Edit existing slash-command | Refine after use |
+| /delete-command | Remove slash-command file | Clean up unused commands |
+| /create-context | Create new context file | Capture project/infra knowledge once |
+| /update-context | Edit existing context file | Keep context up to date |
+| /delete-context | Remove context file | Remove outdated context |
+| /load-context | Load context into conversation | Give agent background before tasks |
+
+Example usage: /load-context api-guidelines, /create-command review-code, /update-command review-code. Full details and examples in the main post linked above.
+
+Other related posts:
+
+2026-02-14 Meta slash-commands to manage prompts and context for coding agents
+2026-02-02 A tmux popup editor for Cursor Agent CLI prompts
+
+E-Mail your comments to paul@nospam.buetow.org :-)
+
+Back to the main site
+
+
+
Meta slash-commands to manage prompts and context for coding agents @@ -20,6 +367,8 @@

Meta slash-commands to manage prompts and context for coding agents



+Published at 2026-02-14T13:44:45+02:00
+
I work on many small, repeatable tasks. Instead of retyping the same instructions every time, I want to turn successful prompts into reusable slash-commands and keep background knowledge in loadable context files. This post describes a set of *meta* slash-commands: commands that create, update, and delete other commands and context files. They live as markdown in a dotfiles repo and work with any coding agent that supports slash-commands—Claude Code CLI, Cursor Agent, OpenCode, Ampcode, and others.

@@ -240,7 +589,8 @@
 
Other related posts:

-2026-02-14 Meta slash-commands to manage prompts and context (You are currently reading this)
+2026-02-14 TIL: Meta slash-commands for reusable AI prompts and context
+2026-02-14 Meta slash-commands to manage prompts and context for coding agents (You are currently reading this)
2026-02-02 A tmux popup editor for Cursor Agent CLI prompts

E-Mail your comments to paul@nospam.buetow.org :-)
@@ -4316,6 +4666,7 @@ http://www.gnu.org/software/src-highlite -->
Other related posts are:

+2026-02-15 Loadbars resurrected: From Perl to Go after 15 years
2025-11-02 Perl New Features and Foostats (You are currently reading this)
2023-05-01 Unveiling guprecords.raku: Global Uptime Records with Raku
2022-05-27 Perl is still a great choice
@@ -7358,6 +7709,7 @@ content = "{CODE}"
Other related posts are:

+2026-02-14 TIL: Meta slash-commands for reusable AI prompts and context
2025-08-05 Local LLM for Coding with Ollama on macOS (You are currently reading this)
2025-06-22 Task Samurai: An agentic coding learning experiment

@@ -10431,6 +10783,7 @@ http://www.gnu.org/software/src-highlite -->
Other related posts are:

+2026-02-14 TIL: Meta slash-commands for reusable AI prompts and context
2025-08-05 Local LLM for Coding with Ollama on macOS
2025-06-22 Task Samurai: An agentic coding learning experiment (You are currently reading this)

@@ -18059,435 +18412,6 @@ http://www.gnu.org/software/src-highlite --> 2023-04-01 "Never split the difference" book notes
2023-03-16 "The Pragmatic Programmer" book notes

-Back to the main site
-
- -
- - KISS high-availability with OpenBSD - - https://foo.zone/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.html - 2024-03-30T22:12:56+02:00 - - Paul Buetow aka snonux - paul@dev.buetow.org - - I have always wanted a highly available setup for my personal websites. I could have used off-the-shelf hosting solutions or hosted my sites in an AWS S3 bucket. I have used technologies like (in unsorted and slightly unrelated order) BGP, LVS/IPVS, ldirectord, Pacemaker, STONITH, scripted VIP failover via ARP, heartbeat, heartbeat2, Corosync, keepalived, DRBD, and commercial F5 Load Balancers for high availability at work. - -
-

KISS high-availability with OpenBSD


-
-Published at 2024-03-30T22:12:56+02:00
-
-I have always wanted a highly available setup for my personal websites. I could have used off-the-shelf hosting solutions or hosted my sites in an AWS S3 bucket. I have used technologies like (in unsorted and slightly unrelated order) BGP, LVS/IPVS, ldirectord, Pacemaker, STONITH, scripted VIP failover via ARP, heartbeat, heartbeat2, Corosync, keepalived, DRBD, and commercial F5 Load Balancers for high availability at work.
-
-But still, my personal sites were never highly available. All those technologies are great for professional use, but I was looking for something much more straightforward for my personal space - something as KISS (keep it simple and stupid) as possible.
-
-It would be fine if my personal website wasn't highly available, but the geek in me wants it anyway.
-
-PS: ASCII-art below reflects an OpenBSD under-water world with all the tools available in the base system.
-
-
-Art by Michael J. Penick (mod. by Paul B.)
-                                               ACME-sky
-        __________
-       / nsd tower\                                             (
-      /____________\                                           (\) awk-ward
-       |:_:_:_:_:_|                                             ))   plant
-       |_:_,--.:_:|                       dig-bubble         (\//   )
-       |:_:|__|_:_|  relayd-castle          _               ) ))   ((
-    _  |_   _  :_:|   _   _   _            (_)             ((((   /)\`
-   | |_| |_| |   _|  | |_| |_| |             o              \\)) (( (
-    \_:_:_:_:/|_|_|_|\:_:_:_:_/             .                ((   ))))
-     |_,-._:_:_:_:_:_:_:_.-,_|                                )) ((//
-     |:|_|:_:_:,---,:_:_:|_|:|                               ,-.  )/
-     |_:_:_:_,'puffy `,_:_:_:_|           _  o               ,;'))((
-     |:_:_:_/  _ | _  \_:_:_:|          (_O                   ((  ))
-_____|_:_:_|  (o)-(o)  |_:_:_|--'`-.     ,--. ksh under-water (((\'/
- ', ;|:_:_:| -( .-. )- |:_:_:| ', ; `--._\  /,---.~  goat     \`))
-.  ` |_:_:_|   \`-'/   |_:_:_|.  ` .  `  /()\.__( ) .,-----'`-\(( sed-root
- ', ;|:_:_:|    `-'    |:_:_:| ', ; ', ; `--'|   \ ', ; ', ; ',')).,--
-.  ` MJP ` .  ` .  ` .  ` . httpd-soil ` .    .  ` .  ` .  ` .  ` .  `
- ', ; ', ; ', ; ', ; ', ; ', ; ', ; ', ; ', ; ', ; ', ; ', ; ', ; ', ;
-
-
-
-

Table of Contents


-
-
-

My auto-failover requirements


-
-
    -
  • Be OpenBSD-based (I prefer OpenBSD because of the cleanliness and good documentation) and rely on as few external packages as possible.
  • -
  • Don't rely on the hottest and newest tech (don't want to migrate everything to a new and fancier technology next month already!).
  • -
  • It should be reasonably cheap. I want to avoid paying a premium for floating IPs or fancy Elastic Load Balancers.
  • -
  • It should be geo-redundant.
  • -
  • It's fine if my sites aren't reachable for five or ten minutes every other month. Due to their static nature, I don't care if there's a split-brain scenario where some requests reach one server and other requests reach another server.
  • -
  • Failover should work for both HTTP/HTTPS and Gemini protocols. My self-hosted MTAs and DNS servers should also be highly available.
  • -
  • Let's Encrypt TLS certificates should always work (before and after a failover).
  • -
  • Have good monitoring in place so I know when a failover was performed and when something went wrong with the failover.
  • -
  • Don't configure everything manually. The configuration should be automated and reproducible.
  • -

-

My HA solution


-
-

Only OpenBSD base installation required


-
-My HA solution for Web and Gemini is based on DNS (OpenBSD's nsd) and a simple shell script (OpenBSD's ksh and some little sed and awk and grep). All software used here is part of the OpenBSD base system and no external package needs to be installed - OpenBSD is a complete operating system.
-
-https://man.OpenBSD.org/nsd.8
-https://man.OpenBSD.org/ksh
-https://man.OpenBSD.org/awk
-https://man.OpenBSD.org/sed
-https://man.OpenBSD.org/dig
-https://man.OpenBSD.org/ftp
-https://man.OpenBSD.org/cron
-
-I also used the dig (for DNS checks) and ftp (for HTTP/HTTPS checks) programs.
-
-The DNS failover is performed automatically between the two OpenBSD VMs involved (my setup doesn't require any quorum for a failover, so there isn't a need for a 3rd VM). The ksh script, executed once per minute via CRON (on both VMs), performs a health check to determine whether the current master node is available. If the current master isn't available (no HTTP response as expected), a failover is performed to the standby VM:
-
- -
#!/bin/ksh
-
-ZONES_DIR=/var/nsd/zones/master/
-DEFAULT_MASTER=fishfinger.buetow.org
-DEFAULT_STANDBY=blowfish.buetow.org
-
-determine_master_and_standby () {
-    local master=$DEFAULT_MASTER
-    local standby=$DEFAULT_STANDBY
-
-    .
-    .
-    .
-    
-    local -i health_ok=1
-    if ! ftp -4 -o - https://$master/index.txt | grep -q "Welcome to $master"; then
-        echo "https://$master/index.txt IPv4 health check failed"
-        health_ok=0
-    elif ! ftp -6 -o - https://$master/index.txt | grep -q "Welcome to $master"; then
-        echo "https://$master/index.txt IPv6 health check failed"
-        health_ok=0
-    fi
-    if [ $health_ok -eq 0 ]; then
-        local tmp=$master
-        master=$standby
-        standby=$tmp
-    fi
-
-    .
-    .
-    .
-}
-
-
-The failover scripts looks for the ; Enable failover string in the DNS zone files and swaps the A and AAAA records of the DNS entries accordingly:
-
- -
fishfinger$ grep failover /var/nsd/zones/master/foo.zone.zone
-        300 IN A 46.23.94.99 ; Enable failover
-        300 IN AAAA 2a03:6000:6f67:624::99 ; Enable failover
-www     300 IN A 46.23.94.99 ; Enable failover
-www     300 IN AAAA 2a03:6000:6f67:624::99 ; Enable failover
-standby  300 IN A 23.88.35.144 ; Enable failover
-standby  300 IN AAAA 2a01:4f8:c17:20f1::42 ; Enable failover
-
-
- -
transform () {
-  sed -E '
-	/IN A .*; Enable failover/ {
-	    /^standby/! {
-	        s/^(.*) 300 IN A (.*) ; (.*)/\1 300 IN A '$(cat /var/nsd/run/master_a)' ; \3/;
-	    }
-	    /^standby/ {
-	        s/^(.*) 300 IN A (.*) ; (.*)/\1 300 IN A '$(cat /var/nsd/run/standby_a)' ; \3/;
-	    }
-	}
-	/IN AAAA .*; Enable failover/ {
-	    /^standby/! {
-	        s/^(.*) 300 IN AAAA (.*) ; (.*)/\1 300 IN AAAA '$(cat /var/nsd/run/master_aaaa)' ; \3/;
-	    }
-	    /^standby/ {
-	        s/^(.*) 300 IN AAAA (.*) ; (.*)/\1 300 IN AAAA '$(cat /var/nsd/run/standby_aaaa)' ; \3/;
-	    }
-	}
-	/ ; serial/ {
-	    s/^( +) ([0-9]+) .*; (.*)/\1 '$(date +%s)' ; \3/;
-	}
-  '
-}
-
-
-After the failover, the script reloads nsd and performs a sanity check to see if DNS still works. If not, a rollback will be performed:
-
- -
#! Race condition !#
-   
-if [ -f $zone_file.bak ]; then
-    mv $zone_file.bak $zone_file
-fi
-
-cat $zone_file | transform > $zone_file.new.tmp 
-
-grep -v ' ; serial' $zone_file.new.tmp > $zone_file.new.noserial.tmp
-grep -v ' ; serial' $zone_file > $zone_file.old.noserial.tmp
-
-echo "Has zone $zone_file changed?"
-if diff -u $zone_file.old.noserial.tmp $zone_file.new.noserial.tmp; then
-    echo "The zone $zone_file hasn't changed"
-    rm $zone_file.*.tmp
-    return 0
-fi
-
-cp $zone_file $zone_file.bak
-mv $zone_file.new.tmp $zone_file
-rm $zone_file.*.tmp
-echo "Reloading nsd"
-nsd-control reload
-
-if ! zone_is_ok $zone; then
-    echo "Rolling back $zone_file changes"
-    cp $zone_file $zone_file.invalid
-    mv $zone_file.bak $zone_file
-    echo "Reloading nsd"
-    nsd-control reload
-    zone_is_ok $zone
-    return 3
-fi
-
-for cleanup in invalid bak; do
-    if [ -f $zone_file.$cleanup ]; then
-        rm $zone_file.$cleanup
-    fi
-done
-
-echo "Failover of zone $zone to $MASTER completed"
-return 1
-
-
-A non-zero return code (here, 3 when a rollback and 1 when a DNS failover was performed) will cause CRON to send an E-Mail with the whole script output.
-
-The authorative nameserver for my domains runs on both VMs, and both are configured to be a "master" DNS server so that they have their own individual zone files, which can be changed independently. Otherwise, my setup wouldn't work. The side effect is that under a split-brain scenario (both VMs cannot see each other), both would promote themselves to master via their local DNS entries. More about that later, but that's fine in my use case.
-
-Check out the whole script here:
-
-dns-failover.ksh
-
-

Fairly cheap and geo-redundant


-
-I am renting two small OpenBSD VMs: One at OpenBSD Amsterdam and the other at Hetzner Cloud. So, both VMs are hosted at another provider, in different IP subnets, and in different countries (the Netherlands and Germany).
-
-https://OpenBSD.Amsterdam
-https://www.Hetzner.cloud
-
-I only have a little traffic on my sites. I could always upload the static content to AWS S3 if I suddenly had to. But this will never be required.
-
-A DNS-based failover is cheap, as there isn't any BGP or fancy load balancer to pay for. Small VMs also cost less than millions.
-
-

Failover time and split-brain


-
-A DNS failover doesn't happen immediately. I've configured a DNS TTL of 300 seconds, and the failover script checks once per minute whether to perform a failover or not. So, in total, a failover can take six minutes (not including other DNS caching servers somewhere in the interweb, but that's fine - eventually, all requests will resolve to the new master after a failover).
-
-A split-brain scenario between the old master and the new master might happen. That's OK, as my sites are static, and there's no database to synchronise other than HTML, CSS, and images when the site is updated.
-
-

Failover support for multiple protocols


-
-With the DNS failover, HTTP, HTTPS, and Gemini protocols are failovered. This works because all domain virtual hosts are configured on either VM's httpd (OpenBSD's HTTP server) and relayd (it's also part of OpenBSD and I use it to TLS offload the Gemini protocol). So, both VMs accept requests for all the hosts. It's just a matter of the DNS entries, which VM receives the requests.
-
-https://man.OpenBSD.org/httpd.8
-https://man.OpenBSD.org/relayd.8
-
-For example, the master is responsible for the https://www.foo.zone and https://foo.zone hosts, whereas the standby can be reached via https://standby.foo.zone (port 80 for plain HTTP works as well). The same principle is followed with all the other hosts, e.g. irregular.ninja, paul.buetow.org and so on. The same applies to my Gemini capsules for https://foo.zone, https://standby.foo.zone, https://paul.buetow.org and https://standby.paul.buetow.org.
-
-On DNS failover, master and standby swap roles without config changes other than the DNS entries. That's KISS (keep it simple and stupid)!
-
-

Let's encrypt TLS certificates


-
-All my hosts use TLS certificates from Let's Encrypt. The ACME automation for requesting and keeping the certificates valid (up to date) requires that the host requesting a certificate from Let's Encrypt is also the host using that certificate.
-
-If the master always serves foo.zone and the standby always standby.foo.zone, then there would be a problem after the failover, as the new master wouldn't have a valid certificate for foo.zone and the new standby wouldn't have a valid certificate for standby.foo.zone which would lead to TLS errors on the clients.
-
-As a solution, the CRON job responsible for the DNS failover also checks for the current week number of the year so that:
-
-
    -
  • In an odd week number, the first server is the default master
  • -
  • In an even week number, the second server is the default master.
  • -

-Which translates to:
-
- -
# Weekly auto-failover for Let's Encrypt automation
-local -i -r week_of_the_year=$(date +%U)
-if [ $(( week_of_the_year % 2 )) -eq 0 ]; then
-    local tmp=$master
-    master=$standby
-    standby=$tmp
-fi
-
-
-This way, a DNS failover is performed weekly so that the ACME automation can update the Let's Encrypt certificates (for master and standby) before they expire on each VM.
-
-The ACME automation is yet another daily CRON script /usr/local/bin/acme.sh. It iterates over all of my Let's Encrypt hosts, checks whether they resolve to the same IP address as the current VM, and only then invokes the ACME client to request or renew the TLS certificates. So, there are always correct requests made to Let's Encrypt.
-
-Let's encrypt certificates usually expire after 3 months, so a weekly failover of my VMs is plenty.
-
-acme.sh.tpl - Rex template for the acme.sh script of mine.
-https://man.OpenBSD.org/acme-client.1
-Let's Encrypt with OpenBSD and Rex
-
-

Monitoring


-
-CRON is sending me an E-Mail whenever a failover is performed (or whenever a failover failed). Furthermore, I am monitoring my DNS servers and hosts through Gogios, the monitoring system I have developed.
-
-https://codeberg.org/snonux/gogios
-KISS server monitoring with Gogios
-
-Gogios, as I developed it by myself, isn't part of the OpenBSD base system.
-
-

Rex automation


-
-I use Rexify, a friendly configuration management system that allows automatic deployment and configuration.
-
-https://www.rexify.org
-codeberg.org/snonux/rexfiles/frontends
-
-Rex isn't part of the OpenBSD base system, but I didn't need to install any external software on OpenBSD either as Rex is invoked from my Laptop!
-
-

More HA


-
-Other high-available services running on my OpenBSD VMs are my MTAs for mail forwarding (OpenSMTPD - also part of the OpenBSD base system) and the authoritative DNS servers (nsd) for all my domains. No particular HA setup is required, though, as the protocols (SMTP and DNS) already take care of the failover to the next available host!
-
-https://www.OpenSMTPD.org/
-
-As a password manager, I use geheim, a command-line tool I wrote in Ruby with encrypted files in a git repository (I even have it installed in Termux on my Phone). For HA reasons, I simply updated the client code so that it always synchronises the database with both servers when I run the sync command there.
-
-https://codeberg.org/snonux/geheim
-
-E-Mail your comments to paul@nospam.buetow.org :-)
-
-Other *BSD and KISS related posts are:
-
-2025-12-07 f3s: Kubernetes with FreeBSD - Part 8: Observability
-2025-10-02 f3s: Kubernetes with FreeBSD - Part 7: k3s and first pod deployments
-2025-07-14 f3s: Kubernetes with FreeBSD - Part 6: Storage
-2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network
-2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs
-2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts
-2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation
-2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage
-2024-04-01 KISS high-availability with OpenBSD (You are currently reading this)
-2024-01-13 One reason why I love OpenBSD
-2023-10-29 KISS static web photo albums with photoalbum.sh
-2023-06-01 KISS server monitoring with Gogios
-2022-10-30 Installing DTail on OpenBSD
-2022-07-30 Let's Encrypt with OpenBSD and Rex
-2016-04-09 Jails and ZFS with Puppet on FreeBSD
-
-Back to the main site
-
-
-
- - A fine Fyne Android app for quickly logging ideas programmed in Go - - https://foo.zone/gemfeed/2024-03-03-a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang.html - 2024-03-03T00:07:21+02:00 - - Paul Buetow aka snonux - paul@dev.buetow.org - - I am an ideas person. I find myself frequently somewhere on the streets with an idea in my head but no paper journal noting it down. - -
-

A fine Fyne Android app for quickly logging ideas programmed in Go


-
-Published at 2024-03-03T00:07:21+02:00
-
-I am an ideas person. I find myself frequently somewhere on the streets with an idea in my head but no paper journal noting it down.
-
-I have tried many note apps for my Android (I use GrapheneOS) phone. Most of them either don't do what I want, are proprietary software, require Google Play services (I have the main profile on my phone de-googled) or are too bloated. I was never into mobile app development, as I'm not too fond of the complexity of the developer toolchains. I don't want to use Android Studio (as a NeoVim user), and I don't want to use Java or Kotlin. I want to use a language I know (and like) for mobile app development. Go would be one of those languages.
-
-Quick logger Logo
-
-

Table of Contents


-
-
-

Enter Quick logger


-
-Enter Quick logger – a compact GUI Android (well, cross-platform due to Fyne) app I've crafted using Go and the nifty Fyne framework. With Fyne, the app can be compiled easily into an Android APK. As of this writing, this app's whole Go source code is only 75 lines short!! This little tool is designed for spontaneous moments, allowing me to quickly log my thoughts as plain text files on my Android phone. There are no fancy file formats. Just plain text!
-
-https://codeberg.org/snonux/quicklogger
-https://fyne.io
-https://go.dev
-
-There's no need to navigate complex menus or deal with sync issues. I jot down my Idea, and Quick logger saves it to a plain text file in a designated local folder on my phone. There is one text file per note (timestamp in the file name). Once logged, the file can't be edited anymore (it keeps it simple). If I want to correct or change a note, I simply write a new one. My notes are always small (usually one short sentence each), so there isn't the need for an edit functionality. I can edit them later on my actual computer if I want to.
-
-With Syncthing, the note files are then synchronised to my home computer to my ~/Notes directory. From there, a small glue Raku script adds them to my Taskwarrior DB so that I can process them later (e.g. take action on that one Idea I had). That then will delete the original note files from my computer and also (through Syncthing) from my phone.
-
-https://syncthing.net
-https://raku.org
-https://taskwarrior.org
-
-Quick logger's user interface is as minimal as it gets. When I launch Quick logger, I'm greeted with a simple window where I can type plain text. Hit the "Log text" button, and voilà – the input is timestamped and saved as a file in my chosen directory. If I need to change the directory, the "Preferences" button brings up a window where I can set the notes folder and get back to logging.
-
-For the code-savvy folks out there, Quick logger is a neat example of what you can achieve with Go and Fyne. It's a testament to building functional, cross-platform apps without getting bogged down in the nitty-gritty of platform-specific details. Thanks to Fyne, I am pleased with how easy it is to make mobile Android apps in Go.
-
-Quick logger running on Android
-
-My Android apps will never be polished, but they will get the job done, and this is precisely how I want them to be. Minimalistic but functional. I could spend more time polishing Quick logger, but my Quick logger app then may be the same as any other notes app out there (complicated or bloated).
-
-

All easy-peasy?


-
-Updated 2025-05-15: When using fyne-cross android everything works now! I don't have to perform any of the work-arounds listed below anymore!
-
-I did have some issues with the app logo for Android, though. Android always showed the default app icon and not my custom icon whenever I used a custom AndroidManifest.xml for custom app storage permissions. Without a custom AndroidAmnifest.xml the app icon would be displayed under Android, but then the app would not have the MANAGE_EXTERNAL_STORAGE permission, which is required for Quick logger to write to a custom directory. I found a workaround, which I commented on here at Github:
-
-https://github.com/fyne-io/fyne/issues/3077#issuecomment-1912697360
-
-What worked however (app icon showing up) was to clone the fyne project, change the occurances of android.permission.INTERNET to android.permission.MANAGE_EXTERNAL_STORAGE (as these are all the changes I want in my custom android manifest) in the source tree, re-compile fyne. Now all works. I know, this is more of an hammer approach!
-
-Hopefully, I won't need to use this workaround anymore. But for now, it is a fair tradeoff for what I am getting.
-
-I hope this will inspire you to write your own small mobile apps in Go using the awesome Fyne framework! PS: The Quick logger logo was generated by ChatGPT.
-
-E-Mail your comments to paul@nospam.buetow.org :-)
-
-Other Go related posts are:
-
-2024-03-03 A fine Fyne Android app for quickly logging ideas programmed in Go (You are currently reading this)
-
Back to the main site
diff --git a/gemfeed/index.html b/gemfeed/index.html index a6a508f4..cc353f08 100644 --- a/gemfeed/index.html +++ b/gemfeed/index.html @@ -15,6 +15,8 @@

To be in the .zone!



+2026-02-15 - Loadbars resurrected: From Perl to Go after 15 years
+2026-02-14 - TIL: Meta slash-commands for reusable AI prompts and context
2026-02-14 - Meta slash-commands to manage prompts and context for coding agents
2026-02-02 - A tmux popup editor for Cursor Agent CLI prompts
2026-01-01 - Using Supernote Nomad offline
diff --git a/gemfeed/loadbars-resurrected-from-perl-to-go/loadbars.gif b/gemfeed/loadbars-resurrected-from-perl-to-go/loadbars.gif new file mode 100644 index 00000000..b012e48b Binary files /dev/null and b/gemfeed/loadbars-resurrected-from-perl-to-go/loadbars.gif differ diff --git a/index.html b/index.html index 96bd7345..2ba37877 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@

Hello!



-This site was generated at 2026-02-14T13:44:46+02:00 by Gemtexter
+This site was generated at 2026-02-14T22:43:28+02:00 by Gemtexter

Welcome to the foo.zone!

@@ -43,6 +43,8 @@

Posts



+2026-02-15 - Loadbars resurrected: From Perl to Go after 15 years
+2026-02-14 - TIL: Meta slash-commands for reusable AI prompts and context
2026-02-14 - Meta slash-commands to manage prompts and context for coding agents
2026-02-02 - A tmux popup editor for Cursor Agent CLI prompts
2026-01-01 - Using Supernote Nomad offline
diff --git a/uptime-stats.html b/uptime-stats.html index 56f9885f..3bf6eb81 100644 --- a/uptime-stats.html +++ b/uptime-stats.html @@ -13,7 +13,7 @@

My machine uptime stats



-This site was last updated at 2026-02-14T13:44:46+02:00
+This site was last updated at 2026-02-14T22:43:28+02:00

The following stats were collected via uptimed on all of my personal computers over many years and the output was generated by guprecords, the global uptime records stats analyser of mine.

-- cgit v1.2.3