<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Timothy D Beach</title>
    <link>https://timbeach.com</link>
    <description>Software engineer, recording artist, GNU/Linux enthusiast.</description>
    <lastBuildDate>Thu, 12 Nov 2026 10:00:05 +0000</lastBuildDate>
    <language>en-us</language>
    <atom:link href="https://timbeach.com/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Installing Aegix Linux on a Dead Possum</title>
      <link>https://timbeach.com/a/installing-aegix-linux-on-a-dead-possum/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/installing-aegix-linux-on-a-dead-possum</guid>
      <pubDate>Tue, 10 Nov 2026 00:00:00 +0000</pubDate>
      <description>A 2013 Chromebook Pixel that Google declared dead in 2020 turns out to be playing possum: one recovery stick, one community firmware flash, and one screw removed a decade ago bring it back as a modern Aegix Linux machine.</description>
      <content:encoded><![CDATA[<p><img src="pix/dead-possum.jpeg" alt="Worn paperback cover: Installing Aegix Linux on a Dead Possum, a woodcut possum with a screwdriver to the circuit board on its back" /></p>
<p>In 2013, Google built a laptop that made no sense. Chromebooks were the $249 machines you bought for a kid or a kiosk, little plastic things that ran a browser and nothing else. Then Google announced the Chromebook Pixel: aluminum body, a touchscreen sharper than anything Apple was shipping, a glowing lightbar on the lid for no reason except joy, and a price of $1,299. The whole internet said the same thing: who is this for?</p>
<p>Me. It was for me. Around 2014 I found one on eBay for $600 and could not click Buy It Now fast enough. That screen was the whole argument: 2560 by 1700 pixels packed into 12.85 inches, 239 pixels per inch, at a time when most laptops were shipping grainy 1366 by 768 panels. You could not find a screen like that on a laptop at any price, and here it was on a weird one nobody wanted.</p>
<p>There was one catch, and it was a big one. The Pixel was built to run ChromeOS and only ChromeOS, and Google put an expiration date on that arrangement. Updates for this machine ended in 2020. The hardware was built like a bank vault and the software had a &quot;best by&quot; sticker. After that date it would still power on, still glow, still have the best screen in the room, and be useless for the modern web.</p>
<p>So, like many of these machines, mine went on to a second life running Linux, and lived it quietly for years. Until one night, an update went sideways, and the possum rolled over and played dead.</p>
<h2>An old joke about a badger</h2>
<p>In April 2004, the speculative fiction magazine Strange Horizons published a piece by Lucy A. Snyder called &quot;Installing Linux on a Dead Badger: User's Notes.&quot; It was written deadpan, in the exact voice of a geek how-to guide, except the hardware was roadkill. It made the rounds on Slashdot the next day and became a whole genre: fake O'Reilly book covers about installing Linux on anything sufficiently cursed. I loved that meme with my whole heart.</p>
<p>Here's the thing about the joke that makes it immortal: it is barely a joke. Linux people really are like this. Show us any object with a processor in it, no matter how dead, hostile, or weird, and somewhere a volunteer is already writing the installation notes.</p>
<p>Which brings me back to my Pixel. A badger that is dead is dead. But a possum that looks dead is running a very convincing program called thanatosis: eyes glazed, body limp, faint smell of decay, all of it theater, all of it reversible. As I learned over one long evening, my Pixel was not a dead badger. It was a possum.</p>
<h2>The scary screen</h2>
<p>A normal computer, when you turn it on, goes looking for an operating system and runs whatever it finds. The Pixel does not trust you like that. Google designed it to verify every piece of software in the boot chain, and if anything looks nonstandard, it stops at a big warning: &quot;OS verification is OFF.&quot; Below that, in smaller type, it offers to helpfully &quot;restore&quot; your computer. Helpfully, here, means erase.</p>
<p>Living with Linux on this machine always meant living with that screen. Every boot, you press a secret key combination within a window of about one second, or nothing happens. Press the wrong key, the one the screen actually suggests, and it wipes your disk. It is a doorman who only lets you in if you ignore everything he says.</p>
<p>After the failed update, even the secret knock stopped working. Power on: warning screen. Press the magic keys: nothing. Wait: nothing. Remove the USB stick: black screen, one thin white line at the top, like a flatline on a heart monitor. By every outward sign, dead.</p>
<p>Eyes glazed. Body limp. Faint smell of decay.</p>
<h2>Poking the possum</h2>
<p>The revival ran in stages, and the first one was humbling: to move forward, I had to go backward. Google still hosts the final recovery image for this machine, a complete copy of ChromeOS as it shipped in late 2018. Write it to a USB stick, hold down the recovery keys, and the Pixel reinstalls its original factory brain. Twenty minutes later I was staring at a ChromeOS welcome screen that had not been touched since before the pandemic, like opening a time capsule and finding the air still inside.</p>
<p>For about ninety seconds I wondered whether to just keep it. Could this still be a Chromebook? Then I remembered: no security updates since 2020, a browser frozen in amber, and the modern web slowly closing its doors to it, one certificate at a time. A museum piece. Lovely, and a dead end.</p>
<p>The real fix was deeper. All of the Pixel's suspicion, the warning screen, the verification, the booby-trapped keys, lives in its firmware, the tiny program that wakes the machine up before any operating system exists. And here is where the story turns from a repair into something better: a man who goes by MrChromebox has spent years building and maintaining free replacement firmware for old Chromebooks. Not a company. A person, with a website and a shell script, keeping hundreds of models of abandoned hardware alive because somebody should.</p>
<p>His firmware does not patch Google's rules. It removes them, and the machine wakes up like any other laptop: no warning screen, no secret knock, no doorman. Boot whatever you want.</p>
<h2>The screw</h2>
<p>One obstacle stood between me and that firmware, and I need you to appreciate it, because it is my favorite detail in this whole saga.</p>
<p>Google, a company that secures its machines with cryptographic verification chains, protected the Pixel's firmware with a screw. A physical screw, on the circuit board, between the USB port and the battery. While it is installed, the firmware chip is electrically locked and no software on earth can rewrite it. Remove it, and the lock is open. The most sophisticated laptop of 2013, and the last line of defense is a Phillips head.</p>
<p>I flipped the laptop over to go get it, and this is where past me reached across a decade to lend a hand: the screw was already gone. I had taken it out years ago, for reasons neither of us remembers, and the machine had been sitting there unlocked the entire time, waiting.</p>
<p>So: one script in a terminal, one firmware backup to a spare USB stick, two minutes of watching a progress bar while holding very still, and the Pixel rebooted as a free computer for the first time in its life.</p>
<h2>The possum wakes up</h2>
<p><a href="https://aegixlinux.org">Aegix Linux</a> is the distribution I build: a lean, fast system in the suckless tradition, the kind where the whole interface gets out of the way and the machine feels like it did the day it was new. The installer ran clean, detected the new firmware, and twenty minutes later the Pixel booted straight to a login prompt. No warning screen. No ritual. Press power, get computer.</p>
<p>Then I logged in and laughed out loud, because that gorgeous 239-pixels-per-inch screen was rendering text small enough to read with a jeweler's loupe. Linux assumed it was a normal screen. It is not a normal screen. It has never been a normal screen.</p>
<p>That evening the fix was a few config files. But the better fix landed the next day, upstream: Aegix now ships a small tool that reads the screen's physical dimensions, does the arithmetic, and scales everything automatically at login. Every future Aegix install on packed-pixel hardware gets this for free, and it exists because one stubborn laptop refused to be ordinary. Good hardware does that: it does not just get repaired, it improves the thing that repaired it.</p>
<h2>Twelve years old and the best screen in the house</h2>
<p>So here it sits: a laptop from 2013 that cost $1,299 new, that I bought used for $600, that Google declared finished in 2020, running a current operating system with current security patches, on a screen that still embarrasses machines sold last month. Total cost of the resurrection: zero dollars, one evening, and a screw I had already lost.</p>
<p>Lucy Snyder's badger needed necromancy. Mine needed less, because the Pixel was never actually dead. Underneath the warning screens and the expiration date, the hardware was fine the entire time, lying very still, waiting for someone to notice the difference between a corpse and a performance.</p>
<p>That is the real ending of the old joke, and I mean it completely. The industry calls these machines dead because the software stopped. The machines themselves did not get the memo. There are millions of possums out there on shelves and in closets, eyes glazed, bodies limp, playing dead so convincingly that even their owners believe it.</p>
<p>Go poke yours.</p>
<p>Timothy</p>
]]></content:encoded>
    </item>
    <item>
      <title>Airport WiFi on Aegix Just Got Easier</title>
      <link>https://timbeach.com/a/airport-wifi-on-aegix-just-got-easier/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/airport-wifi-on-aegix-just-got-easier</guid>
      <pubDate>Wed, 21 Oct 2026 00:00:00 +0000</pubDate>
      <description>Why airport WiFi connects but every tab times out: portals hijack plain HTTP and modern browsers never send any, so wifimenu on Aegix now probes like a phone does, digs the login URL out of the portal's answer (even the Aruba page that hides it in a JavaScript variable), and opens it for you.</description>
      <content:encoded><![CDATA[<p>Your phone handles airport WiFi without being asked. You join &quot;CLT Free WiFi,&quot; a little sheet slides up, you tap Accept, and you're on. A Linux laptop joins the same network, reports a perfectly good connection, and then every tab you open spins and dies. There's no sheet, no link, no hint of what the network wants from you. The password-less network is somehow the one you can't get onto.</p>
<p>I sat at Charlotte Douglas with exactly that problem on October 21st, tethered to my phone so I could keep working, and decided the laptop should learn the trick the phone knows. This is how captive portals actually work, why a modern browser is the worst possible tool for finding one, and what it took to make <a href="https://github.com/AegixLinux/aegixlinux/blob/development/iso-profile/live-overlay/etc/skel/.local/bin/wifimenu">wifimenu</a>, the little dmenu WiFi picker on Aegix Linux, open the login page by itself.</p>
<h2>What a captive portal actually does</h2>
<p>The network has no idea who you are, and it doesn't care until you try to leave. Joining is free: the access point hands you an address, a gateway, and a DNS server, and NetworkManager reports &quot;connected&quot; in complete honesty. Then the gateway does one rude thing. Every connection you open to port 80, plain unencrypted HTTP, gets answered not by the site you asked for but by the portal's own web server, pretending to be whoever you called.</p>
<pre><code>you                       gateway                  the internet
 |-- GET http://x.com ---&gt;|                            |
 |&lt;-- &quot;Please wait...&quot; ---|   (never forwarded)        |
 |    200 OK, from the    |                            |
 |    portal, not x.com   |                            |
</code></pre>
<p>That's the whole mechanism. The portal is a man in the middle that runs the network, so it doesn't need to hack anything. It just answers for everyone.</p>
<h2>Why your browser never sees it</h2>
<p>Here's the part that surprises people. The portal can only impersonate sites over plain HTTP, because over HTTPS it would have to present a certificate for x.com, and it can't. A connection to port 443 either gets refused or gets a certificate the browser rightly rejects.</p>
<p>Now think about what a 2026 browser does when you type an address. Brave, Chrome, and Firefox all try HTTPS first, before the first packet leaves. So the request the portal was waiting to intercept never happens. The browser knocks on a door the portal can't answer, waits, and shows you a timeout. The better your browser's security defaults, the more thoroughly it hides the one page you need.</p>
<p>Your phone gets around this by never trusting the browser with the job. The moment it joins a network it fires its own plain-HTTP request at a known address and compares the answer to what that address is supposed to say. Android asks <code>connectivitycheck.gstatic.com/generate_204</code> and expects an empty 204. iOS asks <code>captive.apple.com</code> and expects a page that says &quot;Success.&quot; If anything else comes back, the phone knows a portal is in the way and shows you whatever it got.</p>
<h2>Teaching the laptop the same trick</h2>
<p>NetworkManager actually does this check too. On Arch and Artix it asks <code>ping.archlinux.org/nm-check.txt</code> and expects the text &quot;NetworkManager is online.&quot; When the answer is wrong it flips its connectivity state to <code>portal</code>, and then nothing on a minimal desktop does anything with that fact. The verdict sits there, correct and ignored.</p>
<p>So wifimenu now runs its own probe the moment a connection comes up. It asks that Arch endpoint, then Mozilla's <code>detectportal.firefox.com/success.txt</code> as a fallback, then Google's, over plain HTTP with curl, which doesn't upgrade anything. A 204 or the expected one-line body means you're online. Anything else that answers is the portal, and the answer is where the login URL hides.</p>
<p>The easy portals send a redirect, and curl hands you the <code>Location</code> header. Then there are the Aruba ones.</p>
<h2>The page that said &quot;Please wait&quot;</h2>
<p>I couldn't capture the Charlotte portal's answer while sitting on it, because the moment I'm on that network I can't talk to anything. So I did the capture on the phone's hotspot, wrote a script, switched networks, ran it, and switched back. Later I found a better trick: the portal remembers you by MAC address, so telling NetworkManager to reconnect with a random one makes the airport treat the laptop as a brand new device. You get a fresh portal on demand, without leaving your seat.</p>
<p>Here's what CLT sends back for every plain-HTTP request, whatever you asked for:</p>
<pre><code>HTTP/1.1 200 OK
Content-type: text/html; charset=utf-8

&lt;title&gt;REDIR&lt;/title&gt;
&lt;body onLoad='redirTimer()'&gt;Please wait...
&lt;SCRIPT LANGUAGE='JavaScript'&gt;
redirTime = '500';
redirURL = 'http://198.18.2.1:80/reg.php?ah_goal=index.html&amp;ah_login=true&amp;url=E2B8F3...';
function redirTimer() {
       self.setTimeout('self.location.href = redirURL;',redirTime);
}
&lt;/script&gt;
</code></pre>
<p>No redirect. No meta refresh. No link. A 200 with the login URL parked in a JavaScript variable and a half-second timer that moves you there. My first version of the extractor looked for a <code>Location</code> header, a meta refresh, a <code>location.href = 'http...'</code> literal, or an <code>href</code>, and this page has none of those. It fell back to opening the probe URL in the browser and hoping the portal would hijack that, which, to be fair, worked twice and failed once.</p>
<p>The fix is embarrassingly small: as a last resort, take the first quoted absolute URL anywhere in the page. On the Aruba page that's <code>redirURL</code>, and it points at <code>198.18.2.1</code>, an address out of the benchmarking range that no real site uses, which happens to be the one kind of address no browser will try to upgrade to HTTPS. The portal, by accident, hands you the one URL your browser will load exactly as written.</p>
<p>That real page now lives in the test suite, next to a fake portal that serves every variant I could think of: redirects, meta refreshes, JavaScript assignments, a 511 Network Authentication Required, a server that hangs. Fourteen cases, all runnable on a hotspot at a gate.</p>
<h2>What it feels like now</h2>
<p>Pick a network in wifimenu. If the portal is there, a notification names the login URL, the URL is already on your clipboard, and Brave opens straight to the page with the Accept button. Click it, and a second notification tells you the portal let you through, because the script keeps probing in the background until the answer flips to online.</p>
<p>Networks you didn't join through wifimenu get the same treatment. <code>nmcli monitor</code> prints a line every time NetworkManager's connectivity verdict changes, so a tiny watcher started from xprofile reads that stream for the life of the session and runs the portal flow on every <code>Connectivity is now 'portal'</code>. Hotels that re-prompt every twenty-four hours, networks that auto-reconnect while you were getting coffee, the one you joined in nmtui out of habit: NetworkManager notices, the watcher opens the page. A stamp of the last URL keeps the watcher and the connect path from opening two tabs when they both spot the same portal within seconds of each other.</p>
<p>And the status bar shows a 🔐 while NetworkManager says a portal is in the way. Click it and you get the login page instead of nmtui.</p>
<h2>What it is not</h2>
<p>It's a bash script. It leans entirely on curl, nmcli, and dmenu, all of which an Aegix install already has, and it adds nothing to the system that wasn't there. It doesn't fill in the form for you, and it doesn't pretend the portal's terms are anything other than the portal's terms. It does the one thing the phone does and the laptop didn't: it asks a question over plain HTTP and takes the answer seriously.</p>
<p>The whole episode is a reminder of how much of a good desktop is other people's unglamorous plumbing. NetworkManager was telling the truth the entire time. &quot;Connected&quot; was true, &quot;portal&quot; was true, and the login URL was sitting in a 200 response any curl could fetch. The only thing missing was something willing to read it.</p>
<p>Timothy</p>
]]></content:encoded>
    </item>
    <item>
      <title>Aegix Linux</title>
      <link>https://timbeach.com/a/aegix-linux/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/aegix-linux</guid>
      <pubDate>Sun, 09 Aug 2026 00:00:00 +0000</pubDate>
      <description>Nine years from Tank Linux to a downloadable ISO, and why this one is captured from a running machine instead of assembled from guesses.</description>
      <content:encoded><![CDATA[<p><img src="pix/mt-aso-penguin.png" alt="The Aegix GRUB boot menu: Boot Aegix Linux highlighted over a pixel-art hillside, with the Aegix penguin holding a flag" /></p>
<p>There is an old line about operating systems as vehicles. A Mac is a sleek sports car: beautiful, expensive, and you are not allowed to open the hood. Windows is the family sedan, practical and everywhere and full of things you did not ask for. And Linux is a tank. Ugly, loud, absurdly overbuilt, and it will go absolutely anywhere you point it.</p>
<p>I loved that analogy enough that in 2017 I started building my own distribution and called it Tank Linux.</p>
<p>The name did not survive, and I am glad. A tank is a weapon. What I was actually building had nothing to do with attacking anyone; it was about not being a soft target. So the project became <strong>Aegix</strong>, after the aegis: the shield. Same overbuilt machine, same go-anywhere attitude, but the point is protection rather than aggression. That single change of framing turned out to describe the software better than the tank ever did.</p>
<p>Nine years later, Aegix has an ISO you can download and install. It's hard to describe how unreasonably excited I am about this.</p>
<h2>Not a solo project</h2>
<p>Before I tell you what Aegix is, I need to correct the impression the first-person singular gives. Since 2023, Aegix has been a collaboration with <a href="https://masonborchard.com">Mason Borchard</a>, and I want to say this as plainly as I can: without Mason, Aegix would not exist. Not &quot;would be smaller,&quot; not &quot;would have shipped later.&quot; Would not exist.</p>
<p>Mason is a core contributor to the project, and the ISO you can download today carries years of their work alongside mine. When I write &quot;I&quot; in the rest of this article, a great deal of it is really &quot;we.&quot;</p>
<h2>What it actually is</h2>
<p>Aegix is an Artix Linux base with a suckless graphical environment on top:</p>
<ul>
<li><strong>dwm, st, dmenu, and dwmblocks</strong>, compiled from source during the install, patched for Aegix</li>
<li><strong>runit</strong> as the init system, not systemd</li>
<li><strong>btrfs</strong> root with subvolumes, so snapshots and rollback are available from day one</li>
<li><strong>LUKS full-disk encryption, mandatory</strong></li>
<li>pipewire and wireplumber for audio, vim-style keys everywhere your fingers land</li>
</ul>
<p>That fourth item deserves a sentence of its own. The installer does not ask whether you want encryption. There is no checkbox, no &quot;skip for now.&quot; You provide a passphrase or you do not install. If that sounds unreasonable, this is not your distribution, and that is fine. A shield with an optional mode is a decoration.</p>
<h2>Why I keep doing this</h2>
<p>The honest answer is that I like living in a computer I understand.</p>
<p>A suckless desktop is small enough to read. dwm is a couple thousand lines of C. When I want the status bar to behave differently, I edit a config header and recompile, and it takes less time than finding the setting would have taken in a desktop environment. Nothing phones home. Nothing updates itself into a shape I did not ask for. When something breaks, the cause is findable, because there is not that much of it.</p>
<p>The other reason is that this stuff is evergreen. The X11 and suckless tools I set up years ago still work the same way today. Time spent learning them compounds instead of evaporating with the next major version.</p>
<h2>What shipping an ISO changes</h2>
<p>For most of its life, Aegix was an install script. You booted somebody else's ISO, connected to the network, ran <code>curl -LO aegixlinux.org/install.sh</code>, and hoped. That works, and I used it happily for years, but it is not a distribution. It is instructions.</p>
<p>An ISO is different in a way that is easy to underestimate. It is a claim. It says: this specific set of bytes produces this specific working system, and I will stand behind that. You can hand it to someone. You can <code>dd</code> it to a stick and walk it to a laptop that has never seen the internet. It either boots or it does not, and if it does not, that is my problem and not yours.</p>
<p>Every Aegix install now writes a file at <code>/etc/aegix-release</code> recording the exact ISO version and the commit of the profile that built it. If you file a bug, that file tells me precisely what you are running. No archaeology.</p>
<h2>The part that surprises people</h2>
<p>Here is the thing I find genuinely interesting about how this ISO gets made, and it is not how most distributions work.</p>
<p>Most distros are assembled. Someone writes a package list and a directory of default config files, builds an image, and hopes the result feels coherent. The defaults are guesses about a hypothetical user, and they rot, because nobody actually lives in them.</p>
<p>Aegix is captured instead. There is a real machine, the laptop I work on every day, and a pipeline that reads it and turns it into the ISO. When I improve my setup, the distribution inherits the improvement on the next sync. When I delete a script I stopped using, it leaves the ISO too. The desktop you install is the desktop I use, minus me.</p>
<p>That &quot;minus me&quot; is the hard part, and it is where most of the engineering went. Capturing a personal machine means capturing a lot of things that must never ship: usernames, hostnames, work infrastructure, private bookmarks. So every file gets a recorded decision, ship or never or hand-curated, and every sync runs a gate over the whole result that refuses to build if anything personal survives. There is no override flag. If the gate fires, the fix is to sanitize the file, exclude it, or teach the gate a new rule.</p>
<p>The gate earns its keep. Building this, it caught a compiled binary with my home directory baked into it. It caught a config file naming my monitors. That class of thing ships in hobby distributions all the time, usually without anyone noticing.</p>
<h2>What actually broke</h2>
<p>The unglamorous truth of the last few weeks is that the bugs that mattered were invisible on my machine and obvious on someone else's.</p>
<p>The application launcher did not open. Not once, on any fresh install. It looked like a missing file, then a stale binary, then a broken keybinding. It was none of those. The setup was assigning a locale for 24-hour clocks and never actually generating it, because the check that was supposed to generate it matched a commented-out line in the config and concluded the work was done. Every program on the system tolerated the missing locale except one, which called <code>setlocale()</code> strictly, failed, and exited instantly. On my machine the locale had been generated years ago, so it worked perfectly, forever.</p>
<p>Fresh users were also being created without membership in the <code>video</code> group, so changing screen brightness silently required root. My account had that group from an install long enough ago that I had forgotten it happened.</p>
<p>And an rsync pattern intended to skip one README at the top of the profile was matching at every depth, quietly dropping eight README files out of every ISO ever built, including the documentation for the file manager's plugins.</p>
<p>None of these were exotic. All of them survived because the machine that builds the distribution is the one place they cannot be seen. That is the argument for shipping an ISO in the first place, and for the audit tool that now compares any installed Aegix against what the image intended to deliver.</p>
<h2>What I want from you</h2>
<p>Install it on hardware Mason and I do not own and tell us what broke. That is the single most useful contribution to this project, and it needs nothing but a spare machine and a USB stick. There is an audit tool in the repo that will do the comparison and report in one pass; send us the output.</p>
<p>The other thing I would genuinely love is help with the documentation. The site at aegixlinux.org is a git repository, and the docs are plain markdown in it. If you install Aegix and something in the guide is wrong, unclear, or missing the step that actually tripped you up, that correction is worth more than any feature request, because you can see the gap and I cannot. Open a pull request. Fix a sentence. Add the page you wished existed while you were stuck.</p>
<p>Documentation written by the person who just struggled with something is always better than documentation written by the person who built it. I have been staring at this system for nine years. I have lost the ability to see which parts are confusing.</p>
<h2>The shield</h2>
<p>The tank analogy was fun, and it got the ruggedness right. What it missed is that the reason to run an overbuilt, unfashionable, fully-inspectable computer is not to go conquer anything. It is so that the machine you depend on every day belongs to you: encrypted by default, free of things phoning home, small enough that a curious person can read it end to end and know what it does.</p>
<p>Nine years, one rename, and an ISO. Go boot it.</p>
<p>aegixlinux.org</p>
<p>Timothy</p>
]]></content:encoded>
    </item>
    <item>
      <title>TWO_ROOMS</title>
      <link>https://timbeach.com/a/two-rooms/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/two-rooms</guid>
      <pubDate>Fri, 07 Aug 2026 00:00:00 +0000</pubDate>
      <description>Three songs released as free zip files you can actually keep, and why that still matters: the Jungian doorway the record is set in, what each song is doing there, and where the depth in Tim Gennert's mixes comes from.</description>
      <content:encoded><![CDATA[<p><img src="pix/two-rooms.jpeg" alt="TWO_ROOMS by Gut Lens: a figure blurred across a lit doorway, beside a door marked NOT AN EXIT" /></p>
<p>You are carrying more music in your pocket than any human being who lived before 2001. Roughly a hundred million songs, available in about two seconds each, for the price of a sandwich per month.</p>
<p>You own none of it.</p>
<p>Not one track. Cancel the card, lose signal in a parking garage, or watch a licensing deal quietly expire, and the whole library evaporates. This is such a normal arrangement now that describing it out loud sounds a little paranoid. It is still true.</p>
<p>There is a small and shrinking group of people who never went along with this. They keep files. Actual files, with names, in folders, on devices they can hold. Some of them use a laptop. Some of them fight their phone into cooperating, which in 2026 is genuinely annoying and getting worse. And some of them carry a dedicated player, a little slab whose entire job is to play audio files off local storage, made by companies you have never heard of for an audience that will not let this go.</p>
<p>I love that niche. I release music into it on purpose.</p>
<p>So here are my three songs, collected as <strong>TWO_ROOMS</strong>, as zip files you can download and keep forever. No account, no email, no gate. MP3 if you want small, FLAC if you want lossless with proper tags and artwork, or the actual WAV masters if you want the exact files that came off the mastering desk. They are at the bottom of this article, and they are yours.</p>
<h2>Why the record has two rooms and three songs</h2>
<p>The title is Jungian, and it is not a headcount.</p>
<p>Carl Jung's model of a person has a lit room and a dark one. The lit room is the part you show: the persona, the self you can narrate, the version of you that answers email. The dark room holds everything you have declined to look at, which does not mean it is evil, only that it is unlit. Jung's argument, the whole load-bearing idea, is that the dark room is not a basement you can seal. It is a room in the same house. The stuff in there keeps its own hours and lets itself out.</p>
<p>The record is not set in either room. It is set in the doorway between them.</p>
<p>That is what the cover is, literally. A figure smeared across a threshold by a long exposure, because it is in both rooms at once and the camera cannot decide. Warm light behind, dark concrete in front. And on the open door, a red sign reading <strong>NOT AN EXIT</strong>, which was already screwed to that door when I found it, and which is the truest thing on the whole sleeve. There is no getting out of this. There is only getting through.</p>
<p>Three songs, three different kinds of traffic through that doorway.</p>
<h3>GUT_LENS: the dark room talking over the lit one</h3>
<p>The gut lens is a threat filter. When it goes primary, the body speaks first and the mind has to chase it with a flashlight, arriving late and out of breath to a conclusion the nervous system reached a half-second ago.</p>
<blockquote>
<p>If the gut lens is primary my body's screaming duck and cover
Slip and jab jab and slip my heart keeps breaking over and over</p>
</blockquote>
<p>Duck and cover is not drama, it is choreography. It is the body rehearsing impact so it will not be surprised by it. Slip and jab is approach-avoidance in real time: reaching for closeness, flinching, reaching again. The heartbreak repeats because the connection is real and the stakes feel absolute.</p>
<p>The part I am most attached to is smaller. <em>Claws like a tether, sickening purr. And I'm choking on the word we.</em> A purr is comfort. When fear is in the room, comfort lands like an alarm, because continuity itself starts reading as a threat. And &quot;we&quot; is simultaneously the most wanted word in the language and the hardest one to breathe inside.</p>
<p>The song does not resolve that. It anchors it, in a Rumi passage sung straight through the middle:</p>
<blockquote>
<p>I see healing in every pain
I see compassion in every rage on the plains of the earth
And in the nine levels under the dome of vast heavens
I see only you in every stage</p>
</blockquote>
<p>Which is what keeps the song from being an accusation. Nobody is on trial. It is nervous-system weather, reported honestly, with a vow underneath it.</p>
<h3>HOGAR_DE_TRES: the light overlapping</h3>
<p>The song is sung in three languages, and each one is doing a specific job. The Spanish carries the tenderness of shared daily life, the small domestic facts of it: <em>en cada rincón un suspiro compartido</em>, in every corner a shared sigh. The Japanese opens the ceiling. <em>Sora wa hiroku, hikari ga yureru, hateshinaku.</em> The sky is wide, the light shimmers, without end. Three hearts, their light overlapping, without end. The English, borrowed from Robert Frost, keeps the promises: <em>the woods are lovely, dark and deep, but I have promises to keep.</em></p>
<h3>HELLO_INNER_CRITIC: the crossing itself</h3>
<p>This one is the title track of the idea, which is funny, because it is the newest song and it is not called TWO_ROOMS.</p>
<p>It opens with what sounds like language breaking:</p>
<blockquote>
<p>oo nah ebin wah nips mah</p>
</blockquote>
<p>That is &quot;i'm spent on the back nine,&quot; played backwards. It is there because when you are depleted enough, even your own meaning arrives corrupted. The mind is still running. The signal is inverted.</p>
<p>Then the sentence resolves forward and the song sits down inside the exhaustion. I do not play golf, but the back nine is a perfect image: the second half of the course, where momentum stops helping and you feel every step. Past fresh. Past fueled. Still walking. And underneath it the hard confession, <em>i can't let go</em>, which is not romantic. It is grip. It is the part of the nervous system that keeps clenching, because releasing feels like falling even when releasing would be mercy.</p>
<p>Then the song turns, and this is the whole record in one move:</p>
<blockquote>
<p>now i must talk directly to you
i feel you</p>
</blockquote>
<p>The &quot;you&quot; is not a person. It is the inner critic. The voice that narrates danger and failure and collapse, and genuinely believes it is running security.</p>
<blockquote>
<p>you think you're keeping me safe
but you're just making it worse</p>
</blockquote>
<p>Notice what that is not. It is not an exorcism. &quot;I feel you&quot; is contact. Jung's point about the dark room is that banishing what lives there does not work, and generally makes it louder and stranger. You go in and you introduce yourself. Hence the title, which is a greeting.</p>
<p>The last line is the one I am most honest about:</p>
<blockquote>
<p>i didn't realize
i had invited you back in</p>
</blockquote>
<p>The critic rarely kicks the door down. It comes in through fatigue, through uncertainty, through wanting something badly. Then it is back in the house, rearranging the furniture, calling it help.</p>
<p>You can hear the crossing in the production. The first half is shredded, and the second half is a much softer voice. That is the difference between being inside the storm and speaking from the eye of it. Not peace. Just a clearer voice taking the wheel.</p>
<h2>The part I did not do</h2>
<p>All three songs were mixed and mastered by <strong>Tim Gennert</strong>, who as far as I am concerned is the best in the world at what he does.</p>
<p>From his site:</p>
<blockquote>
<p>I think good audio is not about sound quality.</p>
<p>It is how well recording communicates what is essentially valuable in human expression and the spirit of music.</p>
<p>When this perspective is used to examine the tools and processes we use, in the end it translates to extraordinary audio.</p>
</blockquote>
<p>I would like you to run an experiment, and this is the actual reason the lossless files exist.</p>
<p>Put one of these next to a current commercial hit record. Same playback, same volume. Do not listen for loudness or brightness. Listen for <strong>depth</strong>: how far back the far things sit, how much air is between the near thing and the far thing, whether the space behind the vocal is a real place or a flat wall. Most modern masters are a magnificent hedge, everything pushed forward, nothing behind anything else. These have front-to-back distance. Things stand in different places.</p>
<p>That is mostly Tim's fanaticism about craft. It is partly the signal path. He mixes through a 16-channel analog summing buss that I designed and built for him by hand years ago, back when I ran a boutique high-end analog audio company called Woven Audio. Summing in the analog domain does something to depth and separation that I can hear immediately and still cannot fully account for on paper.</p>
<p>Building that box was one of the better things I have done with my hands. Hearing it still working, years later, on my own songs, mixed by someone better at this than me, is a strange and excellent feeling.</p>
<h2>Take the files</h2>
<p>Each zip unpacks to a single <code>TWO_ROOMS</code> folder containing the three tracks, cover art as both <code>cover.jpg</code> and <code>folder.jpg</code> so every player finds it, and a <code>LINER_NOTES.txt</code> with full credits and all the lyrics.</p>
<ul>
<li><a href="https://gutlens.net/TWO_ROOMS-mp3.zip"><strong>MP3</strong>, 320 kbps, 29 MB</a>: tagged with artwork, plays on absolutely anything</li>
<li><a href="https://gutlens.net/TWO_ROOMS-flac.zip"><strong>FLAC</strong>, lossless, 67 MB</a>: bit-identical to the masters, properly tagged, the one I would take</li>
<li><a href="https://gutlens.net/TWO_ROOMS-wav.zip"><strong>WAV</strong>, the masters, 118 MB</a>: the exact files, untouched, no tags because WAV cannot carry them reliably</li>
</ul>
<p>They are also on Spotify, Apple Music, and YouTube Music, and streaming them is a completely good way to listen. But streams are weather. Files are furniture.</p>
<p>Keep them, copy them to your devices, hand them to somebody. Just do not sell them or upload them to streaming services, and we are square.</p>
<p>The door in that photograph says NOT AN EXIT, and I keep thinking about how much better that is than any title I could have invented. You do not get out of the room you would rather not be in. You get a doorway, and some light coming through it, and three songs to play while you stand there deciding.</p>
<p>Timothy</p>
]]></content:encoded>
    </item>
    <item>
      <title>What Is a SIM Card, Actually?</title>
      <link>https://timbeach.com/a/what-is-a-sim-card-actually/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/what-is-a-sim-card-actually</guid>
      <pubDate>Mon, 03 Aug 2026 00:00:00 +0000</pubDate>
      <description>A SIM isn't a memory chip or a keycard — it's a sealed, tamper-resistant computer whose whole job is to prove it knows a 128-bit secret it will never let anyone read; here's the filesystem, the actual bytes, and how the authentication handshake works.</description>
      <content:encoded><![CDATA[<p><img src="pix/sim-card-actually-og.png" alt="A SIM card opened up to reveal it is a tiny sealed computer, its contacts wired to a secret key it will never surrender" /></p>
<p>You have thumbed a dozen of them out of little trays with the tip of a paperclip. A fingernail of plastic with a gold rectangle printed on it, small enough to lose in the carpet, and somehow the one thing standing between your phone and being an expensive Wi-Fi-only camera. Move it to a new phone and your number, your carrier, and your identity move with it. Leave it out and the phone forgets who it is.</p>
<p>So what <em>is</em> the thing? A few honest guesses, all of which I've made:</p>
<ul>
<li>It's a little memory chip that stores my phone number.</li>
<li>It's a security token — some crypto baked onto a bit of hardware.</li>
<li>It's how the network authenticates me.</li>
</ul>
<p>Every one of those is a shadow of the truth, and the truth is much better. The short version: <strong>a SIM card is a complete, sealed-shut computer</strong> — with its own processor, its own operating system, and a filesystem — whose entire job is to guard one secret so well that it will happily prove it knows the secret without ever letting the secret out. Authentication is what it's <em>for</em>. Being a tiny tamper-resistant computer is what it <em>is</em>.</p>
<p>Let's open it up.</p>
<h2>It's not a chip. It's a computer.</h2>
<p>Peel back the gold contact plate and you are not looking at a memory stick. You are looking at a <strong>smart card</strong> — the same family of chip that lives in a chip-and-PIN credit card or a building access badge. The industry name for the hardware is a <strong>UICC</strong> (Universal Integrated Circuit Card); &quot;SIM&quot; is really the name of a program that runs <em>on</em> it.</p>
<p>On that sliver of silicon there is:</p>
<ul>
<li>a <strong>CPU</strong> — historically a humble 8- or 16-bit micro, now typically a 32-bit secure ARM core with hardware crypto accelerators;</li>
<li><strong>ROM</strong>, holding the card's operating system, burned in at the factory;</li>
<li><strong>EEPROM or flash</strong> — the writable, non-volatile memory that survives power-off, holding your data. Tens of kilobytes on an old card, up to a couple of megabytes on a modern one;</li>
<li>a scrap of <strong>RAM</strong> for working memory;</li>
<li>and a serial I/O line to talk to the phone.</li>
</ul>
<p>That's a computer. A slow one with a thimble of storage, but a real one, running a real OS — very often a <strong>Java Card</strong> virtual machine, which means the card can host small installable applets. This is how carriers push those &quot;SIM menu&quot; services onto your phone: little programs living on the card itself, driving the handset through a mechanism called the <strong>SIM Application Toolkit</strong>.</p>
<p>The phone doesn't reach in and read the memory directly. It <em>asks</em>. The two of them speak a request-and-answer protocol over those gold pads, defined by an international standard called <strong>ISO/IEC 7816</strong>, in packets called <strong>APDUs</strong>. The phone sends a command — &quot;select this file,&quot; &quot;read those bytes&quot; — and the card answers with data and a two-byte status code. <code>90 00</code> means &quot;OK.&quot; It is, almost exactly, a tiny client and server talking over a two-wire network, where the wire is a strip of gold and the server is the size of your pinky nail.</p>
<h2>What bytes are actually on it?</h2>
<p>Here is the part that surprised me most: the data on a SIM is organized as a <strong>hierarchical filesystem</strong>. Directories and files, just like your laptop — only in miniature, and standardized down to the byte by the GSM and 3GPP specifications so that any phone on Earth can read any carrier's card.</p>
<p>There are three kinds of node:</p>
<ul>
<li><strong>MF — the Master File.</strong> The root directory, <code>3F00</code>. Every card has exactly one.</li>
<li><strong>DF — a Dedicated File.</strong> A directory. <code>7F20</code> (<code>DF_GSM</code>) holds network files; <code>7F10</code> (<code>DF_TELECOM</code>) holds your phonebook and messages.</li>
<li><strong>EF — an Elementary File.</strong> A leaf that holds actual bytes.</li>
</ul>
<p>Files are named by two-byte IDs in hexadecimal, and the tree is walked exactly the way you'd <code>cd</code> through folders: select <code>3F00</code>, then <code>7F20</code>, then the file you want. Let's meet the famous residents.</p>
<p><strong><code>2FE2</code> — the ICCID.</strong> The card's serial number — the long digit string printed on the plastic itself. Twenty-ish digits identifying the card as a physical object, and it's readable by anyone with no PIN, which is why it's the first thing a forensics tool grabs. One nice quirk: the digits are stored <strong>BCD-encoded with swapped nibbles</strong> — a printed <code>8944…</code> is physically stored as the bytes <code>98 44 …</code>, two digits per byte, low half first. The whole card is full of this packed, nibble-swapped decimal.</p>
<p><strong><code>6F07</code> — the IMSI.</strong> This is the identity that matters — not your phone number, but the <em>subscriber</em> identity that says &quot;this account, on this carrier.&quot; Up to 15 digits: a <strong>country code</strong>, a <strong>network code</strong>, and then your unique subscriber number. When you roam onto a tower in another country, this is the string that lets it figure out who to bill and which home network to phone for permission.</p>
<p><strong><code>6F3A</code> — the phonebook, <code>6F3C</code> — your text messages.</strong> Yes, the classic SIM phonebook is just an Elementary File full of fixed-length records, one contact per record: a name field, a length byte, and ten bytes of BCD-packed phone number. Text messages stored on the card sit in another file, 176 bytes per slot, each holding a raw SMS exactly as it arrived over the air. (A &quot;deleted&quot; contact is often just a record flagged free — the old bytes linger until something overwrites them. Forensics people love this.)</p>
<p><strong>Network scratchpad files.</strong> The card also keeps notes about the world: a <strong>TMSI</strong>, a temporary throwaway identity the network assigns so your real IMSI isn't broadcast over the air every time; a record of the last location area it attached to; and a <strong>forbidden-networks list</strong> of carriers that have rejected it — which is exactly why a SIM can get stubbornly &quot;stuck searching&quot; after a bad roaming experience.</p>
<p>So, concretely: the bytes on a SIM are a few dozen small files — mostly packed-decimal identifiers, some network state, some of your personal phonebook and messages — sitting in a standardized directory tree, each file individually walled off by its own permissions.</p>
<h2>The one file you're not allowed to read</h2>
<p>Every file has an access rule attached to each operation. Some are <strong>Always</strong> readable (the ICCID). Most of your subscriber data is readable only after the <strong>PIN</strong> is presented. A few can only be touched with the operator's administrative key.</p>
<p>And one is set to <strong>Never</strong>. Not &quot;never without a password&quot; — <em>never</em>, full stop, across the card's edge, by anyone, forever.</p>
<p>That file holds <strong>Ki</strong>: a 128-bit secret key, unique to your card, written once at the factory and then sealed. There is no command in the entire protocol that returns it. The phone can't read it. The carrier's own tools can't read it back off a finished card. You cannot read it. This is not a bug or an oversight — it is the entire point of the device.</p>
<p>Because if Ki never comes out, how does anything use it? That's the beautiful trick, and it's the answer to &quot;how does authentication actually work.&quot;</p>
<h2>The handshake: proving a secret without revealing it</h2>
<p>Your carrier's network knows your Ki too — it's stored, heavily guarded, in a database back at the carrier. So both ends share a secret that lives on the SIM and in the network, and <em>nowhere in between</em>. Authentication is a <strong>challenge and response</strong> built on exactly that.</p>
<p>In the original GSM (2G) design it went like this:</p>
<pre><code>  network  ──►  RAND (128-bit random number)  ──►  SIM
                                                     │
                                    SIM runs a function of (Ki, RAND)
                                    entirely inside itself
                                                     │
  network  ◄──  SRES (32-bit answer) + Kc (call key) ◄──
</code></pre>
<p>The network makes up a fresh random number, RAND, and sends it as a dare. The SIM stirs RAND together with its buried Ki using an on-card algorithm and hands back a short answer, SRES, plus a key for encrypting the call. The network ran the <em>same</em> math with its copy of Ki; if the answers match, you're in. Ki itself never crossed the gap — only a one-time answer to a one-time question.</p>
<p>Elegant, and for its era, revolutionary. But it had two now-infamous flaws. The early algorithm carriers used, <strong>COMP128-1</strong>, turned out to be breakable: feed the card enough chosen challenges and you could reverse-engineer Ki and <strong>clone the SIM</strong>. And the handshake was <strong>one-way</strong> — the network verified your phone, but your phone never verified the network. Nothing stopped a fake tower from challenging you, and that gap is the ancestor of every &quot;IMSI catcher&quot; and Stingray you've read about.</p>
<p>3G, 4G, and 5G fixed both with a scheme called <strong>AKA</strong> (Authentication and Key Agreement), whose standard algorithm is <strong>MILENAGE</strong>, built on AES. The upgrade is that the challenge now comes with proof of who's asking:</p>
<pre><code>  network  ──►  RAND  +  AUTN (an authentication token)  ──►  USIM
</code></pre>
<p>The USIM does more work now. It uses Ki (and a second operator secret) to check the <strong>AUTN</strong> token, and the token is constructed so that only the real network could have produced it. Bundled inside is a <strong>sequence number</strong> the card checks for freshness — so an attacker can't record a valid old exchange and replay it later. Only if both the network's proof and the freshness check pass does the card compute its response and its session keys.</p>
<p>That's <strong>mutual authentication</strong>: the card verifies the network as rigorously as the network verifies the card. The fake-tower trick that worked on 2G doesn't work here.</p>
<p>One subtlety worth getting right, because it's the crux of the whole design. The handshake produces session keys — a cipher key and an integrity key — and <em>those</em> do leave the card, handed up to the phone so it can actually encrypt the connection. What never leaves, on any generation, is <strong>Ki</strong>. The card is a sealed box that emits fresh, disposable keys on demand while the master secret they're derived from stays locked inside for the life of the card. Session keys are cheap and temporary; Ki is forever, and Ki never moves.</p>
<p>5G adds one more thing the earlier generations lacked: it stops broadcasting your identity in the clear. Older phones would sometimes send the raw IMSI over the air, which is exactly what IMSI-catchers listened for. A 5G SIM carries the carrier's <strong>public key</strong> and uses it to <strong>encrypt your subscriber identity</strong> before it's ever transmitted — concealing the one number that used to give you away. The tower forwards the sealed blob home; only the carrier can open it.</p>
<h2>So is a SIM just crypto? Just authentication?</h2>
<p>Now we can answer the questions I started with.</p>
<p>Is it <em>just crypto on a bit of hardware</em>? No — it's a general-purpose secure computer that happens to be very good at crypto. The same tamper-resistant chip stores your phonebook, runs carrier applets, and in other form factors holds payment credentials and transit passes.</p>
<p>Is it <em>just authentication</em>? Authentication is the headline act, but the deeper description is: it's a <strong>secure element</strong> — a little vault that can hold secrets and perform operations with them without ever exposing them. Proving your subscriber identity is the most famous thing it does with that power. It is not the only thing it <em>could</em> do.</p>
<h2>The card with no card: eSIM</h2>
<p>Which brings us to eSIM, the source of a lot of confusion. An eSIM is <strong>the exact same computer</strong>, soldered permanently onto the phone's board (or built straight into the main chip) instead of riding on a removable sliver of plastic. The hardware — called an <strong>eUICC</strong> — is identical in spirit: a sealed secure element with a Ki it will never surrender.</p>
<p>What changed is <em>how the identity gets on there</em>. A plastic SIM is personalized at a factory and mailed to you. An eSIM is blank, and your carrier's identity — called a <strong>profile</strong> — is downloaded onto it over the internet. That QR code you scan to activate a plan points the phone's <strong>local profile assistant</strong> at a carrier server (a mouthful named <strong>SM-DP+</strong>), which securely delivers a profile onto the chip. The eUICC can hold several profiles at once, which is why one phone can juggle a work line, a personal line, and a travel eSIM. Same sealed computer; the SIM is now software you can install.</p>
<h2>Try it yourself</h2>
<p>None of this is behind glass. For under thirty dollars you can buy a <strong>PC/SC smart-card reader</strong> — the same kind of USB gadget that reads chip credit cards — and talk to a SIM you own directly.</p>
<p>The open-source <strong>pySim</strong> tools, from the Osmocom project, will walk the filesystem for you: select the files, dump the ICCID, read the IMSI, list the phonebook, page through stored messages. It is genuinely startling the first time you watch your own IMSI scroll up the terminal, decoded from nibble-swapped BCD, straight off the chip.</p>
<p>And then try to read Ki. You will send the command, and the card will refuse — not with your data, but with a status code that means <em>no</em>. You are holding the key in your hand, powering the very chip that computes with it billions of times, and you still cannot see it. That refusal is the most important byte the card will ever send you.</p>
<p>That, in the end, is the whole story of the SIM: a serial number printed on the outside for anyone to read, wrapped around a secret sealed on the inside for no one to read, connected by a computer whose only real talent is knowing the difference.</p>
<p>— Timothy</p>
]]></content:encoded>
    </item>
    <item>
      <title>The App I Built for the Eye-Reading Energy Tax</title>
      <link>https://timbeach.com/a/the-eye-reading-energy-tax/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/the-eye-reading-energy-tax</guid>
      <pubDate>Tue, 28 Jul 2026 00:00:00 +0000</pubDate>
      <description>Diagnosed dyslexic at eight, I burned out of college twice knowing the intellect was there — what was missing was a name for the tax. Ear-reading and eye-reading are two buses into the same comprehension center, mine are priced differently, and choosing the cheaper one is wisdom, not weakness. So I built ear, a local TTS reader for Linux. It's on the AUR.</description>
      <content:encoded><![CDATA[<p><img src="pix/eye-reading-energy-tax-og.png" alt="Diagram of two input buses reaching one comprehension center: a faint dotted line from an eye node, a strong warm line from an ear node" /></p>
<p>I was diagnosed with dyslexia when I was eight years old, during my first year attending school outside the home. I hadn't learned to read yet. I spent most of the decades since carrying a quiet shame about that — and this is the story of the realization that finally put the shame down, and the tool I built once it was gone.</p>
<p>Here's what the shame looked like in practice. I always knew, deep down, that I had the intellect for academia. You can tell, talking with people — I could hold my own in understanding, in connecting ideas, in seeing the shape of a problem. But I could never get past a couple of semesters of college before burning out and moving on to something more interesting. The coursework wasn't beyond me. The reading was draining me. I'd watch classmates absorb a hundred assigned pages like the act itself was free, while the same pages cost me something real — focus, energy, hours. I was paying a tax they weren't paying, and I didn't have a name for it. So I named it the way ashamed people do: lazy. Undisciplined. Not cut out for it.</p>
<p>Meanwhile, the evidence for the defense was sitting right there in my headphones. I could listen to an entire Dostoevsky novel and enjoy every minute of it. Hundreds of pages of dense nineteenth-century Russian literature, no burnout, no tax. Same brain. Same ideas. Different door.</p>
<h2>The realization</h2>
<p>A few weeks ago I finally learned what's actually going on in there, and it landed like a verdict being overturned.</p>
<p>Reading is not one skill — it's a relay between brain systems. When a typical reader sees a word, dedicated circuitry maps the visual symbols to speech sounds automatically. That mapping got wired in during childhood and now runs on background autopilot, effectively free. Dyslexia is a difference in exactly that machinery: the symbol-to-sound bridge never becomes automatic. It still works — but it runs manually, through a longer route, spending working memory and attention on every single word. The decoding bill arrives before comprehension ever gets to start.</p>
<p>Listening skips that bridge entirely. Spoken language flows through auditory pathways that a dyslexic brain runs at full speed, straight into the same comprehension machinery that eye-readers use. Same content, same understanding — delivered over a different bus, at a fraction of the energy cost.</p>
<p>That's the whole punch line of my life story, forty years late: eye-reading and ear-reading are two input buses to the same comprehension center, and mine are priced differently. Not broken. Priced differently.</p>
<p>And once you see it that way, the shame math flips completely. Getting the same ideas into your brain at a lower energy cost isn't cheating, and it isn't a lesser form of reading — it's resource management. It's what a smart, resourceful person does with an accurate spec sheet of their own hardware. The real waste was all the years I spent paying the expensive toll out of shame, because academia is built by and for eye-readers, and it taught me that the expensive road was the only legitimate one. It isn't. Comprehension is the destination; nobody at the destination asks which road you took.</p>
<h2>So I built for the ear bus</h2>
<p>Once the shame was gone, the engineering problem was obvious: get any text, from anywhere, into my ears, with zero friction. I'd been improvising this for years — long before the AI boom I was converting PDFs to plain text and piping them through crude TTS on Linux, and my blog already reads itself aloud. But those were islands. I wanted a system.</p>
<p>It's called ear, and it's on the AUR right now.</p>
<p>The command line does what Unix tools should. Pipe anything into it. Point it at a Markdown file, a PDF, a URL. Highlight text anywhere on screen and hit a hotkey. Short snippets speak in under a second; longer reads get a warmer neural voice — the same British narrator my blog uses, so my whole machine speaks with one voice.</p>
<p>Under the hood, text gets cleaned, split into paragraphs, and synthesized one paragraph at a time into a playlist that starts playing immediately while the renderer runs ahead. Pause, skip by paragraph, change speed, stop and pick up days later exactly where you left off.</p>
<p>There's a listen-later shelf for long-form: point ear at a whole book and it renders in the background into a single audio file. My first test was a cryptography textbook — two thousand three hundred and eighty-one paragraphs, seventeen and a half hours of audio. I'm several hours in. A bash cookbook followed. My machine has quietly become an audiobook press.</p>
<p>And then there's the part I didn't know I needed: the desk. Typing ear opens a window that shows the text of whatever's playing and highlights each paragraph as it's spoken, scrolling along with the voice. Click any paragraph and playback jumps there. Feel what that does to the energy math: the ears carry the decoding load, and the eyes get promoted to a map — structure, skimming, jumping around — without paying the per-word toll. The reader renders in Atkinson Hyperlegible, the dyslexia-friendly typeface I already use everywhere. It's the first reading interface I've ever used that was designed for how I'm actually wired, and I know that for certain, because I designed it that way.</p>
<p>I built it with Claude Code in four days — spec first, then test-driven Rust, sixty-three tests by the end. It was almost called earbuss, after the Woven Summing Buss I used to hand-build in my audio-manufacturing days — a device that sums many input channels down to one output, which is exactly what this does with text. But the three-letter name was sitting free on the AUR, and some names you just pick up off the ground.</p>
<h2>Why my heart is full</h2>
<p>Here's the part that gets me. Any Arch-based Linux user, anywhere, can now type yay -S ear, run ear-cli setup, and have their machine read anything to them — files, books, web pages, whatever their day throws at their eyes. Within a day of the AUR listing going live, the first community install came in: a friend's Framework laptop, hardware I've never touched, reading their files aloud.</p>
<p>I didn't build this as assistive technology, and I don't think of it that way. I built it because it's the correct engineering response to an accurate understanding of my own hardware. But I know how many people are out there paying the eye-reading energy tax without a name for it — grinding through pages at full toll, concluding they're lazy or not cut out for it, the way I did for decades. If even a few of them find this tool and feel the load lift, that's worth more to me than the tool itself.</p>
<p>So, to anyone whose story rhymes with mine: if reading print exhausts you and listening doesn't, you are not lazy and you are not less. You have a premium audio bus and an expensive visual one, and routing around the toll isn't a workaround — it's wisdom about your own machinery. Being resourceful about how ideas reach your brain is a form of intelligence. Nobody gets to grade you on which door the ideas came through.</p>
]]></content:encoded>
    </item>
    <item>
      <title>How Ham Radio Repeaters Work</title>
      <link>https://timbeach.com/a/how-ham-radio-repeaters-work/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/how-ham-radio-repeaters-work</guid>
      <pubDate>Thu, 23 Jul 2026 00:00:00 +0000</pubDate>
      <description>Why a 5-watt handheld can suddenly talk across three counties: the duplex offset, CTCSS gatekeeping, duplexer cavities, and mountaintop etiquette behind an amateur repeater, traced through the W4TRC machine on Bays Mountain.</description>
      <content:encoded><![CDATA[<p><img src="pix/repeaters.png" alt="A mountaintop ham radio repeater relaying signals between handheld radios across a valley" /></p>
<p>A five-watt handheld radio is a small miracle — a complete transmitter and receiver you can clip to your belt. It is also, on its own, a bit of a disappointment. In town, two handhelds might manage a mile or two before buildings and hills eat the signal. Yet that same little radio can carry a conversation across an entire city and three counties beyond it.</p>
<p>The difference is a machine most people have never heard of: the repeater. And the best way I've found to explain one — tested on a ten-year-old, approved for all ages — is to think of it as a very powerful, very helpful robot radio living on top of a mountain.</p>
<p>Ours lives on Bays Mountain, about 2,600 feet above Kingsport, Tennessee. Its name is W4TRC. Let's meet it.</p>
<h2>The problem: your signal dies at the horizon</h2>
<p>The bands handheld radios use travel in essentially straight lines. They don't bend over ridges or follow the curve of the Earth. If your antenna can't &quot;see&quot; the other antenna, the conversation is over — and from chest height on a sidewalk, you can't see very far at all. Every building and hill in between takes a bite out of what's left.</p>
<p>Here's the part that surprises people: more power barely helps. Doubling your wattage doesn't double your range — it nudges it. The thing that actually wins is height.</p>
<h2>The fix: a robot radio on the mountain</h2>
<p>If height wins, the answer is obvious: put a radio on the highest ground around and let it do the talking for you.</p>
<p>That's a repeater — an automated station on a mountaintop or tower that listens for faint signals and instantly re-broadcasts them from its spectacular location, with more power and a far better antenna than you'll ever hold. Your five watts only has to make one hop: up to the mountain. The robot shouts the rest.</p>
<p>Two handhelds that can't hear each other across town can both see that mountaintop. So the robot bridges them, and your effective range goes from &quot;a couple of miles on a good day&quot; to the whole region its antenna can see — for W4TRC, essentially all of the Tri-Cities.</p>
<h2>The robot's mouth and ears</h2>
<p>Now the clever part. The robot has to listen and talk at the same instant — that's what repeating means. But it can't do both on one frequency, for the same reason you can't hear someone whisper while you're shouting: its own voice would drown out everything else.</p>
<p>So the robot keeps its mouth and its ears on two different channels:</p>
<ul>
<li><strong>The mouth</strong> is the repeater's output — the frequency it talks on, and the one everybody listens to. This is the number published for a repeater. W4TRC's mouth is 146.970 MHz.</li>
<li><strong>The ears</strong> are the input — the frequency it listens on, and the one your radio talks into. The ears sit a fixed distance away from the mouth, called the <strong>offset</strong>. On the 2-meter band that's 0.6 MHz; W4TRC's ears are 0.6 below, at 146.370 MHz.</li>
</ul>
<pre><code>  your voice  ─────────────►  146.370 MHz  (the robot's ears)
                                  │
                          [ Bays Mountain ]
                                  │
  your radio  ◄─────────────  146.970 MHz  (the robot's mouth)
</code></pre>
<p>Your handheld handles the switch by itself. Program it with the mouth frequency and the offset, and it listens on 146.970 — then the instant you press the talk button, it silently jumps down to 146.370 to speak into the robot's ears, and snaps back the moment you let go. You never notice. Two frequencies, one seamless conversation.</p>
<p>For the curious: keeping the robot's own shout from deafening its own ears is genuinely hard, because mouth and ears usually share a single antenna. The fix is a <strong>duplexer</strong> — a rack of scuba-tank-sized tuned metal cans that let one frequency through while blocking the other. It's the least glamorous and most critical hardware on the mountain.</p>
<h2>The secret knock</h2>
<p>A receiver on a mountaintop hears everything — static crashes, distant repeaters on the same frequency, electrical noise from every direction. If the robot repeated all of it, it would babble around the clock.</p>
<p>So the robot only wakes up for people who know the secret knock. The knock is a <strong>CTCSS tone</strong> (old-timers say &quot;PL tone&quot;): a continuous low hum, pitched below where voices sit, that your radio hides underneath your speech. W4TRC listens for a 123.0 Hz hum. Hear the knock, repeat the signal. No knock, and the robot pretends you don't exist.</p>
<p>It isn't a security measure — the tone is published right next to the frequency; anyone can look it up. It's noise discipline. But it is the classic newcomer trap: program the frequency and offset correctly, forget the tone, and everything looks fine on your end while the mountain ignores you completely.</p>
<h2>One press of the button</h2>
<p>Put it all together and here's what happens in the half-second after you key up:</p>
<ol>
<li>Your radio jumps to the ears frequency and transmits your voice with the secret knock humming underneath.</li>
<li>The robot hears you, checks the knock, and keys its transmitter.</li>
<li>Your words blast out of the mouth frequency from the mountaintop at the same instant you speak — anyone within maybe forty miles hears you at full strength.</li>
<li>You let go. The robot hangs on for a second — the <strong>squelch tail</strong> — and marks the gap with a <strong>courtesy beep</strong>. That beep isn't decoration: it says &quot;the other person is done,&quot; and the pause it enforces gives a third voice a chance to jump in. Then the transmitter drops and the robot goes back to listening.</li>
</ol>
<p>That tail is also your built-in test meter. Key up, say your callsign, let go: if the tail and beep come back, you're hitting the machine. Silence means your frequency, offset, or tone is wrong — almost always the tone.</p>
<h2>Manners on the mountain</h2>
<p>A repeater is shared infrastructure — one conversation at a time, built and maintained by a local club — and the culture around it reflects that:</p>
<ul>
<li><strong>Say who you are.</strong> The FCC requires your callsign every ten minutes and when you sign off. Keying up silently just to hear the beep — &quot;kerchunking&quot; — is against the rules and the fastest way to be known unfavorably on a machine before anyone has met you.</li>
<li><strong>Leave pauses.</strong> The courtesy-beep gap exists so someone with emergency traffic, or just a third voice, can break in.</li>
<li><strong>Listen first.</strong> A minute of listening tells you whether a conversation or a scheduled net is already underway.</li>
<li><strong>Nets are the front door.</strong> Most clubs hold a weekly on-air meetup — W4TRC's is Sunday evenings at 8:30 — and they genuinely want newcomers to check in. It's the easiest first transmission you'll ever make: someone literally asks whether anyone new is listening.</li>
</ul>
<h2>More than a relay</h2>
<p>Modern repeaters rarely stop at relaying. Many are linked over the internet — EchoLink, AllStar, digital modes — so a handheld in Kingsport can, through the mountain, chat with a station on another continent. And because clubs treat them as emergency assets, good repeaters run on battery banks and solar panels. When a storm takes down the power grid — and the cell towers with it — the robot on the mountain keeps right on repeating. That resilience is a big part of why ham radio still matters when everything else fails.</p>
<h2>Try it yourself</h2>
<p>Everything here is public and reproducible. RepeaterBook lists nearly every repeater in North America with its frequency, offset, and tone. Free software called CHIRP will program your whole local list into an inexpensive handheld in an afternoon. Listening requires no license at all — tune to a repeater's mouth frequency and you'll hear your local radio community going about its day. Talking takes a Technician-class license: a 35-question exam that a weekend of study will comfortably beat.</p>
<p>And the first time you press the button, say your callsign, and hear the mountain beep back — a robot two thousand feet over your head confirming it heard your little radio and shouted your words across three counties — you'll grin about this hundred-year-old technology like it was invented yesterday.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Your Backup Is a Hypothesis</title>
      <link>https://timbeach.com/a/your-backup-is-a-hypothesis/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/your-backup-is-a-hypothesis</guid>
      <pubDate>Tue, 21 Jul 2026 00:00:00 +0000</pubDate>
      <description>Why a backup you haven't booted is a hypothesis, not a backup — and how aegix-backup turns a dead encrypted laptop drive into a five-minute recovery on Aegix/Artix with nightly re-earned bootable clones and a ciphertext-only offsite.</description>
      <content:encoded><![CDATA[<p><img src="pix/aegix-backup.png" alt="aegix-backup — encrypted, tested-restore disaster recovery" /></p>
<p>Your laptop's SSD is going to die. Not today, probably. But SSDs fail without warning — no clicking, no grinding, no grace period. One morning the machine just doesn't come back. If everything you care about lives on an encrypted laptop, the question isn't whether you have backups. It's this:</p>
<p><strong>How long after a dead drive are you back to work — on your own system, with your own config, your own keys, your own muscle memory?</strong></p>
<p>For most setups the honest answer is &quot;days, if the restore even works.&quot; I built <a href="https://github.com/timbeach/aegix-backup">aegix-backup</a> to make the answer &quot;about five minutes.&quot; This is what it does, why it's built the way it is, and how to set it up on your own machine.</p>
<h2>The principle</h2>
<p>Most backup advice optimizes the wrong thing: how elegant the backup is. Snapshots, dedup ratios, incremental transfer efficiency. All fine — and all irrelevant on the day it matters. The only metric that counts is <strong>how boring and certain the restore is</strong>, executed at 2am, half-asleep, on the worst computing day of your month.</p>
<p>That leads to one rule that shapes the entire tool:</p>
<p><strong>A backup you haven't booted is a hypothesis, not a backup.</strong></p>
<p>I can say this with some authority, because when I finally boot-tested my own &quot;working&quot; clone — one that had reported success every night for a month — I found it wasn't bootable at all. Its bootloader pointed at the <em>original</em> drive. The test would have silently booted my internal system and told me everything was fine. Behind that one lie were five more: excludes that matched nothing, swallowed error codes, an initramfs that would kernel-panic on any other machine, a missing <code>/tmp</code> that broke the cloned system, a safety guard that guarded nothing. Every one of them produced a confident success message. Every one of them was found only by actually testing the restore.</p>
<p>So aegix-backup is designed around restores you <em>actually test</em> — and it re-earns bootability every single night, instead of assuming it.</p>
<h2>What you get</h2>
<p>Three legs, each covering a failure the others don't. All of it runs unattended from one nightly cron entry; all of it is driven by one config file.</p>
<table>
<thead>
<tr>
<th>Leg</th>
<th>Lives on</th>
<th>Survives</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bootable clone, internal</td>
<td>a second internal drive (LUKS + btrfs)</td>
<td>dead primary drive — reboot, pick the other disk, keep working</td>
</tr>
<tr>
<td>Bootable clone, external</td>
<td>a drive that leaves the building</td>
<td>the laptop being lost, stolen, or destroyed</td>
</tr>
<tr>
<td>Encrypted offsite</td>
<td>restic repo mirrored to Hugging Face</td>
<td>everything local at once — only ciphertext ever leaves the machine</td>
</tr>
</tbody>
</table>
<p>The clones are not archives. They are complete, independently bootable systems. When the primary drive dies, there is no restore step: you press F12, pick the clone, type your LUKS passphrase, and you are on your machine — desktop, dotfiles, browser sessions, everything. Buy a replacement drive whenever it's convenient; the tool rebuilds onto it with one command.</p>
<h2>What makes it different</h2>
<p><strong>Clones are made bootable on every run.</strong> The nightly rsync necessarily copies the source system's <code>fstab</code>, <code>crypttab</code>, and GRUB config — all pointing at the <em>source</em> drive. Left alone, that clone boots the wrong disk or nothing. After every sync, aegix-backup repoints the whole boot chain at the clone's own UUIDs, reinstalls GRUB for both BIOS and UEFI, and verifies the result. Bootability isn't a setup step that decays; it's re-earned nightly.</p>
<p><strong>It boots on hardware you haven't bought yet.</strong> A default Arch-family initramfs is built with <code>autodetect</code> — it contains drivers for the machine it was built on and nothing else. Restore that clone onto a replacement laptop and it panics before it can even find the disk. Every clone gets a second, fallback initramfs carrying every storage driver, with its own boot entry. Your travel drive can rescue you onto unfamiliar hardware, which is the entire point of a travel drive.</p>
<p><strong>It works during the disaster, not just before it.</strong> Booted from a clone — which is exactly where you'll be when it counts — the tool still functions: it detects what system is actually running, snapshots that, and refuses to clone a running system onto itself. Recovery mode isn't an afterthought; it's a tested code path.</p>
<p><strong>Only ciphertext leaves the machine.</strong> The offsite leg is a restic repository — client-side AES-256, content-addressed, deduplicated — mirrored to a private Hugging Face dataset repo. HF never sees a plaintext byte. The mirror even regenerates DO-NOT-DELETE guard files inside the repo on every sync, so any human or AI agent managing the account's storage knows this is a backup, not clutter.</p>
<p><strong>It's runit-native.</strong> No systemd units, no timers, no crypttab assumptions (Artix-family systems don't process it at boot). Auto-unlock and auto-mount are done with runit one-shots and a udev rule: plug in your external clone and it appears read-only at a mountpoint, so you can browse yesterday's system without any risk of writing to your recovery image. Internal clones stay unmounted until you ask (<code>clone-browse internal</code>) — a permanently mounted duplicate of your filesystem just confuses every tool that walks the disk.</p>
<p><strong>It fails loudly and succeeds honestly.</strong> rsync's &quot;some files vanished&quot; and restic's &quot;one file unreadable&quot; are warnings, logged and tolerated — a nightly job that dies because one cache file disappeared mid-read is worse than useless. Everything else fails to your desktop via notify-send. Both directions matter: this tool's history includes a restic warning treated as fatal that silently skipped the offsite upload for weeks, and swallowed rsync errors that reported broken clones as clean. Those bugs are why the exit-code handling looks paranoid. It is.</p>
<h2>Setting it up</h2>
<p>You need: an Arch-family system with runit (Aegix, Artix), btrfs root with <code>@</code> and <code>@home</code> subvolumes on LUKS, and at least one spare drive to become a clone target. Internal or external both work — internal is the better first target, because your firmware boots it without any USB-boot drama.</p>
<p><strong>1. Install the tool.</strong></p>
<pre><code>git clone https://github.com/timbeach/aegix-backup
cd aegix-backup
sudo ./install.sh
</code></pre>
<p>This installs the script, a placeholder config, the nightly cron entry, and the runit/udev plumbing.</p>
<p><strong>2. Provision a clone target.</strong> Mirror a known-bootable layout: MBR, a ~1 GB FAT32 boot partition with the boot flag, the rest LUKS2 holding btrfs with <code>@</code> and <code>@home</code> subvolumes. Give the LUKS container two keyslots — a keyfile (so the nightly can unlock it unattended) and a passphrase (so <em>you</em> can unlock it at boot; a keyfile on the dead machine's encrypted root helps nobody). <code>RECOVERY.md</code> in the repo walks through this step by step.</p>
<p><strong>3. Fill in the config.</strong> Everything is UUIDs in <code>/etc/aegix-backup.conf</code>:</p>
<pre><code>CLONE_TARGETS=( internal external )
TGT_internal_LUKS_UUID=...
TGT_internal_BOOT_UUID=...
</code></pre>
<p>One habit the config file will nag you about: never identify drives by <code>/dev/nvme0n1</code> versus <code>/dev/nvme1n1</code>. That numbering reshuffles between reboots — mine has swapped twice, once nearly pointing a destructive operation at the wrong disk. UUIDs, models, and serials only.</p>
<p><strong>4. Dry-run, then run.</strong></p>
<pre><code>sudo aegix-backup preflight
sudo aegix-backup --dry-run daily
sudo aegix-backup clone-daily
</code></pre>
<p>The first clone moves your whole system, so it takes a while — an internal NVMe target runs at PCIe speed, a USB-2 enclosure very much does not. Nightly runs after that are incremental and quick. A target that isn't plugged in is skipped, not an error, so the travel drive can come and go.</p>
<p><strong>5. Boot the clone. Actually boot it.</strong> While your real system is healthy, reboot, open the firmware boot menu, pick the clone, unlock it, and check where you landed:</p>
<pre><code>findmnt -no SOURCE /
</code></pre>
<p>If that prints the clone's mapper name, congratulations — you have a backup. Until that moment you had a hypothesis. Mine failed this test the first time, in a way that every automated check had missed, and that single reboot is what turned the tool from plausible into trustworthy.</p>
<p>Then open the things you'd hate to lose. My test found one more bug this way: an encrypted vault whose mountpoint directory hadn't been cloned, which would have left a recovered system holding ciphertext with no place to mount it. Five minutes of clicking around the booted clone is the cheapest audit you will ever run.</p>
<h2>The part you can't automate</h2>
<p>Two keys exist that no backup can regenerate: your LUKS passphrase, and your restic repository password (plus the token for the offsite mirror). The restic password is the <em>only</em> key to your offsite data — lose it and that leg of the system is unrecoverable ciphertext, working exactly as designed. Put them somewhere that is not the laptop. The repo ships a <code>RECOVERY.md</code> runbook meant to be printed or copied to your phone, because a recovery procedure that only exists on the machine you just lost is not a procedure.</p>
<h2>Get it</h2>
<p>The tool is a single auditable shell script, MIT-licensed, config-driven, with every hard-won lesson documented in comments where it's enforced:</p>
<p><strong><a href="https://github.com/timbeach/aegix-backup">github.com/timbeach/aegix-backup</a></strong></p>
<p>Clone it, point it at a spare drive, and — this part is not optional — boot the result. Somewhere between &quot;my backups ran fine&quot; and &quot;I have booted my backup&quot; is the difference between a hypothesis and a plan.</p>
]]></content:encoded>
    </item>
    <item>
      <title>tabnext — Open New Browser Tabs Next to Your Current One</title>
      <link>https://timbeach.com/a/tabnext/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/tabnext</guid>
      <pubDate>Thu, 16 Jul 2026 00:00:00 +0000</pubDate>
      <description>When the MV2 purge killed Open Tabs Next to Current, rebuilding it took 105 lines and zero permissions — plus two non-obvious lessons: foreground tabs are already active when onCreated fires, and a session restore looks exactly like a user opening forty tabs, so naive tab-moving rips them out of their groups.</description>
      <content:encoded><![CDATA[<p><img src="pix/tabnext-article-hero.png" alt="Pixel-art scene: a graveyard of Manifest V2 extensions with tombstones like &quot;Open Tabs Next to Current — died&quot;, while a heart-eyed penguin rebuilds one at a workbench from a Manifest V3 blueprint. A display reads TAB COUNT: 42." /></p>
<p>New tabs in Chromium browsers open at the far end of the tab strip — somewhere past tab forty, in the region cartographers mark &quot;here be dragons.&quot; tabnext opens them where you actually are: immediately to the right of the tab you're on. Ctrl+T, middle-clicked links, links from other apps — everything lands next to you.</p>
<p>It also gives the toolbar penguin a job: a live badge with the number of tabs you have open. No judgment. Just a number. (You can pretend it's judgment.)</p>
<p><strong>Get it:</strong></p>
<ul>
<li><a href="https://chromewebstore.google.com/detail/tabnext/emomhgbeeiicnljgihhnnimgknknkefb">tabnext on the Chrome Web Store</a> — works in Chrome, Brave, Edge, Vivaldi, anything Chromium</li>
<li><a href="https://github.com/timbeach/tabnext">Source on GitHub</a> (MIT) — two files, about a hundred lines; if you'd rather not trust a store, read all of it in two minutes and Load Unpacked it yourself</li>
</ul>
<p>A few things worth knowing before you install, all of them deliberate:</p>
<ul>
<li><strong>Zero permissions.</strong> The install prompt warns you about nothing because there is nothing to warn about — tabnext never reads your URLs, titles, or history. It counts tabs and it moves tabs. That's the whole thing.</li>
<li><strong>Tab-group safe.</strong> Grouped tabs are never yanked out of their groups, and session restore keeps your order and your groups exactly as you left them. Open a tab from inside a group and it joins the group, right next to you.</li>
<li><strong>Nothing resident.</strong> One event-driven service worker that sleeps between tab events. No settings page, no popup, no onboarding tour.</li>
</ul>
<h2>Why it exists</h2>
<p>For years I used <em>Open Tabs Next to Current</em> — an extension so reliable I forgot it was an extension. Then Brave greeted me with a gray banner: &quot;This extension was turned off because it is no longer supported.&quot; It was written for Manifest V2, Chromium retired Manifest V2, and the author never ported it. That's the whole obituary — and it belongs to thousands of small, finished, single-purpose extensions that died the same way.</p>
<p>Here's the part that surprised me: rebuilding it took a morning. The entire concept fits in one listener —</p>
<pre><code class="language-js">chrome.tabs.onCreated.addListener(async (tab) =&gt; {
  const [active] = await chrome.tabs.query({
    active: true,
    windowId: tab.windowId,
  });
  chrome.tabs.move(tab.id, { index: active.index + 1 });
});
</code></pre>
<p>— and the rest of the hundred lines exist because that obvious version is wrong in two interesting ways.</p>
<h2>What I learned along the way</h2>
<p><strong>New tabs are born active.</strong> A tab you open in the foreground — Ctrl+T, the new-tab button — is already the active tab by the time the creation event fires. So &quot;find the active tab and move next to it&quot; finds the newborn itself, and moving a tab next to itself is a no-op wearing a trench coat. The fix is to ask a different question when that happens: not &quot;which tab is active?&quot; but &quot;which tab was I <em>just using</em>?&quot; Chromium tracks a <code>lastAccessed</code> timestamp on every tab (also permission-free), and the previously-used tab is simply the most recent one that isn't you.</p>
<p><strong>Session restore is also &quot;opening tabs.&quot;</strong> This was the good bug. After restoring my session, tabs had escaped their tab groups and scattered across the strip. Three facts conspire: a restore fires the same creation event as a human opening tabs, dozens of times fast; a tab's group membership isn't set yet when that event fires, so restored tabs briefly look ungrouped; and moving a tab to a spot outside its group silently strips its membership. So my extension was &quot;helpfully&quot; repositioning every restored tab and shredding the groups as it went.</p>
<p>The fix that stuck: treat rapid-fire tab creation as the browser talking to itself, and stay out of the conversation. A new window gets a two-second quiet period, and any tab created during quiet — or within 300 ms of the previous one, a cadence only a browser produces — extends it. On top of that, every move waits 150 ms and re-checks the tab first; if it joined a group or got closed in the meantime, leave it alone. As a bonus, Chromium's own move semantics mean Ctrl+T from inside a tab group opens the new tab <em>in</em> that group — exactly what a groups person wants, zero code written for it.</p>
<h2>Build your own</h2>
<p>If an extension you loved died in the MV2 purge, go look at how big it actually was. The odds are good it was a hundred lines of somebody's weekend, and the platform underneath — <code>chrome.tabs</code>, <code>chrome.action</code>, a JSON manifest — is still right there, waiting for yours.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Raccoons Are Illegal</title>
      <link>https://timbeach.com/a/raccoons-are-illegal/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/raccoons-are-illegal</guid>
      <pubDate>Thu, 09 Jul 2026 00:00:00 +0000</pubDate>
      <description>Rescuing two orphaned raccoon kits — Charls and Doozy — turned into a two-hour race against the bureaucracy of compassion. What Tennessee's Rabies Vector Species laws do to anyone who tries to help, and the underground network of rehabbers who actually will.</description>
      <content:encoded><![CDATA[<p><img src="pix/3AM_kits_first_encounter.jpg" alt="Charls and Doozy the night I found them — the first photo I ever took of them, around 3 a.m." /></p>
<p>For a few nights there was a scratching in the wall behind my bed. I did the responsible-homeowner thing: caught the raccoon I eventually spotted and relocated it well away from the house. Problem solved. Except the scratching didn't stop.</p>
<p>Late the next night I found the real source out on the wrap-around deck. A tiny kit — I'd name him Charls — was balanced on the handrail, and his sister was peeking out of a gap in the porch ceiling, the one I'd name Doozy. I grabbed a plastic bin and a pair of gloves, scooped up Charls, then reached up and lifted Doozy down out of the rafters. Two orphans, maybe six or eight weeks old. Looking back, probably younger. And suddenly, entirely, mine to figure out.</p>
<h2>Meeting Charls and Doozy</h2>
<p>They were impossibly sweet. They climbed my arms and shoulders and burrowed into the crook of my neck, and when they got scared they screamed — a thin, insistent wail that only stopped when I gave them unflavored Pedialyte, drop by drop, from a dropper. So I named them, because you name things you've decided to keep alive: Charls and Doozy.</p>
<p>Within a day they'd claimed me as furniture. Here's what an ordinary afternoon looked like — one kit on each shoulder while I tried to get anything done:</p>
<p>{{youtube:MsOuRfPD16s|short}}</p>
<p>The plan felt simple and responsible. In the morning I'd hand them to the local wildlife vet — the kind of place that takes in fallen fledglings and orphaned squirrels — and they'd take it from there.</p>
<h2>The hang-up</h2>
<p>I called the vet the next morning. They hung up before I got a full sentence out.</p>
<p>So I improvised. The gold-standard formula for raccoon kits is a specialized replacer called Fox Valley 40/25, but you can't walk in and buy it the same day. What you <em>can</em> get is Esbilac puppy milk replacer from the Tractor Supply down the road, so that's what I used — cut heavily with Pedialyte at first so I didn't shock their stomachs, then edged toward full formula over a day.</p>
<p>There's more to it than a bottle. You feed them belly-down, never on their backs, because a kit that inhales milk gets pneumonia and dies. After every single feeding you rub their bellies with a warm, damp washcloth, because kits this young physically cannot go to the bathroom without being stimulated to. You keep them warm against a hot water bottle wrapped in a towel, because a cold kit can't digest. Every three to four hours, around the clock. A week of six-a.m. feedings.</p>
<p><img src="pix/kits_on_shoulders_coworking.jpg" alt="Coworking, raccoon-style — a kit riding each shoulder while I worked at my desk." /></p>
<p>Somewhere in that week the dangerous thought crept in — the one everyone has. They were so easy to love. <em>Could we just keep them?</em></p>
<h2>The reality check</h2>
<p>A week in, I called the vet again, and this time reached a person. That's when I learned the phrase that reorganized the whole situation: <strong>Rabies Vector Species.</strong></p>
<p>Raccoons are RVS. Keeping one in Tennessee is illegal. There is no live test for rabies — the only way to test an animal is to euthanize it and examine its brain tissue. And because of that, any reported scratch or bite is legally an <em>exposure</em>, the kind that can trigger a state-mandated euthanasia order for the animal and a shot series for you.</p>
<p>I thought about the little claw-scratches on my forearms — the ones that go pink for a minute and never break the skin — the way anyone thinks about them after a sentence like that. The two sweet, sleeping animals in my bathroom had quietly become contraband.</p>
<h2>&quot;Let them die.&quot;</h2>
<p>The official channels were a wall. The state wildlife agency, TWRA, didn't call back. A state-listed nature park — one of the places you're <em>supposed</em> to call — finally put a human on the phone, and when I asked what I should do, the answer was three words.</p>
<p>&quot;Let them die.&quot;</p>
<p>I want you to sit with how that lands when you've spent a week keeping two orphans alive, when they're asleep in your bathtub curled against a warm water bottle. For an afternoon I genuinely believed my only real options were to break the law for five months — raise them in secret to a soft release in the fall, build a predator-proof enclosure, slowly wean them back to wild — or to do what the woman on the phone said.</p>
<h2>The underground railroad</h2>
<p>I refused that, and kept digging. What I found is that the compassion doesn't live in the official system. It lives in a quiet network of people who took the trouble to get licensed for the animals nobody else will touch.</p>
<p>A licensed rehabber named Geri Wynn didn't have room herself, but she had something better: a number. A woman named Marybeth, at a small rescue called Mountain Tails — texts only, because she's a volunteer running flat-out. I sent her photos and the whole story. She wrote back that she'd take them. The only catch was two hours of interstate: she's near Knoxville.</p>
<h2>The six o'clock run</h2>
<p>It was just Mason and me for the drive — the boys were with their mom that night. We packed the kits into a carrier lined with the towels they'd been sleeping on, tucked a freshly filled hot water bottle, wrapped in a towel, in beside them, and gave them one last bottle. Then down I-81, onto I-40, the light going gold and then going blue.</p>
<p>By twilight we were in the Knoxville area, handing two drowsy raccoons to exactly the right person. Here's the moment we met Marybeth and passed them over — the end of the whole ordeal:</p>
<p>{{youtube:eDZ0kuEmpe4|short}}</p>
<p>Rogue caretakers for a week; a clean handoff at the end of it.</p>
<h2>The part that stays with me</h2>
<p>People love the statistic that a raccoon can live twenty years in captivity and only two or three in the wild. It's true, and it's the exact thought that tempts you to keep them. But those twenty-year raccoons live in professional zoos and nature centers, not living rooms. Raccoons aren't domesticated — that takes millennia — and around a year old their hormones arrive and the cuddly kit becomes a territorial adult that bites the hands that fed it and opens holes in your walls. Which is why the people who try to keep them almost always end up caging them for everyone's safety. Fifteen or twenty years in a cage isn't a kindness. A shorter, wilder life is the better one.</p>
<p>Here's what I can't shake. The laws that turned Charls and Doozy into contraband exist for a real reason — rabies is genuinely terrible, and public health matters. But the system built on top of that reason ends up punishing the exact instinct it should be able to rely on. An ordinary person who finds two helpless animals is left with three doors: break the law, drive a hundred miles, or let them die. I got lucky enough — and stubborn enough — to find the second door.</p>
<p>Charls and Doozy are safe now, growing up with other kits, eating the right things, learning to be the wild animals they were always going to be. That's the whole reward. It shouldn't have been that hard to get to.</p>
]]></content:encoded>
    </item>
    <item>
      <title>My Cognitive &amp; Longevity Stack</title>
      <link>https://timbeach.com/a/my-cognitive-and-longevity-stack/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/my-cognitive-and-longevity-stack</guid>
      <pubDate>Thu, 02 Jul 2026 00:00:00 +0000</pubDate>
      <description>A software engineer's morning-to-night health stack, framed as a build/runtime/shutdown cycle — why a dawn run and sunlight anchor the cortisol curve, how the D3→K2→magnesium→omega-3 pieces interlock, and why the timing is the real intervention. A log, not a prescription.</description>
      <content:encoded><![CDATA[<p><img src="pix/health-span.png" alt="Health-span: the goal is to keep the good years, not just the years" /></p>
<p>Yes, I'm aware. I'm in my health-bro phase. There's a pill box with three compartments, a bottle of methylene blue on the counter, and I will, if you let me, talk to you about my morning cortisol curve. I've made peace with it. Read on at your own risk.</p>
<p>This is a log, not a prescription. It's what I take, when I take it, and — the part I actually care about — <em>why</em>, in the order the day asks for it. I'm a software engineer, not a doctor. Some of what's below is prescription-grade (there's a compounded capsule and a bottle of methylene blue in here), arrived at with actual medical guidance for my own body. Copy none of it blindly. Read it the way you'd read someone else's dotfiles: interesting, opinionated, and absolutely not guaranteed to run on your machine.</p>
<p>There's a real reason underneath the theater, and I'll put it plainly because it's the truest thing in this article: my partner asked me, specifically, to try to outlive them. To max my healthspan so that when it matters, I'm still here. That's the whole optimization function. Everything below — the run, the drops, the timing — is in service of a promise I intend to keep.</p>
<p>The frame that makes the whole thing legible is one every developer already knows. A day has a <strong>build</strong> (the morning, when you bring the system up), a <strong>runtime</strong> (midday, when it does real work under load), and a <strong>shutdown</strong> (evening, when you bring it down cleanly so it comes back healthy tomorrow). Everything I do is timed to one of those three phases. And it all rides on top of a single curve I don't take in a pill at all: cortisol.</p>
<h2>Phase 0: The Cold Start</h2>
<p>Before any capsule, before coffee, before I've looked at a screen — I move for thirty minutes. First thing, on waking. When the trail isn't sheeted in ice, that's a roughly two-mile run through the hills where I live in Appalachia, and always, ice or not, it's sunlight straight into my eyes. That's the whole boot sequence: get up, get outside, get light, get the heart rate up.</p>
<p>I can tell you plainly that on the mornings I hit this, the entire day runs better — steadier focus, a calmer baseline, sleep that lands harder that night. For a long time I assumed the reason was vague and motivational. It isn't. It's cortisol, and cortisol has a terrible reputation it mostly doesn't deserve.</p>
<p>Cortisol is not the stress villain the wellness internet made it into. It's your body's <em>wake-up-and-go</em> signal — the hormone that pulls you out of sleep's basement and brings the lights up. It follows a daily curve on purpose: there's a sharp, healthy spike in the first hour after waking, called the <strong>cortisol awakening response</strong>, and then it's meant to taper down all day long until it bottoms out at night so melatonin can take the room. A good day is a <em>steep morning peak and a clean downslope</em>. A bad day is a flat, smeared-out curve — groggy in the morning, wired at midnight.</p>
<p>Morning light and a hard run don't manufacture some toxic stress spike. They <strong>sharpen and anchor the spike your circadian rhythm already wants.</strong> The light hits your eyes and tells the master clock &quot;it's morning, start the timer&quot; — which is also what schedules melatonin to arrive about sixteen hours later. The run drives the awakening cortisol response up crisp and early, exactly where it belongs, so it has the whole day to fall. You're not adding stress; you're giving the curve a clean leading edge.</p>
<p>Which is the entire reason I <em>don't</em> exercise in the evening. A hard workout at night spikes cortisol precisely when the curve is supposed to be scraping the floor — it fights the downslope, delays the melatonin handoff, and turns &quot;tired&quot; into &quot;tired and wired.&quot; Morning movement and evening shutdown aren't two habits. They're the same curve, respected at both ends.</p>
<h2>Phase 1: Early — The Morning Baseline</h2>
<p><strong>Timing:</strong> first thing in the morning, with breakfast or a source of healthy fats.
<strong>Delivery:</strong> the capsules go down with a large glass of water carrying one to two vertical drops of methylene blue.</p>
<p>This is the build phase. Bring the core systems up, and — critically — bring them up in the right order, because several of these depend on each other.</p>
<p><strong>7-in-1 compounded capsule</strong> — tadalafil (8.5 mg), finasteride (1.2 mg), minoxidil (3 mg), biotin (2.5 mg), vitamin B12 (1 mg), vitamin D3 (0.05 mg / 2000 IU), L-theanine (50 mg). This is the anchor of the morning schedule: systemic vascular health and the baseline daily maintenance for hair, folded into a single capsule so there's nothing to forget.</p>
<p><strong>Vegan vitamin K2 + D3</strong> — vitamin D3 (125 mcg / 5000 IU) and vitamin K2 as MK-7 (90 mcg). This is the safety switch, and it's a genuinely elegant piece of systems design. The heavy D3 dose aggressively pulls calcium into the bloodstream — good for immune function and mood — but calcium in the blood has to <em>go somewhere</em>. The K2, in its long-acting MK-7 form, activates the proteins that route that calcium straight into your bone matrix instead of letting it settle in your arteries. D3 opens the valve; K2 points the pipe. You do not want the first without the second.</p>
<p><strong>Vegan omega-3 algae oil</strong> — algal oil (1000 mg, providing 300 mg DHA and 150 mg EPA) plus black seed oil (200 mg). Two jobs. It supplies the fatty-acid building blocks for the cell membranes in the brain and lowers systemic inflammation — and it's the fat delivery mechanism the fat-soluble vitamins ride in on. Take D3 and K2 dry and you absorb a fraction of them; take them alongside this and the morning stack actually lands.</p>
<p><strong>Vitamin C (1000 mg)</strong> — a potent antioxidant, and here it's doing shift work. It helps <em>modulate</em> the morning cortisol output — not blunt it. Remember, I <em>want</em> that awakening spike from Phase 0; vitamin C keeps it from overshooting into a jittery fight-or-flight state and protects the nervous system while the curve does its job. It's the software governor on the hardware spike.</p>
<p><strong>Methylene blue (1 to 2 drops / 2.5–5 mg), in the water glass</strong> — the one that sounds like a chemistry-set prank and isn't. At this titrated low dose it's an elite mitochondrial respiration enhancer: it works at the cellular level to optimize how the brain turns glucose into ATP — actual energy. As a bonus, at this dose it acts as a highly selective MAO-A inhibitor, gently slowing the breakdown of serotonin and dopamine to hold a stable mood and steady baseline focus. Low and vertical-drop-measured is the whole game here; this is not a &quot;more is better&quot; molecule.</p>
<h2>Phase 2: Middle — The Midday Cognitive Peak</h2>
<p><strong>Timing:</strong> around noon to 1:00 PM, with lunch or a light snack.
<strong>Objective:</strong> spin the processor up right when afternoon fatigue starts trying to derail complex engineering logic.</p>
<p>This is the runtime phase — peak load, real work.</p>
<p><strong>Alpha BRAIN (standard dose)</strong> — temporarily elevates acetylcholine, the neurotransmitter behind processing speed, working memory, and flow state. There's a deliberate timing trick in dosing it at midday rather than morning: it pushes the acetylcholine peak back just far enough to feed vivid dream recall that night, without making early evening feel frantic.</p>
<p><strong>Organic lion's mane mushroom (2 g)</strong> — works with Alpha BRAIN but on a completely different timescale. Where the nootropic is an acute boost, lion's mane stimulates NGF (nerve growth factor), supporting actual neurogenesis — the growth and repair of brain cells. One is today's performance; the other is next year's hardware.</p>
<p><strong>B-complex (1 capsule)</strong> — vitamin C (60 mg), thiamin (25 mg), riboflavin (20 mg), niacin (25 mg), B6 (5 mg), folate (680 mcg DFE), B12 (100 mcg), biotin (1000 mcg), pantothenic acid (5.5 mg). Placed at midday on purpose: these are the water-soluble enzymatic cofactors the brain needs to convert lunch into usable cognitive fuel, and they're what physically lets the body synthesize the dopamine and acetylcholine the nootropics are trying to unlock. Cofactors before the reaction, not after.</p>
<p><strong>Rhodiola rosea root extract (250 mg)</strong> — an adaptogen, and the load-bearing member of the afternoon. It regulates the stress response and shields against the slow grind of a heavy cognitive day, holding attention through sustained load <em>without</em> borrowing energy from the evening. No crash to pay back at dinner.</p>
<h2>Phase 3: Late — The Evening Code Reset</h2>
<p><strong>Timing:</strong> 30 to 60 minutes before sleep.
<strong>Objective:</strong> shut down the analytical logic loops, protect sleep architecture, and open the door to dream integration.</p>
<p>This is the shutdown phase — and a clean shutdown is what makes tomorrow's cold start possible.</p>
<p><strong>Magnesium glycinate (240 mg)</strong> — the metabolic anchor of the entire routine, and the piece that closes the loop I opened at breakfast. It's highly bioavailable and deeply calming to the central nervous system, and it's a hard requirement for the body to actually process and activate the vitamin D3 from the morning. It relaxes muscle tissue and eases the brain out of its high-beta coding state. The morning's D3 and the night's magnesium are two ends of one dependency — take the first without eventually taking the second and you've left a transaction half-committed.</p>
<p><strong>L-theanine (200 mg, standalone)</strong> — crosses the blood-brain barrier to promote alpha waves, the signature of relaxed alertness. Layered over the lingering afternoon B6 and Alpha BRAIN, this bedtime dose stabilizes the REM cycles and — the part I find genuinely remarkable — softens the emotional <em>brutality</em> of dreams. The subconscious landscape stays vivid and meaningful instead of turning stressful. (If you want to know what those landscapes actually look like, that's a different article.)</p>
<h2>The Stack Is a System</h2>
<p>None of these pieces stands alone, and that's the whole point. The morning D3 is inert without the evening magnesium. The fat-soluble vitamins don't land without the omega-3 riding shotgun. The midday acetylcholine peak is timed to arrive as dreams that night. The vitamin C governs a cortisol spike I deliberately provoked with a run at dawn. And every capsule in every phase is just riding a curve that light and movement set before I'd swallowed anything at all.</p>
<p>That's the part worth taking, if you take nothing else: the timing <em>is</em> the intervention. A supplement in the wrong phase is noise; the same supplement in the right phase is signal. Build in the morning, run under load at midday, shut down cleanly at night — and let the cortisol curve, not the pill box, be the thing you actually optimize.</p>
<p>Log, not prescription. Talk to someone with a medical degree before you touch any of this. But do go outside in the morning and get the light in your eyes — that one's free, and it's the load-bearing wall for everything else.</p>
<p>And if you've got someone who asked you to stick around: optimize for them. It's the best-specified requirement I've ever been handed.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Use the Best Model. Your Time Is the Expensive Part.</title>
      <link>https://timbeach.com/a/use-the-best-model/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/use-the-best-model</guid>
      <pubDate>Sun, 28 Jun 2026 00:00:00 +0000</pubDate>
      <description>The economic case for defaulting to the best frontier model on interactive engineering work — the model is cheap, your hours aren't — plus the five specific situations where stepping down is the right call.</description>
      <content:encoded><![CDATA[<p><img src="pix/claude-is-cheap.png" alt="The model is cheap; your time is the expensive part." /></p>
<p>A senior engineer I respect asked me a fair question last week: <em>Is there a reason you're always using the latest, best Claude model?</em></p>
<p>My answer was one sentence. Because it's the best, most capable model, and my time is a valuable resource.</p>
<p>That sounds glib, so let me show the arithmetic underneath it, and then — because every good default has an edge — the cases where reaching for the best model is the wrong move.</p>
<h2>The asymmetry nobody prices correctly</h2>
<p>The instinct to reach for a cheaper model treats the model as the expensive thing. For interactive engineering work, that's backwards.</p>
<p>Compare the two costs honestly. A frontier model, used interactively for an hour of hard problem-solving, costs a few dollars — and on a flat-rate plan, the marginal cost of that hour is effectively zero. An hour of a senior engineer's time, fully loaded, costs the company one to two orders of magnitude more than that.</p>
<p>So the real question is never &quot;should I spend money on the model?&quot; It's &quot;should I spend a small, known amount to de-risk a large, known amount?&quot; The model is cheap. The hour is expensive. When the cheap thing makes the expensive thing go faster — even a little — you buy the cheap thing every single time. That's not extravagance. That's the most basic kind of leverage there is.</p>
<p>I have a personal subscription that costs a hundred dollars a month. For the work it lets me do, that is absurdly cheap. And I'll happily put my own account against company work, because the thing I'm actually conserving — the genuinely scarce resource — is my attention and my hours, which cost far more than the subscription either way.</p>
<h2>The best tools humans have ever had</h2>
<p>Step back from the spreadsheet for a second. This is the most remarkable time in history to be an engineer. We have the best tools humans have ever had for doing intellectually hard work, and they get better every few months.</p>
<p>When that's true, deliberately handicapping yourself with a weaker tool — to save a rounding error — is a strange way to treat the privilege. You wouldn't ask a surgeon to use last decade's instruments to shave a few dollars off the tray. The value is in the outcome, not the consumable.</p>
<p>And the empirical part matters as much as the economic one: every time I've switched off the frontier model on its highest reasoning setting for serious work, I've gotten worse results. Not catastrophically worse — subtly worse. More back-and-forth, more missed edge cases, more of my time spent correcting instead of building. The cost of &quot;saving money on the model&quot; shows up immediately as a tax on the expensive resource.</p>
<h2>When the best model is the wrong call</h2>
<p>A default isn't a dogma. &quot;Always use the best model&quot; is my default precisely <em>because</em> I know when to break it. Here's when I do.</p>
<p><strong>When the task saturates.</strong> Refactoring one file to do something obvious. Renaming across a project. Mechanical transforms where every model gets it right. When the task is trivial enough that the cheapest model produces identical output, the quality difference is zero, so you optimize for speed and cost instead. There's no leverage to capture when there's no gap to close.</p>
<p><strong>When you're running inference at volume, not interacting.</strong> This is the big one, and it's where the economics flip completely. Interactive coding is a handful of calls an hour. A production feature that calls a model on every request — millions of times a day — lives in a totally different cost regime. There, per-token price dominates, and the right move is to evaluate models against your actual task and pick the smallest one that clears the bar. The discipline isn't &quot;always biggest&quot; or &quot;always cheapest.&quot; It's: measure, then right-size. Interactive work and batch inference are different problems with different answers.</p>
<p><strong>When latency is the product.</strong> Some paths have a hard responsiveness budget — autocomplete, an interactive UI, anything a human is drumming their fingers waiting on. A faster, smaller model that answers in two hundred milliseconds can beat a smarter one that takes three seconds, because here speed <em>is</em> the quality.</p>
<p><strong>When you're deliberately building your own skill.</strong> Sometimes I work a problem with no assistance on purpose, slowly, because the point is to deepen my own understanding, not to ship. That's a real reason to step down — but be honest that it costs the company more of your expensive hours, and choose it knowingly.</p>
<p><strong>When constraints decide for you.</strong> Privacy rules, on-prem requirements, reproducibility needs — sometimes the best model simply isn't on the table, and the question is moot.</p>
<h2>The principle under all of it</h2>
<p>Notice what every exception has in common: each one is a place where the gap between best and good-enough has genuinely closed, or where a different axis — speed, scale, cost-at-volume, privacy — has become the thing that matters. The exceptions don't contradict the rule. They <em>define</em> it.</p>
<p>So the rule is: for hard, interactive, judgment-heavy work — which is most of what I'm paid to do — use the best model on its highest setting, because your time is the expensive part and the model is the cheap part. Step down only when you can name the specific reason the gap has closed. If you can't name it, you're not saving money. You're taxing your most expensive resource to feel frugal about your cheapest one.</p>
<p>That's the whole argument. The model is cheap. Your judgment is not. Spend accordingly.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Three Coming-Soon Sites on One VPS: nginx, Let's Encrypt, and a Repo Each</title>
      <link>https://timbeach.com/a/three-coming-soon-sites-on-one-vps/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/three-coming-soon-sites-on-one-vps</guid>
      <pubDate>Tue, 16 Jun 2026 00:00:00 +0000</pubDate>
      <description>A repeatable, verify-as-you-go routine for taking three domains from fresh DNS to HTTPS-with-auto-renewing-certs and a private repo each — on one VPS, in about twenty minutes.</description>
      <content:encoded><![CDATA[<p><img src="pix/coming-soon-sites-article.png" alt="Three coming-soon sites served from one VPS with nginx, Let's Encrypt TLS, and a private repo each" /></p>
<p>There's a satisfying little corner of web ops where a handful of commands take you from &quot;I just bought a domain&quot; to &quot;it's live, on HTTPS, with auto-renewing certs and version control.&quot; This is a walkthrough of doing that for <strong>three</strong> domains at once on a single VPS — each getting its own nginx server block, its own Let's Encrypt certificate, a distinctive static &quot;coming soon&quot; page, and its own private GitHub repo.</p>
<p>The whole thing is maybe twenty minutes of work once DNS has propagated. The value isn't any single step — it's having a <strong>repeatable, verifiable</strong> routine so the tenth domain is as boring as the first.</p>
<p>The stack: Debian 12, nginx 1.22, certbot 2.1, the GitHub CLI, and plain static HTML.</p>
<h2>The shape of the work</h2>
<p>Five phases, each with a verification step before moving on:</p>
<ol>
<li><strong>DNS</strong> — point apex + <code>www</code> at the box, and <em>prove</em> it resolves.</li>
<li><strong>nginx</strong> — one HTTP server block per site, enabled via symlink.</li>
<li><strong>TLS</strong> — let certbot issue certs and rewrite the configs for HTTPS + redirect.</li>
<li><strong>Pages</strong> — a self-contained <code>index.html</code> per site, deployed with <code>scp</code>.</li>
<li><strong>Repos</strong> — one private GitHub repo per site, with a collaborator invited.</li>
</ol>
<p>The recurring theme: <strong>never trust a step you didn't verify.</strong> Every phase below ends with a command whose output you actually read.</p>
<h2>1. DNS, and proving it</h2>
<p>For each domain, create four records pointing apex (<code>@</code>) and <code>www</code> at the VPS — an <code>A</code> record for IPv4 and an <code>AAAA</code> for IPv6:</p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Host</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>A</td>
<td><code>@</code></td>
<td><code>203.0.113.10</code></td>
</tr>
<tr>
<td>A</td>
<td><code>www</code></td>
<td><code>203.0.113.10</code></td>
</tr>
<tr>
<td>AAAA</td>
<td><code>@</code></td>
<td><code>2001:db8::10</code></td>
</tr>
<tr>
<td>AAAA</td>
<td><code>www</code></td>
<td><code>2001:db8::10</code></td>
</tr>
</tbody>
</table>
<p>(Those are documentation-range placeholders — substitute your server's real addresses.)</p>
<p>Before requesting any certificates, confirm every name resolves. certbot's HTTP-01 challenge fails if DNS isn't live yet, and the failure messages are vague enough to waste your afternoon:</p>
<pre><code class="language-sh">for d in example.com www.example.com; do
  printf &quot;%-26s A=%s  AAAA=%s\n&quot; &quot;$d&quot; \
    &quot;$(dig +short A $d | tr '\n' ' ')&quot; &quot;$(dig +short AAAA $d | tr '\n' ' ')&quot;
done
</code></pre>
<p>If a name comes back empty, propagation isn't done. Wait, re-run, <em>then</em> proceed.</p>
<h2>2. nginx, HTTP first</h2>
<p>Start each site as <strong>plain HTTP</strong>. This isn't laziness — certbot's nginx plugin reads your port-80 server block, then rewrites it in place to add the TLS bits. Give it a clean starting point and it does the tedious part for you.</p>
<p><code>/etc/nginx/sites-available/example.com</code>:</p>
<pre><code class="language-nginx">server {
    listen 80;
    listen [::]:80;

    server_name example.com www.example.com;

    root /var/www/example.com;
    index index.html index.htm;

    location / {
        try_files $uri $uri/ =404;
    }

    # Security headers
    add_header X-Frame-Options &quot;SAMEORIGIN&quot; always;
    add_header X-Content-Type-Options &quot;nosniff&quot; always;
    add_header Referrer-Policy &quot;no-referrer-when-downgrade&quot; always;
    add_header Content-Security-Policy &quot;default-src 'self' http: https: data: blob: 'unsafe-inline'&quot; always;

    # Gzip
    gzip on;
    gzip_vary on;
    gzip_min_length 1024;
    gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml+rss;

    # Cache static assets
    location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff2)$ {
        expires 1y;
        add_header Cache-Control &quot;public, immutable&quot;;
    }

    # Allow the ACME challenge, deny other dotfiles
    location ~ /\.well-known/acme-challenge/ { allow all; }
    location ~ /\.                           { deny all; }
}
</code></pre>
<p>The two <code>location</code> blocks at the end matter: the catch-all <code>/\.</code> dotfile deny would otherwise also block <code>/.well-known/acme-challenge/</code>, which is exactly the path Let's Encrypt needs to reach. Allow it explicitly <em>before</em> the deny.</p>
<p>Enable each site with a symlink and reload:</p>
<pre><code class="language-sh">for d in example.com; do
  ln -sf /etc/nginx/sites-available/$d /etc/nginx/sites-enabled/$d
  echo &quot;&lt;h1&gt;$d — coming soon&lt;/h1&gt;&quot; &gt; /var/www/$d/index.html   # placeholder
done

nginx -t &amp;&amp; systemctl reload nginx
</code></pre>
<blockquote>
<p><strong>A real gotcha:</strong> one of my domains already had a config sitting in <code>sites-enabled</code> as a <em>regular file</em> rather than a symlink. Mixed conventions like that are how you end up with a site that mysteriously won't update. I deleted it and re-created it as a symlink so all sites follow the same <code>sites-available</code> → <code>sites-enabled</code> pattern. Pick one convention and let nothing drift from it.</p>
</blockquote>
<h2>3. TLS, the easy way</h2>
<p>certbot's nginx plugin does issuance <em>and</em> installation in one shot. Cover both apex and <code>www</code> in a single cert, and pass <code>--redirect</code> so it also writes the HTTP→HTTPS 301:</p>
<pre><code class="language-sh">for d in example.com; do
  certbot --nginx -d &quot;$d&quot; -d &quot;www.$d&quot; \
    --non-interactive --agree-tos --redirect \
    -m you@example.com
done

nginx -t &amp;&amp; systemctl reload nginx
</code></pre>
<p>For each site, certbot rewrites the config to:</p>
<ul>
<li>add <code>listen 443 ssl</code> for IPv4 and IPv6, with the cert/key under <code>/etc/letsencrypt/live/&lt;domain&gt;/</code>,</li>
<li>include the recommended <code>options-ssl-nginx.conf</code> and <code>ssl-dhparams.pem</code>,</li>
<li>append a second <code>server {}</code> that 301-redirects port 80 to <code>https://</code>.</li>
</ul>
<p>Renewal is handled by certbot's own systemd timer — there's no cron line to write and nothing to remember. Certs are 90-day; the timer renews them well ahead of expiry.</p>
<p><strong>Verify the whole TLS story in one loop</strong> — redirect on 80, 200 on 443, and <code>www</code> behaving:</p>
<pre><code class="language-sh">for d in example.com; do
  echo &quot;=== $d ===&quot;
  curl -sS -o /dev/null -w &quot;  http  -&gt; %{http_code} -&gt; %{redirect_url}\n&quot; &quot;http://$d&quot;
  curl -sS -o /dev/null -w &quot;  https -&gt; %{http_code}\n&quot;                    &quot;https://$d&quot;
  curl -sS -o /dev/null -w &quot;  www   -&gt; %{http_code} -&gt; %{redirect_url}\n&quot; &quot;http://www.$d&quot;
done
</code></pre>
<p>You want <code>301 → https://…</code>, then <code>200</code>, then <code>301</code> again. If you see a <code>200</code> on plain HTTP, your redirect didn't land.</p>
<h2>4. Pages worth landing on</h2>
<p>A &quot;coming soon&quot; page is a tiny canvas, which makes it a fun one. I kept each page a <strong>single self-contained <code>index.html</code></strong> — inline CSS and JS, web fonts, no build step. That keeps deployment to a one-line <code>scp</code> and keeps each repo trivially simple. Rather than one shared template, I gave each domain its own character:</p>
<ul>
<li>a dark, instrument-panel look with a live oscilloscope trace drawn on a <code>&lt;canvas&gt;</code>;</li>
<li>a light, editorial layout with slowly drifting topographic contour lines in SVG;</li>
<li>a retro amber CRT terminal, scanlines and all, that types out a little boot sequence.</li>
</ul>
<p>All three honor <code>prefers-reduced-motion</code> — if a visitor's OS asks for less animation, the motion stops and the page renders static. That's a one-line media query and there's no excuse to skip it.</p>
<p>Deploy and confirm what's actually being served, not just what's on disk:</p>
<pre><code class="language-sh">for d in example.com; do
  scp &quot;$d/index.html&quot; &quot;vps:/var/www/$d/index.html&quot;
done

for d in example.com; do
  printf &quot;%-24s &quot; &quot;$d&quot;; curl -sS &quot;https://$d&quot; | grep -o '&lt;title&gt;[^&lt;]*&lt;/title&gt;'
done
</code></pre>
<h2>5. A private repo per site</h2>
<p>Each site gets its own private GitHub repo, created and pushed straight from the local directory with the GitHub CLI. If you juggle multiple GitHub accounts, set the right one active first:</p>
<pre><code class="language-sh">gh auth switch --user your-account
</code></pre>
<p>Then, from each site's directory (holding <code>index.html</code>, a <code>README.md</code>, and a <code>.gitignore</code>):</p>
<pre><code class="language-sh">git init -b main
git add -A
git commit -m &quot;Coming soon page for example.com&quot;

# create the private repo from this directory and push in one step
gh repo create &quot;your-account/example.com&quot; --private --source=. --remote=origin --push

# invite a collaborator with push (write) access
gh api -X PUT &quot;repos/your-account/example.com/collaborators/their-username&quot; -f permission=push
</code></pre>
<p>A small thing that trips people up: GitHub repo names may contain dots, so naming the repo <code>example.com</code> — matching the domain exactly — is perfectly valid and keeps the mapping between repo and site obvious.</p>
<p>The collaborator step is worth understanding precisely. On a <strong>private</strong> repo, adding a collaborator doesn't grant instant access — it creates an <strong>invitation</strong>. Until the person accepts it (via the email GitHub sends, or the repo page, or their notifications), they're listed as a <em>pending</em> invite, not an active collaborator. So &quot;I added you&quot; and &quot;you can push&quot; are two events with the other person's click in between. Verify the invitation went out with the right permission:</p>
<pre><code class="language-sh">gh api &quot;repos/your-account/example.com/invitations&quot; \
  --jq '.[] | &quot;\(.invitee.login) · \(.permissions)&quot;'
# -&gt; their-username · write
</code></pre>
<p>And later, once they've accepted, the pending list empties and this returns their level:</p>
<pre><code class="language-sh">gh api &quot;repos/your-account/example.com/collaborators/their-username/permission&quot; --jq '.permission'
</code></pre>
<h2>What you're left with</h2>
<p>Per domain: HTTPS with an auto-renewing certificate, HTTP and <code>www</code> both 301-ing to the canonical <code>https://</code> apex, a static page served from <code>/var/www/&lt;domain&gt;/</code>, and a private repo with history. Updating a page later is two independent pushes — one to GitHub, one to the server:</p>
<pre><code class="language-sh">git add index.html &amp;&amp; git commit -m &quot;update&quot; &amp;&amp; git push
scp index.html vps:/var/www/&lt;domain&gt;/index.html
</code></pre>
<p>There's deliberately no CI here; for a coming-soon page, a GitHub Action that deploys on push would be the obvious next increment, and the natural place to grow this into a real pipeline once the actual sites take shape.</p>
<h2>The reusable checklist</h2>
<p>Strip away the prose and the routine for the next domain is short enough to keep in your head:</p>
<ol>
<li>DNS: <code>A</code> + <code>AAAA</code> for <code>@</code> and <code>www</code> → the box; verify with <code>dig</code>.</li>
<li><code>mkdir -p /var/www/&lt;domain&gt;</code>.</li>
<li>Drop the nginx server block in <code>sites-available</code>, symlink into <code>sites-enabled</code>.</li>
<li><code>nginx -t &amp;&amp; systemctl reload nginx</code>.</li>
<li><code>certbot --nginx -d &lt;domain&gt; -d www.&lt;domain&gt; --redirect</code>.</li>
<li>Build <code>index.html</code>; <code>scp</code> it up.</li>
<li><code>gh repo create &lt;owner&gt;/&lt;domain&gt; --private --source=. --push</code>.</li>
<li>Invite collaborators; verify visibility, redirects, and a <code>200</code> on HTTPS.</li>
</ol>
<p>Eight steps, each with a way to check it worked. That's the whole trick — not the commands themselves, but refusing to move to the next one until the current one is proven.</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Change Your LUKS Passphrase (and Other Sysadmin-y Things)</title>
      <link>https://timbeach.com/a/change-your-luks-passphrase/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/change-your-luks-passphrase</guid>
      <pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate>
      <description>The add-verify-kill sequence that changes a LUKS passphrase with zero lockout risk, why usermod refuses to rename a logged-in user (and the detached-script trick around it), and the stale /etc references a rename leaves behind.</description>
      <content:encoded><![CDATA[<p><img src="pix/change-your-luks-passphrase.png" alt="Changing a LUKS passphrase" /></p>
<p>Every encrypted Linux install eventually needs its passphrase changed. Maybe the machine changed hands, maybe the passphrase has been <code>hunter2</code> since the day you imaged it. The change itself is three commands — but it's a change where a wrong move locks you out of your own disk, so the procedure below is built around never having a moment without a known-good passphrase.</p>
<p>I hit this on an Aegix box this week, along with two smaller identity chores — renaming a user and changing a password — that have their own sharp edges, so those are covered after the main event. Aegix is Artix-based and runs runit, but everything here is init-agnostic: it works the same on any Linux with shadow utils and LUKS2.</p>
<h2>Changing a LUKS passphrase</h2>
<p>Don't use <code>luksChangeKey</code> — it's an in-place swap with no checkpoint. Use add, verify, <em>then</em> kill: the old passphrase and the new one are both valid through the middle of the procedure, and the old one only dies after the new one has proven itself.</p>
<p>First find your LUKS device:</p>
<pre><code class="language-sh">lsblk -f | grep -i crypto
</code></pre>
<p>On a stock Aegix install that's the partition under your <code>aegixluks</code> mapper — call it <code>/dev/sda2</code> here.</p>
<p><strong>Step 1 — add the new passphrase to a free keyslot.</strong> It asks for an existing passphrase first, then the new one twice:</p>
<pre><code class="language-sh">sudo cryptsetup luksAddKey /dev/sda2
</code></pre>
<p><strong>Step 2 — prove the new passphrase actually unlocks the disk.</strong> Type the <em>new</em> one:</p>
<pre><code class="language-sh">sudo cryptsetup open --test-passphrase /dev/sda2 &amp;&amp; echo GOOD
</code></pre>
<p>Silence plus <code>GOOD</code> is what you want. If this fails, stop — you still have the old passphrase, nothing is lost, try the add again.</p>
<p><strong>Step 3 — see which keyslots are occupied:</strong></p>
<pre><code class="language-sh">sudo cryptsetup luksDump /dev/sda2 | grep -A2 Keyslots
</code></pre>
<p>You should see two slots now — the original (usually <code>0</code>) and your new one (usually <code>1</code>).</p>
<p><strong>Step 4 — kill the old slot.</strong> When it prompts, give it the <strong>new</strong> passphrase; it's asking you to prove a surviving key still works, not to identify the victim:</p>
<pre><code class="language-sh">sudo cryptsetup luksKillSlot /dev/sda2 0
</code></pre>
<p>Two rules make this bulletproof: never reboot between steps 1 and 2, and never run step 4 until step 2 has printed <code>GOOD</code>. The next reboot — unlocking with the new passphrase at the initramfs prompt — is your end-to-end confirmation.</p>
<h2>Renaming a user</h2>
<p>The commands themselves are two lines:</p>
<pre><code class="language-sh">sudo usermod -l newname oldname            # rename the account
sudo usermod -d /home/newname -m newname   # rename and move the home dir
</code></pre>
<p>If the user has a personal primary group (most setups), rename that too:</p>
<pre><code class="language-sh">sudo groupmod -n newname oldname
</code></pre>
<p><strong>The sharp edge:</strong> <code>usermod -l</code> refuses to run while the target user owns <em>any</em> process — and on a desktop, your X session is a wall of those processes. Worse, you can't be logged in as the user to type the command, because the login itself is a blocking process. The error looks like:</p>
<pre><code>usermod: user oldname is currently used by process 1234
</code></pre>
<p>The clean fix: log all the way out of X, switch to a spare TTY (Ctrl+Alt+F2), log in as root (or another wheel user), and run the commands from there. No processes, no complaints.</p>
<p>If the machine is headless or you only have SSH — where your own session is the blocker — detach the rename from your login entirely. Launch it as a root-owned background script, then disconnect before it fires:</p>
<pre><code class="language-sh">sudo sh -c 'setsid sh -c &quot;
  sleep 20
  pkill -9 -u oldname
  sleep 3
  usermod -l newname oldname
  usermod -d /home/newname -m newname
&quot; &gt; /tmp/rename.log 2&gt;&amp;1 &lt; /dev/null &amp;'
exit
</code></pre>
<p>By the time the <code>sleep</code> runs out, your SSH session is gone, the <code>pkill</code> sweeps any stragglers, and <code>usermod</code> runs against a process-free user. Reconnect as the new name (your <code>~/.ssh/authorized_keys</code> moved with the home directory) and check <code>/tmp/rename.log</code>.</p>
<p><strong>Afterward, sweep for stale references.</strong> The rename updates <code>/etc/passwd</code> and friends, but not everything:</p>
<pre><code class="language-sh">grep -rl oldname /etc 2&gt;/dev/null
ls /var/spool/cron/
</code></pre>
<p>In practice the usual stragglers are <code>/etc/subuid</code> and <code>/etc/subgid</code> (container UID maps) — a one-line <code>sed</code> fixes both. <code>/etc/passwd-</code> will also match; that's just the automatic backup file, leave it. Sudo access survives untouched if it's granted through the <code>wheel</code> group rather than a per-user rule, which is one more reason to do it that way.</p>
<h2>Changing a password</h2>
<p>The easy one, included for completeness. As the user:</p>
<pre><code class="language-sh">passwd
</code></pre>
<p>Or as root, for any account:</p>
<pre><code class="language-sh">sudo passwd someuser
</code></pre>
<p>That's it — no process drama, no keyslots.</p>
<h2>The shape of all three</h2>
<p>The pattern worth keeping is in the LUKS sequence: when a change can lock you out, structure it so the old credential and the new one are both valid in the middle, verify the new one independently, and only then retire the old. It's the same instinct as keeping an SSH session open while you edit <code>sshd_config</code>. Cheap insurance, every time.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Bring Back the Hit Counter — Privately, in One File</title>
      <link>https://timbeach.com/a/bring-back-the-hit-counter/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/bring-back-the-hit-counter</guid>
      <pubDate>Fri, 12 Jun 2026 00:00:00 +0000</pubDate>
      <description>A privacy-respecting hit counter in a single file of PHP — counts each visitor once per day with salted IP hashes, no database and no tracking, and you can drop it straight into your own site.</description>
      <content:encoded><![CDATA[<p><img src="pix/bring-back-the-hit-counter.png" alt="Infographic: a refresh-proof, privacy-respecting hit counter — counts each visitor once per day, stores a salted hash instead of a raw IP, keeps one small JSON state file, stays correct under concurrency with a lock and atomic rename, drops into your footer as one PHP file, and adds no third-party tracking — beneath a retro odometer reading 37,042 hits." /></p>
<p>Every personal site used to have one: a little odometer in the footer ticking up with each visitor. They mostly disappeared, and the modern replacement is to bolt on an analytics suite that ships your readers' data to a third party in exchange for a dashboard you check twice a year.</p>
<p>That always felt like the wrong trade for a personal site. I wanted the number back without the surveillance — and it turns out a refresh-proof hit counter is about a hundred lines of PHP and a single JSON file. No database, no tracking script, nothing phoning home. There's one running in the footer of this very page. Here's how it works, and how to put one in your own footer.</p>
<h2>Counting once, not every refresh</h2>
<p>The core rule is simple: each visitor counts once per day, no matter how many times they reload. The naive version — increment on every page load — produces a number that mostly measures your own refreshing.</p>
<p>So on each request the server looks at the visitor's IP and only bumps the total if it hasn't already seen that IP today. &quot;Today&quot; is measured in UTC, so the day boundary is the same for everyone. The headline number becomes a running sum of daily-unique visits: a reload never moves it, but a genuine returning reader counts again tomorrow.</p>
<h2>Storing what you need, and nothing else</h2>
<p>This is the part I cared about most. The counter never writes a raw IP address to disk. Instead it stores a salted hash:</p>
<pre><code>sha256(salt + date + ip)
</code></pre>
<p>The salt is a random value generated once per install and kept in a file that never leaves the server. Because the date is folded into the hash and the set of &quot;seen&quot; visitors is wiped every midnight, there is no way to link a visitor from one day to the next, and nothing sensitive sits at rest. If the data file leaked, it would be a list of opaque hashes — no addresses, no browsing history, nothing reversible.</p>
<p>The entire state on disk is this:</p>
<pre><code class="language-json">{ &quot;date&quot;: &quot;2026-06-07&quot;, &quot;total&quot;: 37041, &quot;seen&quot;: { &quot;&lt;hash&gt;&quot;: 1 } }
</code></pre>
<p><code>seen</code> holds only today's hashes, so it resets daily and never grows without bound. <code>total</code> carries forward forever.</p>
<h2>The boring parts that make it correct</h2>
<p>A counter is a deceptively good little exercise in getting concurrency right, because two visitors can land on the same instant. Read-modify-write a shared file without care and you silently lose increments.</p>
<p>Two things prevent that. Every update takes an exclusive lock (<code>flock</code>) before it touches the file, so writes are serialized. And the new state is written to a temporary file and then <code>rename</code>d over the old one — an atomic swap on POSIX filesystems, so a reader never sees a half-written file even if the process dies mid-write. There is a small test that fires fifty hits in parallel from fifty different IPs and asserts the total lands at exactly fifty; without the lock, it doesn't.</p>
<p>The salt is generated inside that same lock — a subtlety worth calling out, because it is easy to miss. Generate it outside the lock and two visitors arriving in the very first moments of a fresh install could each mint a different salt and race to write it, quietly breaking deduplication for one of them. It only matters once, on the first day of a new install, which is exactly the kind of bug that never shows up in casual testing.</p>
<h2>Dropping it on your own site</h2>
<p>The whole thing is one file, <code>count.php</code>. Copy it into your web root, add a few lines of HTML to show the number, and you are done:</p>
<pre><code class="language-html">&lt;span id=&quot;site-counter&quot; hidden&gt;&lt;/span&gt;
&lt;script type=&quot;module&quot;&gt;
  const el = document.getElementById('site-counter');
  try {
    const r = await fetch('/count.php');
    if (r.ok) {
      const { total } = await r.json();
      if (typeof total === 'number') {
        el.textContent = `👁 ${total.toLocaleString()} views`;
        el.hidden = false;
      }
    }
  } catch (_) { /* leave hidden on failure */ }
&lt;/script&gt;
</code></pre>
<p>The span starts hidden and only appears once the count loads, so if PHP is ever unavailable the page simply looks normal — no broken widget, no error a reader would ever see.</p>
<p>On Apache or typical shared hosting there is nothing else to do; PHP files execute by default. On nginx you add a small scoped block so that only this one file runs through PHP, rather than enabling it across your whole web root:</p>
<pre><code class="language-nginx">location = /count.php {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/run/php/php8.2-fpm.sock;
}
</code></pre>
<h2>Borrow it</h2>
<p>It is on GitHub under an MIT license: <a href="https://github.com/timbeach/site-counter">github.com/timbeach/site-counter</a>. One file, a README, a demo page, and the tests. Take it, change the emoji, seed it with the count from whatever you are migrating off of, and put a quiet little odometer back in your footer where it belongs.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Cron Assumes Your Computer Never Sleeps</title>
      <link>https://timbeach.com/a/cron-assumes-your-computer-never-sleeps/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/cron-assumes-your-computer-never-sleeps</guid>
      <pubDate>Thu, 11 Jun 2026 00:00:00 +0000</pubDate>
      <description>I'd run cron for a decade — on servers, where machines never sleep. Then I gave it a job on my laptop and it silently never ran. anacron is cron for computers that power off: it thinks in elapsed days, catches up after downtime, and (the part nobody mentions) rides on top of cron rather than replacing it.</description>
      <content:encoded><![CDATA[<p><img src="pix/cron-assumes-your-computer-never-sleeps.png" alt="Infographic for &quot;Cron Assumes Your Computer Never Sleeps&quot; (subtitle: &quot;Cron is a clock. Anacron is a memory.&quot;). Five panels: cron fires at a fixed moment — fine on an always-awake server, silently missed on a sleeping laptop; anacron runs overdue jobs by tracking a per-job timestamp, with a sample anacrontab line; anacron &quot;rides on cron&quot; — cron asks &quot;is it time to check?&quot;, anacron asks &quot;is anything overdue?&quot;; a laptop crontab wiring anacron via @reboot and a 5am trigger; and why it matters — leave and the laptop sleeps, come back and the work still happens. Footer: &quot;Cron keeps time. Anacron keeps promises.&quot;" /></p>
<p>For years, cron and I had an understanding. I'd hand it a line — a backup at 2am, a cert renewal on the first of the month — and it would do the thing, forever, without ever being thought about again. The best kind of tool: one you forget you're relying on. What I never noticed is that every one of those jobs lived on a <em>server</em> — a machine whose whole purpose is to never turn off. Cron kept its promises because I'd only ever asked it to keep them somewhere the lights never go out.</p>
<p>Then I gave cron a job on my laptop, and it quietly broke its word.</p>
<h2>Cron is a clock, not a calendar</h2>
<p>A cron entry is a moment, not an intention. <code>0 5 * * *</code> doesn't mean &quot;once a day&quot; — it means &quot;at 05:00, if you happen to be listening.&quot; Cron wakes every minute, checks whether the wall clock matches any of its lines, and runs what does. That's the whole model.</p>
<p>On a server it's a distinction without a difference: the clock always strikes 5 and the machine is always there to hear it. On a laptop the gap opens up. Close the lid at midnight and your 5am job doesn't run late — it doesn't run <em>at all</em>. Cron never circles back, because from its point of view nothing was ever scheduled to happen during a minute it wasn't awake to see. No error, no retry, no trace. Just a backup that silently didn't occur.</p>
<blockquote>
<p>Cron doesn't run your job daily. It runs your job at a <em>moment</em>, and trusts that you'll be there to catch it.</p>
</blockquote>
<p>The silence is the dangerous part. A job that fails loudly gets fixed. A job that simply never fires can go unnoticed until the day you reach for the thing it was supposed to have been doing all along.</p>
<h2>anacron remembers</h2>
<p><code>anacron</code> is the answer, and it's been sitting in the repos the whole time. It's built for exactly the machine cron ignores: one that powers off.</p>
<p>The trick is that anacron doesn't think in clock times at all. It thinks in <strong>elapsed days</strong>. For each job it keeps a little timestamp file recording when that job last ran. Whenever anacron gets a chance to look, it asks one question per job — <em>&quot;has it been at least N days since this last ran?&quot;</em> — and if the answer is yes, it runs it now, late or not. A job missed because the laptop was shut doesn't vanish; it runs shortly after the lid comes back up.</p>
<p>An anacrontab line trades cron's five time-fields for three plainer ones:</p>
<pre><code># period(days)  delay(min)  job-id    command
1               5           backup    /home/me/bin/backup
</code></pre>
<p>&quot;Every 1 day, wait 5 minutes after you're triggered, and remember this one under the name <code>backup</code>.&quot; No hour, no minute — because anacron's promise isn't <em>when</em>, it's <em>eventually, and soon</em>.</p>
<h2>The part nobody mentions: anacron rides on cron</h2>
<p>Here's the bit that tripped me up, and that most quick explainers skip: <strong>anacron is not a daemon.</strong> It doesn't sit in the background waiting. It runs <em>once</em> — checks what's overdue, runs it, exits. Which raises the obvious question: if it's not always running, what starts it?</p>
<p>Two things, traditionally: the machine <strong>booting</strong>, and a <strong>periodic nudge</strong> while it's up. And that periodic nudge is, almost always… cron. On many distributions anacron is literally kicked by an <code>/etc/cron.hourly</code> entry. So anacron doesn't <em>replace</em> cron — it sits on top of it. Cron answers &quot;is it time to check?&quot;; anacron answers &quot;is anything overdue?&quot;</p>
<p>That has a sharp edge if you get it backwards. Wire anacron to fire <em>only</em> at boot, and on a machine that stays up for weeks anacron never gets invoked — so your &quot;daily&quot; job never runs at all. The thing built to make jobs more reliable will, misconfigured, make them never happen. You still need a cron tick to poke it.</p>
<h2>Wiring it up for a personal machine</h2>
<p>You don't need root or the system anacron to get this. Point anacron at your own table and spool with <code>-t</code> and <code>-S</code>, and drive it from your <em>user</em> crontab:</p>
<pre><code>@reboot   anacron -t ~/.config/anacrontab -S ~/.local/var/spool/anacron
0 5 * * * anacron -t ~/.config/anacrontab -S ~/.local/var/spool/anacron
</code></pre>
<p>Two triggers, two jobs. The <code>0 5 * * *</code> line is the ordinary day — on a machine that's awake at 5am, that's when your work runs. The <code>@reboot</code> line is the safety net: come home from a week away, power on, and the first thing that happens is the overdue job finally running. Between them you get a predictable morning time <em>and</em> catch-up after downtime — the two things cron alone can't give a laptop at once.</p>
<p>My own reason for going down this road: this very site schedules its articles by date, and the RSS feed only rebuilds when I deploy — from my laptop. A small job notices when a post has come due and ships it. With plain cron, a post dated to a travel day would just… miss, and sit unpublished until I happened to redeploy by hand. With anacron, it goes out the morning I'm back online instead of never.</p>
<h2>Why bother</h2>
<p>Cron's assumptions are a <em>server's</em> assumptions: infinite uptime, an unblinking clock, someone always home to answer the door. A personal machine is the opposite of all three. It sleeps when you sleep, travels when you travel, and spends more hours dark than lit. anacron is just cron with that fact admitted up front — and once you've seen the difference, every &quot;daily&quot; job on a laptop that's really a &quot;daily, if I'm lucky&quot; job starts to itch.</p>
<p>I'd run cron for a decade and never met anacron, because servers never gave me a reason to. The reason, it turns out, was sitting closed on my desk the whole time.</p>
<p>And the small, pleasing irony: this post reached you on a schedule kept by the exact job it describes.</p>
]]></content:encoded>
    </item>
    <item>
      <title>How My Links Got Their Pictures</title>
      <link>https://timbeach.com/a/how-my-links-got-their-pictures/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/how-my-links-got-their-pictures</guid>
      <pubDate>Wed, 10 Jun 2026 00:00:00 +0000</pubDate>
      <description>The Open Graph protocol gives every shared link its title, blurb, and picture — and three traps I hit making it work on a hash-routed single-page app: the fragment that never reaches the server, the blur, and the cache that never forgets.</description>
      <content:encoded><![CDATA[<p><img src="pix/open-graph-protocol.png" alt="How My Links Got Their Pictures" /></p>
<p>Paste a link to this site into LinkedIn, or Slack, or a text message, and a little card unfurls: a title, a sentence, and a picture. That card is doing a lot of quiet work — it's the difference between a friend tapping your link and a friend scrolling past a naked blue URL.</p>
<p>For a long time, every link to this site unfurled with the <em>same</em> picture — a generic photo of me that had nothing to do with whatever article I was actually sharing. This is the story of the protocol that fixes that, and the three traps I fell into making it work on a site like mine.</p>
<h2>🔗 The protocol nobody told you about</h2>
<p>The technology is called the <strong>Open Graph protocol</strong>, and you've been looking at its output for years without knowing its name. Facebook published it in 2010 so that a shared link could carry a title, a description, and an image into the news feed. It caught on, and now essentially every platform that renders a &quot;link preview&quot; — LinkedIn, X, Slack, Discord, iMessage, WhatsApp, Signal — reads the same tags.</p>
<p>The tags live in the <code>&lt;head&gt;</code> of your HTML, and they're almost insultingly simple:</p>
<pre><code class="language-html">&lt;meta property=&quot;og:title&quot; content=&quot;How My Links Got Their Pictures&quot; /&gt;
&lt;meta property=&quot;og:description&quot; content=&quot;The protocol behind every link preview, and three traps I hit.&quot; /&gt;
&lt;meta property=&quot;og:image&quot; content=&quot;https://timbeach.com/a/how-my-links-got-their-pictures/og.png&quot; /&gt;
&lt;meta property=&quot;og:url&quot; content=&quot;https://timbeach.com/a/how-my-links-got-their-pictures/&quot; /&gt;
&lt;meta property=&quot;og:type&quot; content=&quot;article&quot; /&gt;
</code></pre>
<p>That's it. <code>og:title</code>, <code>og:description</code>, and <code>og:image</code> are the three that matter; the others are polish. There is no JavaScript, no API, no SDK. You write five lines of HTML and the entire internet's worth of chat apps suddenly know how to show your link off.</p>
<h2>🐦 Twitter wanted to be different</h2>
<p>X — Twitter, when this all started — decided it needed its own parallel set of tags, prefixed <code>twitter:</code> instead of <code>og:</code>:</p>
<pre><code class="language-html">&lt;meta name=&quot;twitter:card&quot; content=&quot;summary_large_image&quot; /&gt;
&lt;meta name=&quot;twitter:title&quot; content=&quot;How My Links Got Their Pictures&quot; /&gt;
&lt;meta name=&quot;twitter:image&quot; content=&quot;https://timbeach.com/a/how-my-links-got-their-pictures/og.png&quot; /&gt;
</code></pre>
<p>The one that does real work is <code>twitter:card</code>. Set it to <code>summary_large_image</code> and you get the big edge-to-edge picture instead of a cramped thumbnail. The good news is that Twitter falls back to your Open Graph tags for anything it can't find a <code>twitter:</code> version of — so in practice you write the <code>og:</code> tags, add <code>twitter:card</code> on top, and you're covered everywhere. I emit both on every page, belt and suspenders.</p>
<p>One quirk worth knowing: since around 2023, X often renders link cards as <em>just the image</em> with the domain stamped on it, dropping the title and description text that LinkedIn shows. That's a display choice on their end, not a mistake in your tags. Your picture still shows up large.</p>
<h2>🤖 The crawler doesn't run your code</h2>
<p>Here is the single most important fact about Open Graph, and the one that caused all my grief: <strong>the thing reading your tags is a dumb robot, not a browser.</strong></p>
<p>When you paste a link, the platform sends out a crawler — LinkedIn's is called <code>LinkedInBot</code>, Twitter's is <code>Twitterbot</code> — to fetch your page. That crawler downloads the raw HTML and reads the meta tags. It does <strong>not</strong> run your JavaScript. It does not wait for your single-page app to boot, fetch data, and render. It reads what the server hands it, on the first byte, and leaves.</p>
<p>For a normal website with real HTML pages, this is fine. For my site, it was a disaster, and to explain why I have to admit how this site is built.</p>
<h2>🪤 Trap one: the fragment that never arrives</h2>
<p>timbeach.com is a single-page app. Every article lives at a URL like <code>timbeach.com/#/article/how-tmux-works</code>. That <code>#</code> is a <em>hash fragment</em>, and the site's router watches it to decide which article to show — all in the browser, all in JavaScript.</p>
<p>Here's the problem, and it's baked into the web itself: <strong>the part of a URL after the <code>#</code> is never sent to the server.</strong> It's a client-side-only construct, by design, going back to the original purpose of fragments as &quot;jump to this anchor on the page.&quot; So when LinkedIn's crawler fetches <code>timbeach.com/#/article/how-tmux-works</code>, the server only ever sees a request for <code>timbeach.com/</code>. The crawler gets my homepage, reads the homepage's generic OG tags, and shows that same generic photo of me — no matter which article the link pointed to.</p>
<p>Two strikes, both fatal: the crawler can't run the JavaScript that would pick the right article, <em>and</em> it can't even see which article was requested. There is no clever tag I could add to fix this. The hash URL is a dead end at the protocol level.</p>
<p>The fix is to stop asking a hash URL to do a server's job. At deploy time, a script now walks every article and writes a real, honest HTML file at a real path — <code>a/how-tmux-works/index.html</code> — with that article's own Open Graph tags baked in. That's a page the crawler can actually fetch and read. A human who clicks it gets a one-line redirect into the usual single-page reader, so the experience is unchanged; only the URL you <em>share</em> is different. Crawlers read the static tags; people land in the app. Everybody gets what they came for.</p>
<h2>🌫️ Trap two: the blur</h2>
<p>I shipped the share pages, pasted a link, and there it was — the right article's image, finally. Except it was <em>blurry</em>.</p>
<p>The culprit was aspect ratio. Open Graph images want to be <strong>1200×630 pixels</strong> — a specific, slightly-wider-than-2:1 rectangle. The image I'd handed it was a 1536×1024 screenshot. When the crawler gets an image that isn't the right shape, it crops and resamples it to fit, then re-encodes the result as a compressed JPEG. For a screenshot full of small text, that round of squashing and recompression turns crisp pixels to mush.</p>
<p>Worse, a couple of my images were smaller than 1200 pixels wide, and platforms will quietly <em>demote</em> an undersized image — showing it as a tiny thumbnail off to the side instead of the big card. Same tags, completely different result, purely because of pixel dimensions.</p>
<p>The fix was to stop handing crawlers raw images and start handing them finished cards. Now the publish pipeline composites every article's image onto an exact 1200×630 canvas — the whole image, scaled to fit, centered on a dark background that matches the site, downsampled once with a good filter. The crawler receives something already the precise shape and size it wants, so it has nothing left to crop or resample. The blur is gone, and a square diagram or an undersized photo gets the same clean treatment as a perfect screenshot.</p>
<h2>♻️ Trap three: the cache that never forgets</h2>
<p>This one is the cruelest, because everything was <em>working</em> when it bit me.</p>
<p>I'd been iterating — first a plain text card, then the real image, then the sharp composited version — and each time I redeployed and re-checked the preview. At one point the preview reverted to showing an <em>old</em> version I thought I'd deleted two iterations ago. The file on my server was unambiguously the new one; I checked the bytes by hand. And yet LinkedIn kept showing the stale one.</p>
<p>Platforms cache Open Graph images aggressively, and they cache them <strong>by URL</strong>. My image had lived at the same URL the whole time — <code>.../og.png</code> — while its contents changed underneath. LinkedIn had fetched that URL early, stored the bytes, and from then on it served its copy without ever asking my server whether the image had changed. Re-scraping the <em>page</em> refreshed the tags but not the cached <em>image</em>. The URL was the cache key, the URL never changed, so the cache never expired.</p>
<p>The fix is a trick as old as web development: put a fingerprint of the contents into the filename. The card is now named after a hash of its own bytes — <code>og-de50d8b938.png</code> — so the moment the image changes, its filename changes, and therefore its URL changes, and therefore every cache on earth treats it as a brand-new image it's never seen. When nothing changes, the name stays put and the cache stays valid. You only bust the cache exactly when you mean to.</p>
<h2>🌟 The whole trick, in one breath</h2>
<p>Open Graph is a beautiful little protocol: five lines of HTML buy you a polished presence in every chat app and feed on the internet. But it rests on one assumption — that a crawler can fetch a real page and read real tags — and the moment your site bends that assumption, you find out exactly how much was riding on it.</p>
<p>If you take three things from my bruises:</p>
<ul>
<li><strong>Crawlers don't run JavaScript.</strong> If your content only exists after your app boots, the crawler will never see it. Serve real HTML with real tags at a real URL.</li>
<li><strong>Hand over a finished 1200×630 image,</strong> not a raw one. Let the crawler do as little as possible, and it can't make your picture worse.</li>
<li><strong>Fingerprint the filename</strong> so the URL changes when — and only when — the image does. Otherwise some cache, somewhere, will haunt you with a picture you killed days ago.</li>
</ul>
<p>I added a read-aloud voice to this blog last month and learned that two parsers will always eventually disagree. This month I learned that a crawler is just a very literal reader who refuses to run your code, resizes your art without asking, and never throws anything away. Build for that reader, and your links will finally look like they mean something.</p>
]]></content:encoded>
    </item>
    <item>
      <title>One Command to Paste Markdown Into Medium</title>
      <link>https://timbeach.com/a/paste-markdown-into-medium/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/paste-markdown-into-medium</guid>
      <pubDate>Tue, 09 Jun 2026 00:00:00 +0000</pubDate>
      <description>Medium closed its API — but its editor still honors the text/html clipboard flavor. So I built mdpaste, a single Rust binary that turns markdown into paste-ready rich text for Medium, Substack, and Ghost.</description>
      <content:encoded><![CDATA[<p><img src="pix/paste-markdown-into-medium.png" alt="Infographic for &quot;One Command to Paste Markdown Into Medium&quot;: an article.md terminal flows through a central text/html &quot;rich clipboard&quot; into the Medium editor, with panels on why it became a real tool (images, embeds, fixes for Medium/Substack/Ghost), the clipboard as the seam, and the invisible-newlines blockquote gotcha. Footer: &quot;Write in markdown. Copy as HTML. Paste anywhere.&quot;" /></p>
<p>I write everything in markdown. Plain text, version-controlled, the same format whether it's a README, a note to myself, or an article headed somewhere with a nicer font. Then I go to publish on Medium and the spell breaks: paste my markdown into their editor and it shows up as literal <code>## headings</code> and <code>**asterisks**</code>, the formatting sitting there inert. The obvious fix — let a script publish for me through Medium's API — turns out to be a door that's been quietly nailed shut.</p>
<h2>The API is gone</h2>
<p>Medium had a real publishing API once: an integration token, a <code>POST</code> to create a post, the whole thing documented on GitHub. As of 2025 they stopped issuing new tokens and stopped allowing new integrations. The docs repo is archived with a note at the top: <em>the Medium API is no longer supported.</em> Old tokens still work; new ones can't be minted. So if you didn't already have one, programmatic publishing simply isn't on the table anymore.</p>
<p>That sounds like a dead end. It isn't — it just means the seam is somewhere less obvious.</p>
<h2>The seam is the clipboard</h2>
<p>Medium's editor ignores pasted markdown <em>text</em>. But like most rich-text editors, it pays close attention to the <code>text/html</code> flavor of the clipboard. Paste plain text and you get plain text; paste HTML and it reconstructs headings, bold, links, lists. The browser carries two versions of whatever you copy, and the editor reaches for the formatted one.</p>
<p>Which means the entire problem collapses to: turn markdown into HTML, and put it on the clipboard <em>as HTML</em>. On X11 that's one pipe:</p>
<pre><code class="language-sh">comrak article.md | xclip -selection clipboard -t text/html
</code></pre>
<p><code>comrak</code> does markdown-to-HTML; <code>xclip -t text/html</code> sets the rich-text flavor specifically. Paste into Medium and the formatting survives. That one line is genuinely 80% of the job, and for a quick post it's all you need.</p>
<blockquote>
<p>The hard part of a problem is often a layer below where you're looking. I was hunting for an API; the answer was a clipboard MIME type.</p>
</blockquote>
<h2>Why it wanted to be a real tool</h2>
<p>The one-liner is honest about what it is. The remaining 20% is the stuff that only shows up once you paste a <em>real</em> article — and that's what earns a proper binary. So I wrote one: <code>mdpaste</code>, a single Rust binary that parses the markdown to a syntax tree, fixes the things each editor mangles, and hands over clean HTML. It carries quirk profiles for Medium, Substack, and Ghost, since they all honor the same clipboard trick.</p>
<p>A few of the fixes:</p>
<ul>
<li><strong>Images.</strong> A pasted <code>&lt;img&gt;</code> only works if its <code>src</code> is a public URL — the editor can't see a path on my laptop. My article images already live on my own site, so <code>mdpaste</code> rewrites relative paths like <code>pix/shot.png</code> into <code>https://timbeach.com/pix/shot.png</code> and warns me about any local path it can't place.</li>
<li><strong>Embeds.</strong> A bare YouTube or gist URL sitting alone on a line gets auto-expanded into an embed card — but only if it's a <em>bare</em> URL, not a markdown link. So a paragraph that's nothing but a link to an embed host gets unwrapped back down to the naked URL.</li>
</ul>
<h2>The gotcha: invisible newlines</h2>
<p>The fix I didn't see coming was blockquotes. I pasted a finished article, and every quote came through padded with a blank line above and below the text — like the quote was holding the words at arm's length. The HTML looked fine:</p>
<pre><code class="language-html">&lt;blockquote&gt;
&lt;p&gt;...the quoted text...&lt;/p&gt;
&lt;/blockquote&gt;
</code></pre>
<p>Those newlines after <code>&lt;blockquote&gt;</code> and before <code>&lt;/blockquote&gt;</code> are meaningless when a browser renders the page — whitespace between block tags is collapsed and you'd never know it was there. But Medium's paste importer is not a browser. It reads each of those newlines as content and turns them into empty lines inside the quote. The cleanup is almost too small to mention: strip the newlines on the inside edges of the blockquote so the editor gets <code>&lt;blockquote&gt;&lt;p&gt;...&lt;/p&gt;&lt;/blockquote&gt;</code> in one piece. Identical rendering everywhere, tidy quote on paste.</p>
<p>I'd never have predicted that one. It only surfaced because I actually pasted and <em>looked</em> — which is the whole lesson. You can reason about an HTML-to-editor pipeline all day, but the editor is a black box on the far side of the clipboard, and the only way to know what it does with your markup is to send some across and watch.</p>
<h2>Why bother</h2>
<p>Because the boring, repeated thing should stay boring. I write in markdown, run one command, and paste a clean, formatted draft into Medium — images resolved, embeds embedding, quotes sitting tight. It's a single binary, no daemon, no account, no API that can be turned off from under me. When the official door closes, the clipboard is still wide open.</p>
<p>This very article made the trip that way.</p>
<p><code>mdpaste</code> is on GitHub: <a href="https://github.com/timbeach/mdpaste">github.com/timbeach/mdpaste</a>.</p>
]]></content:encoded>
    </item>
    <item>
      <title>The Terminal Setup I Built and Can't Work Without</title>
      <link>https://timbeach.com/a/the-terminal-setup-i-cant-work-without/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/the-terminal-setup-i-cant-work-without</guid>
      <pubDate>Mon, 08 Jun 2026 00:00:00 +0000</pubDate>
      <description>I patched suckless `tabbed` into a terminal I actually love: clickable, tmux-keyed tabs of real terminals — transparent, pywal-themed, and self-naming. Rename a Claude Code session and the tab follows live. One `yay` on any Arch box.</description>
      <content:encoded><![CDATA[<p><img src="pix/the-terminal-setup-i-cant-work-without.png" alt="The Terminal Setup I Built and Can't Work Without" /></p>
<p>A couple of weeks ago I patched two tiny terminal programs into the setup I now run all day — and I'm not going back. It gives me tabs full of <em>real</em> terminals — click one to switch, or fly between them from the keyboard. They're see-through over my wallpaper and themed to match the rest of my desktop. And the part I still grin at every time: <strong>the tabs name themselves.</strong></p>
<p>I called the result <code>st-tabbed-aegix-git</code> and put it on the AUR, so you can install it in one command on any Arch-based machine (we'll get there). Here's what it does — and why I built it.</p>
<h2>What it actually is</h2>
<p>Two tiny programs, each doing one job. <strong><a href="https://st.suckless.org/"><code>st</code></a></strong> is a terminal emulator — the window that shows your shell. <strong><a href="https://tools.suckless.org/tabbed/"><code>tabbed</code></a></strong> is a generic little container that embeds other programs as tabs. Point <code>tabbed</code> at <code>st</code> and you get a strip of tabs across the top, each one a complete, independent terminal. A three-line launcher named <code>stt</code> glues them together. That's the whole thing.</p>
<p>Both come from <a href="https://suckless.org">suckless</a>, a project whose entire philosophy is &quot;do the job in as little code as possible, then get out of the way.&quot; You don't need to know any of that to use this — but it's why the result is fast, small, and endlessly tweakable.</p>
<h2>Why I reach for it instead of tmux</h2>
<p>If you've met <a href="#articles/how-tmux-works.md">tmux</a>, you know it can carve a terminal into panes and windows. This scratches a similar itch, with two differences that won me over — and one honest caveat.</p>
<p><strong>You can just click.</strong> A newcomer doesn't have to memorize a single command: click a tab to switch, scroll with the mouse wheel, done. The thing that actually broke me on tmux was scrollback — switch to another window, then try to scroll up through what it printed, and suddenly you're fumbling into &quot;copy mode&quot; keybindings before you can read your own output. Here, every tab is a genuine terminal with its own native scrollback. Switch to it, scroll up, read. No mode, no prefix, no ceremony.</p>
<p><strong>Your tmux muscle memory still works.</strong> If you <em>do</em> live in tmux, I wired the keybindings to match: <code>Ctrl+b</code> then <code>c</code> for a new tab, <code>n</code>/<code>p</code> to move between them, and so on. So the newcomer clicks and the veteran never lifts their hands off home row. Both win.</p>
<h3>The honest caveat: no detached sessions</h3>
<p>Here's the one thing you must know if you're coming from tmux. For years, tmux meant exactly one thing to me: start a long job on a server, <em>detach</em>, close my laptop, drive across town, <code>ssh</code> back in, <em>reattach</em>, and pick up precisely where I left off. <strong>This tool does not do that.</strong> It has no session persistence and nothing to detach from. It is a <em>local development</em> tool — tabs for the terminals on the machine right in front of you.</p>
<p>So they aren't really rivals; they just look alike. If you need a session that survives a disconnect, use tmux — that's still the right tool for it. If you want comfortable, clickable, good-looking tabs for your everyday local work, that's this.</p>
<h2>Getting around</h2>
<p>Three ways to drive it — use whichever you like, or mix them:</p>
<table>
<thead>
<tr>
<th>Want to…</th>
<th>Mouse</th>
<th>Quick keys</th>
<th>tmux-style</th>
</tr>
</thead>
<tbody>
<tr>
<td>Switch tab</td>
<td>click it</td>
<td><code>Ctrl+Shift+N</code> / <code>P</code></td>
<td><code>Ctrl+b</code> then <code>n</code> / <code>p</code></td>
</tr>
<tr>
<td>New tab</td>
<td>—</td>
<td><code>Ctrl+Shift+T</code></td>
<td><code>Ctrl+b</code> then <code>c</code></td>
</tr>
<tr>
<td>Jump to tab N</td>
<td>click it</td>
<td><code>Ctrl+1</code>…<code>0</code></td>
<td><code>Ctrl+b</code> then <code>1</code>…<code>0</code></td>
</tr>
<tr>
<td>Close tab</td>
<td>—</td>
<td><code>Ctrl+q</code></td>
<td><code>Ctrl+b</code> then <code>x</code></td>
</tr>
<tr>
<td>Scroll back</td>
<td>wheel</td>
<td><code>Shift+PageUp</code></td>
<td><code>Shift+PageUp</code></td>
</tr>
</tbody>
</table>
<p>There's nothing to configure to get started. And if you <em>do</em> want to change a binding, it's a couple of lines in one file — that suckless hackability again.</p>
<h2>It looks like the rest of my desktop</h2>
<p>The terminals are transparent over my wallpaper, and their colors come straight from <a href="https://github.com/dylanaraps/pywal">pywal</a> — so when I re-theme my desktop from a new wallpaper, the tabs re-theme right along with it. There's no separate config to keep in sync; it reads the same system colors everything else on my screen does.</p>
<p>(Getting the tab <em>bar</em> opaque while keeping the <em>terminals</em> see-through cost me an embarrassing afternoon chasing a single missing byte in how a color was stored — a bug that made <code>0.9</code> and <code>1.0</code> opacity look identical. It took far longer to find than to fix, which is the usual ratio.)</p>
<h2>Name your tabs — or let them name themselves</h2>
<p>Press <code>Ctrl+b</code> then <code>,</code> and a little prompt asks for a tab name. Type it, press enter, and that tab keeps that name. Classic.</p>
<p>But here's the feature I didn't actually build — I just got out of its way. <strong>A tab automatically shows the title of whatever's running in it.</strong> Your shell, <code>vim</code>, an <code>ssh</code> session — anything that sets the terminal title shows up on the tab, for free.</p>
<p>And this is where it gets fun if you work with <a href="#articles/claude-code-agent-teams.md">Claude Code</a> like I do. Claude sets the terminal title to the name of your current session. So my tabs <em>label themselves with what I'm working on</em> — and if I run <code>/rename</code> to rename a Claude session, <strong>the tab updates to match, live, while I watch.</strong> I rename the conversation; the tab follows. Every single time.</p>
<p>I want to be clear that this isn't some clever integration I wrote. Terminals have broadcast their title for decades; <code>tabbed</code> just listens. All I added was the <em>opt-out</em> — the manual <code>Ctrl+b ,</code> name — so that a tab you've named by hand stops following along. I built the override, not the feature. The coolest thing in here was already in the box.</p>
<h2>Install it anywhere</h2>
<p>It's on the <strong>AUR</strong>. If that's new to you: the Arch User Repository is a huge community catalog of install recipes for Arch-based systems — Arch, Artix, my own <a href="https://aegixlinux.org">Aegix</a>, and friends. With a helper like <code>yay</code>, installing from it is one line:</p>
<pre><code class="language-bash">yay -S st-tabbed-aegix-git
</code></pre>
<p>That pulls down the terminal, the tabbed container, and the <code>stt</code> launcher, builds them, and you're done. Run <code>stt</code> and you've got tabs. It works on any Arch / Artix / Aegix box, not just mine. (If you're curious how these suckless tools get from my laptop to the AUR in the first place, I wrote that up separately: <a href="#articles/aegix-on-the-aur.md">From <code>~/.local/src</code> to the AUR</a>.)</p>
<p><strong>Not on Arch?</strong> Nothing here is Arch-specific — these are suckless tools, so the install really is just <code>git clone</code> and <code>sudo make clean install</code>; the AUR package only automates that part. On Debian or Ubuntu you grab the build dependencies first, then build it from source:</p>
<pre><code class="language-bash">sudo apt install build-essential libx11-dev libxft-dev libfontconfig1-dev
git clone https://github.com/AegixLinux/tabbed &amp;&amp; cd tabbed &amp;&amp; sudo make clean install
</code></pre>
<p>You'll also want <code>st</code> itself, which is rarely packaged outside Arch — so build it the same way (from <a href="https://github.com/AegixLinux/st">AegixLinux/st</a> or stock <a href="https://st.suckless.org/">suckless st</a>). For the extras: <code>dmenu</code> powers the rename prompt (Debian ships it in <code>suckless-tools</code>), <code>xprop</code> backs it (<code>x11-utils</code>), and any compositor like <code>picom</code> gives you the transparency.</p>
<h2>Why this one matters to me</h2>
<p>This one stuck. It's load-bearing now — the place my actual work happens all day. It started as an itch about scrollback and turned into a couple hundred lines of C: a tmux-style keybinding mode, an honest fight with X11 transparency, tab colors wired to the system theme, and a package anyone can install.</p>
<p><code>yay -S st-tabbed-aegix-git</code></p>
]]></content:encoded>
    </item>
    <item>
      <title>Still Really Simple: A Short History of RSS (and How This Site Uses It)</title>
      <link>https://timbeach.com/a/rss-still-really-simple/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/rss-still-really-simple</guid>
      <pubDate>Sun, 07 Jun 2026 00:00:00 +0000</pubDate>
      <description>A short history of RSS — what it is, why it still matters, and exactly how this static site builds the feed at /feed.xml.</description>
      <content:encoded><![CDATA[<p><img src="pix/rss.png" alt="The orange RSS feed icon — the quiet symbol of web syndication" /></p>
<p>There's a small orange icon you don't see much anymore. For about a decade it lived in the corner of every browser's address bar, and then one day it quietly vanished. The technology behind it never did — you're using it right now if you listen to podcasts, and you can use it to read this site. No account, no app, no algorithm deciding what you get to see.</p>
<p>That technology is RSS. This is what it is, where it came from, and exactly how the feed for this website gets built.</p>
<h2>What RSS actually is</h2>
<p>RSS is a plain-text file that a website publishes and keeps up to date. It lists the site's recent content — each entry with a title, a link, a short description, and a date — in a structured format that software can read. That's the whole idea.</p>
<p>You point a program called a <em>feed reader</em> at the file's address. The reader checks the file every so often, notices when new entries appear, and shows them to you in a tidy, chronological list. Subscribe to a dozen sites and your reader becomes a single inbox for everything you care about — in the order it was published, with nothing injected and nothing hidden.</p>
<p>The crucial part is who's in charge. There's no middleman. The site publishes the file; your reader fetches it directly. No company sits between you and the writer deciding what's worth your attention. You subscribed, so you get everything.</p>
<h2>A short, contentious history</h2>
<p>RSS was born at Netscape in 1999 as a way to fill the &quot;channels&quot; on the My Netscape portal. The acronym has meant three different things over the years, which tells you something about how its history went: it started as <strong>RDF Site Summary</strong>, was softened to <strong>Rich Site Summary</strong>, and finally settled — thanks largely to Dave Winer of UserLand Software — as <strong>Really Simple Syndication</strong>.</p>
<p>That naming muddle was a symptom. Through the early 2000s, development splintered between camps with different technical philosophies, and the versions multiplied: 0.90, 0.91, 0.92, 1.0, and eventually RSS 2.0 in 2002, which froze the format and is what most feeds — including this one — still use today. The friction got bad enough that a rival format, <strong>Atom</strong>, was created in 2005 to do the same job more cleanly. Both still exist, readers support both, and the war is a museum piece now.</p>
<p>Then came the golden age. Google Reader launched in 2005 and, for a while, RSS was simply how the technical web read the technical web. And then, in 2013, Google shut Reader down. The headlines wrote themselves: <em>RSS is dead.</em></p>
<p>It wasn't. It just got quiet. Every podcast on earth is distributed as an RSS feed — that's what a podcast <em>is</em>, underneath. Newsletters, news sites, and blogs still publish feeds. A healthy ecosystem of independent readers survived Reader's death and arguably got better for it. RSS didn't lose; it just stopped being fashionable, which on today's web is nearly a compliment.</p>
<h2>Why it's still worth using</h2>
<p>The pitch is the same as it was in 2005, only more so now that the alternative is so much worse:</p>
<ul>
<li><strong>No algorithm.</strong> You see every post from everyone you subscribed to, newest first. Nothing is boosted, throttled, or reordered to keep you scrolling.</li>
<li><strong>No account, no tracking.</strong> Your reader fetches a file. The site doesn't know who subscribed, and there's no login standing between you and the words.</li>
<li><strong>It's yours and it's portable.</strong> Your subscription list lives in your reader and exports as a small file (called OPML) you can carry to any other reader. Nobody can lock you in.</li>
<li><strong>It's calm.</strong> No infinite scroll, no notifications begging for your time. You read what's new and you're done.</li>
</ul>
<p>For a personal site like this one, RSS is the honest way to say &quot;here's how to follow along&quot; without asking anyone to make an account or trust a platform.</p>
<h2>How the feed works on this site</h2>
<p>Here's the part specific to this site. It is fully static — no database, no backend — so the feed is generated ahead of time and served as a plain file at:</p>
<p><code>https://timbeach.com/feed.xml</code></p>
<p>Everything here, including the feed, is built from a single source of truth: a file called <code>articles.json</code> that lists every article with its title, date, tags, and a one-sentence summary. The homepage reads it to draw the article cards. A small Python script named <code>build_feed.py</code> reads the very same file to build the feed.</p>
<p>When the script runs, it sorts every article by date, newest first, and writes one entry per article — each carrying the title, the publish date, a permanent link, and the summary as its description. Then it does something many feeds don't: it embeds the <strong>full text</strong> of each article, not just an excerpt, so a reader can show you the whole piece without ever visiting the site.</p>
<p>That last point matters. Many feeds give you a teaser and make you click through. This one hands over the complete article, rendered from the same markdown the website itself uses.</p>
<p>The build runs automatically as part of deploying the site. The deploy script validates everything, regenerates the feed from the current <code>articles.json</code>, and ships it alongside the rest of the static files. There's no live server assembling the feed on request — by the time you fetch it, it's already a finished document sitting on disk. Fast, cacheable, and impossible to break at read time.</p>
<p>So when I publish something new, the feed updates itself as a side effect of the same command that updates the site. No separate step, nothing to forget. The orange icon may be gone from your browser, but the file it pointed to is still here, still really simple, and still the best way to follow along.</p>
<h2>Subscribe</h2>
<p>Paste this into any feed reader:</p>
<p><code>https://timbeach.com/feed.xml</code></p>
<p>That's the whole setup. No account to make, nothing to install beyond a reader you like. Welcome to the quiet web.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Why Claude Code Keeps Asking for Permission (and How to Make It Stop)</title>
      <link>https://timbeach.com/a/claude-code-permission-modes/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/claude-code-permission-modes</guid>
      <pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate>
      <description>Permission mode is fixed at startup, so resumed sessions silently reset to prompting — and Shift+Tab deliberately won't cycle to bypass. The one-line settings.json fix, and what to do with sessions already running.</description>
      <content:encoded><![CDATA[<blockquote>
<p><strong>Disclaimer:</strong> never do this. It's too dangerous, and I accept no responsibility for explaining how this works here 😉 — but for real, don't do this. This article is purely for academic interest.</p>
</blockquote>
<p><img src="pix/bypass-permissions.png" alt="A mock warning poster reading &quot;DON'T DO THIS — too dangerous&quot; beside a Claude Code terminal running claude --dangerously-skip-permissions in BYPASS MODE: no permissions, no prompts, no guardrails. A stop-hand sign and danger tape sit below icons reading can delete everything, runs any command, can destroy data, full access to the internet." /></p>
<p>If you run Claude Code with <code>--dangerously-skip-permissions</code> every single launch, and you've noticed that <em>resumed</em> sessions are the worst offenders for nagging you to approve things — this one's for you. The behavior isn't a bug. It's a consequence of how permission <strong>mode</strong> works, and once you understand it the fix is one line of config.</p>
<h2>The core idea: mode is set at startup, not per-turn</h2>
<p>Claude Code has a few permission <strong>modes</strong>. The strongest is <code>bypassPermissions</code> — the true &quot;no guardrails, never ask&quot; mode. The critical thing to understand:</p>
<blockquote>
<p>A session's permission mode is locked in <strong>when the session starts</strong>. It is runtime state, not a setting that gets re-read on every action.</p>
</blockquote>
<p>There are exactly two ways a session enters <code>bypassPermissions</code>:</p>
<ol>
<li>You launch with the <code>--dangerously-skip-permissions</code> flag, or</li>
<li>You set <code>permissions.defaultMode</code> to <code>bypassPermissions</code> in your settings, which is read <strong>at startup</strong>.</li>
</ol>
<p>That word <em>startup</em> is the whole story.</p>
<h2>Why resumed sessions are the worst</h2>
<p>Here's the pattern that drives people up the wall:</p>
<ul>
<li><strong>Fresh session with the flag</strong> → bypass mode → blissful silence.</li>
<li><strong>Leave it open for hours</strong> → it asks <em>less and less</em>, because every &quot;yes, and don't ask again&quot; you click gets appended to your allow-list. The session is learning.</li>
<li><strong>Exit, then <code>claude --resume</code> or <code>claude -c</code></strong> → the mode resets to <code>default</code>, and unless you re-type the flag, you're back to approving everything from scratch.</li>
</ul>
<p>So the sessions that feel the most annoying — the ones you're returning to from yesterday — are exactly the ones where the flag from the original launch no longer applies. You didn't do anything wrong. The flag just never persisted.</p>
<h2>The fix: make bypass your default</h2>
<p>Add this to <code>~/.claude/settings.json</code>:</p>
<pre><code class="language-json">{
  &quot;permissions&quot;: {
    &quot;defaultMode&quot;: &quot;bypassPermissions&quot;
  }
}
</code></pre>
<p>Now <strong>every</strong> session — fresh, resumed, or background — starts in bypass mode with no flag required. You can stop typing <code>--dangerously-skip-permissions</code> entirely.</p>
<p>One related setting worth knowing: <code>skipDangerousModePermissionPrompt: true</code> only suppresses the scary red &quot;are you sure you want bypass mode?&quot; <em>warning dialog</em>. It does <strong>not</strong> put you in bypass mode. People conflate the two and wonder why they're still being asked. Different knob.</p>
<h2>The Shift+Tab trap</h2>
<p>Here's where a lot of people (myself included) waste five minutes: <strong>Shift+Tab does not cycle to bypass.</strong></p>
<p>Tap Shift+Tab at the prompt and you'll cycle through:</p>
<ul>
<li><strong>normal</strong> — prompts on everything</li>
<li><strong>accept edits on</strong> — auto-approves file edits, still prompts on shell commands</li>
<li><strong>plan mode on</strong> — read-only, proposes a plan first</li>
<li><strong>auto mode on</strong> — a smart classifier that auto-approves anything it judges safe and only stops for genuinely destructive or irreversible actions</li>
</ul>
<p>Notice what's missing: <code>bypassPermissions</code>. It is <strong>deliberately excluded</strong> from the interactive cycle. It's the one mode with zero guardrails, so the designers made it reachable only via the launch flag or the startup setting — never a keystroke. If you're hammering Shift+Tab in a running session waiting for &quot;bypass permissions&quot; to show up, it never will. That's the safety boundary working as intended, not a broken session.</p>
<h2>What to do with sessions that are already running</h2>
<p>Because mode is fixed at startup, editing your settings <strong>does not</strong> retroactively flip a session that's already live. For those:</p>
<ul>
<li><strong>Want the most relief without restarting?</strong> Shift+Tab until it reads <strong>auto mode on</strong>. It kills the vast majority of prompts — auto-approving routine work and only pausing on the genuinely dangerous stuff (drops, wipes, <code>rm -rf</code>). For most workflows you won't feel the difference from bypass.</li>
<li><strong>Want true zero-prompt bypass?</strong> Exit and bring the session back with <code>claude -c</code> or <code>claude --resume</code>. On relaunch it reads your new <code>defaultMode</code> and comes back in real bypass mode, with your full context intact.</li>
</ul>
<h2>One honest caveat</h2>
<p><code>bypassPermissions</code> means <em>zero</em> prompts, including for genuinely destructive actions. If your day involves <code>sudo</code>, disk partitioning, or live database work, a fat-fingered command goes through with no &quot;are you sure?&quot; If you want a safer middle ground, set <code>defaultMode</code> to <code>acceptEdits</code> (auto-approves edits, still pauses on shell commands) or lean on <strong>auto mode</strong>, which is smart enough to auto-approve the safe 95% and stop on the scary 5%.</p>
<h2>Seriously, though: do it in a sandbox</h2>
<p>The permission prompt is a safety net, and turning it off entirely means you've removed the one thing standing between an agent and your real filesystem, your real credentials, your real production database. So if you're going to run with no guardrails, put a <em>different</em> set of guardrails around the whole thing: run it in a sandbox.</p>
<p>That can mean a few things, in rough order of effort:</p>
<ul>
<li><strong>Claude Code's own sandbox.</strong> There's a <code>sandbox</code> block in settings that confines tool execution — filesystem write-jails, network allow/deny lists, the works. Bypassing <em>prompts</em> while still <em>sandboxing execution</em> is a genuinely reasonable combo: no nagging, but a fat-fingered <code>rm -rf /</code> can't escape the box.</li>
<li><strong>A container or VM.</strong> Run the whole session inside Docker, a throwaway VM, or a dev container with only the project mounted and nothing sensitive in reach. If it all goes sideways, you <code>docker rm</code> the blast radius.</li>
<li><strong>A scratch user / scratch machine.</strong> No prod creds in the environment, no SSH keys to your real infrastructure, nothing in <code>~</code> you'd cry over.</li>
</ul>
<p>The principle: <strong>never combine &quot;no prompts&quot; with &quot;full access to things you care about.&quot;</strong> Remove one or the other. Bypass mode is a lot less scary when the worst it can reach is a disposable container.</p>
<p>But if you've already been launching with <code>--dangerously-skip-permissions</code> every time, setting <code>defaultMode: bypassPermissions</code> isn't <em>new</em> risk. It just makes your existing habit the default — and finally fixes the resumed-session nagging for good.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Claude /tips: The Complete List</title>
      <link>https://timbeach.com/a/claude-tips-complete-list/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/claude-tips-complete-list</guid>
      <pubDate>Thu, 04 Jun 2026 00:00:00 +0000</pubDate>
      <description>Every tip Claude Code ships with — extracted by pointing Claude at its own binary — plus the keyboard shortcuts and sigils that aren't in the rotation.</description>
      <content:encoded><![CDATA[<p><img src="pix/claude-tips-complete-list.png" alt="Claude /tips: The Complete List — all 58 built-in tips, bonus shortcuts, and how we extracted them from the Claude Code binary" /></p>
<h2>TL;DR</h2>
<p>You know those little italic tips that flicker at the bottom of Claude Code while it thinks — <em>&quot;Double-tap esc to rewind,&quot;</em> <em>&quot;Hit Shift+Tab to cycle modes&quot;?</em> There's no docs page that lists them, because they're compiled into the Claude Code binary itself. So I pointed Claude at its own executable and had it read them out.</p>
<p>The result: <strong>all 58 tips</strong> that Claude Code 2.1.162 ships with, below. You'll never see them all in normal use — each one is gated to a relevant context and put on cooldown after it shows, so the rotation is different for every project and every user. The complete list is right here, followed by a bonus round of keyboard shortcuts that <em>aren't</em> in the rotation, and — if you're curious — the story of how I extracted them at the end.</p>
<hr />
<h1><strong>The Complete List</strong></h1>
<p>Every tip Claude Code 2.1.162 can show you, grouped by theme. (Two are fully dynamic — a server-supplied &quot;feature of the week&quot; and a team-artifacts summary — so they have no fixed text and are omitted.)</p>
<h2>Keyboard &amp; input</h2>
<ul>
<li>Press <strong>Shift+Enter</strong> (Option+Enter on Apple Terminal) to send a multi-line message</li>
<li>Hit <strong>Shift+Tab</strong> to cycle between default mode, auto-accept edit mode, and plan mode</li>
<li><strong>Double-tap esc</strong> to rewind the conversation to a previous point in time</li>
<li>Double-tap esc to rewind the <strong>code and/or conversation</strong> to a previous point in time</li>
<li>Hit <strong>Enter to queue</strong> additional messages while Claude is working</li>
<li>Send messages to Claude while it works to <strong>steer it in real-time</strong></li>
<li>Did you know you can <strong>drag and drop image files</strong> into your terminal?</li>
<li><strong>Paste images</strong> into Claude Code using Ctrl+V (not Cmd+V!)</li>
</ul>
<h2>Slash commands &amp; config</h2>
<ul>
<li>Use <strong>/memory</strong> to view and manage Claude memory</li>
<li>Use <strong>/theme</strong> to change the color theme</li>
<li>Use <strong>/statusline</strong> to set up a custom status line beneath the input box</li>
<li>Use <strong>/permissions</strong> to pre-approve and pre-deny bash, edit, and MCP tools</li>
<li>Use <strong>/voice</strong> to enable push-to-talk dictation</li>
<li>Use <strong>/feedback</strong> to help improve Claude Code</li>
<li>Name your conversations with <strong>/rename</strong> to find them easily in /resume later</li>
<li>Running multiple sessions? Use <strong>/color</strong> and <strong>/rename</strong> to tell them apart at a glance</li>
<li>Try smoother rendering, lower memory, mouse support, and better copy formatting — <strong>/tui fullscreen</strong></li>
<li>New to Claude Code? Run <strong>/powerup</strong> for a quick interactive tutorial</li>
<li>Run <strong>/terminal-setup</strong> to enable Shift+Enter (or Option+Enter) for new lines and more</li>
</ul>
<h2>Agents, skills &amp; workflows</h2>
<ul>
<li>Create skills by adding <code>.md</code> files to <code>.claude/skills/</code> in your project, or <code>~/.claude/skills/</code> for skills that work everywhere</li>
<li>Use <strong>/agents</strong> to optimize specific tasks — e.g. Software Architect, Code Writer, Code Reviewer</li>
<li>Use <strong><code>--agent &lt;agent_name&gt;</code></strong> to start a conversation directly with a subagent</li>
<li>Say <strong>&quot;fan out subagents&quot;</strong> and Claude sends a team — each one digs deep so nothing gets missed</li>
<li><strong>/loop</strong> runs any prompt on a recurring schedule — great for monitoring deploys, babysitting PRs, or polling status</li>
<li>Set an objective with <strong>/goal</strong> — Claude keeps working until it's met</li>
<li>Use <strong>Plan Mode</strong> to prepare for a complex request before making changes — Shift+Tab twice to enable</li>
<li>Ask Claude to create a <strong>todo list</strong> when working on complex tasks to track progress and stay on track</li>
<li>Use <strong>git worktrees</strong> to run multiple Claude sessions in parallel</li>
<li><strong>/ultrareview</strong> runs a deep, multi-agent review of your changes</li>
<li>Start with small features or bug fixes, tell Claude to propose a plan, and verify its suggested edits</li>
</ul>
<h2>IDE &amp; app integrations</h2>
<ul>
<li>Connect Claude to your IDE — <strong>/ide</strong></li>
<li>In VS Code, open the Command Palette (Cmd+Shift+P) and run &quot;Shell Command: Install 'code' command in PATH&quot; to enable IDE integration</li>
<li>Run <strong>/install-github-app</strong> to tag @claude right from your GitHub issues and PRs</li>
<li>Run <strong>/install-slack-app</strong> to use Claude in Slack</li>
<li>Run Claude Code locally or remotely using the Claude desktop app — <strong>clau.de/desktop</strong></li>
<li>Run tasks in the cloud while you keep coding locally — <strong>clau.de/web</strong></li>
<li>Continue your session in Claude Code Desktop with <strong>/desktop</strong></li>
<li>Working on UI? Claude Code Desktop has live preview and inline images — clau.de/desktop</li>
<li>Control this session remotely — run <strong>/remote-control</strong></li>
<li>Get pinged on your phone when long tasks finish — enable push notifications in /config</li>
<li>Build your AI product with Claude API — run <strong>/claude-api</strong> to get started</li>
</ul>
<h2>Environment &amp; plugin nudges</h2>
<ul>
<li>Working with HTML/CSS? Install the <strong>frontend-design</strong> plugin</li>
<li>Working with Vercel? Install the <strong>vercel</strong> plugin</li>
<li>Working with Stripe? Install the <strong>stripe</strong> plugin</li>
<li>Run <code>claude --continue</code> or <code>claude --resume</code> to resume a conversation</li>
<li>Try setting <code>COLORTERM=truecolor</code> for richer colors</li>
<li>Set <code>CLAUDE_CODE_USE_POWERSHELL_TOOL=1</code> to enable the PowerShell tool (preview)</li>
<li>Your default model is Opus Plan Mode — press Shift+Tab twice to plan with Claude Opus</li>
</ul>
<h2>Sharing &amp; growth</h2>
<ul>
<li>Share Claude Code and earn usage credits — <strong>/passes</strong></li>
<li>Run <strong>/team-onboarding</strong> to turn your Claude usage into a shareable onboarding guide</li>
</ul>
<hr />
<h2>Bonus: shortcuts that aren't in the rotation</h2>
<p>Honestly, these are more valuable day-to-day than half the tips above — the keyboard shortcuts and input sigils pulled from the same binary's keybinding map. They mostly <em>don't</em> surface as tips, but they're the difference between poking at Claude and actually driving it.</p>
<p><strong>The three input sigils</strong> — type these as the first character of your message:</p>
<ul>
<li><strong><code>!</code></strong> runs the rest of the line as a shell command in your session, dropping the output right into the conversation. Perfect for an interactive login or a quick <code>git status</code> without leaving the chat.</li>
<li><strong><code>@</code></strong> mentions a file or directory — Claude pulls it into context. Start typing a path and it autocompletes.</li>
<li><strong><code>#</code></strong> saves what follows as a memory, so Claude remembers it in future sessions.</li>
</ul>
<p><strong>Keyboard shortcuts</strong> (defaults — all rebindable in <code>~/.claude/keybindings.json</code>):</p>
<ul>
<li><strong>Shift+Tab</strong> — cycle through default / auto-accept-edits / plan mode</li>
<li><strong>Esc</strong> — interrupt Claude mid-task</li>
<li><strong>Esc Esc</strong> (double-tap) — rewind the conversation (and optionally code) to an earlier point</li>
<li><strong>Ctrl+G</strong> — pop your draft open in your <code>$EDITOR</code> for long or multi-line prompts</li>
<li><strong>Ctrl+L</strong> — clear the screen</li>
<li><strong>Ctrl+V</strong> — paste an image from your clipboard (note: <em>not</em> Cmd+V on Mac)</li>
<li><strong>Ctrl+S</strong> — stash your current input</li>
<li><strong>Alt+P</strong> — open the model picker</li>
<li><strong>Alt+T</strong> — toggle extended thinking</li>
<li><strong>Alt+O</strong> — toggle fast mode</li>
<li><strong>Alt+W</strong> — toggle workflow-keyword detection</li>
<li><strong>Ctrl+B</strong> — background a running tool call so you can keep working</li>
<li><strong>Ctrl+X Ctrl+K</strong> — kill running agents</li>
</ul>
<p><strong>Slash commands worth knowing</strong> beyond the ones the tips mention: <code>/resume</code> and <code>/clear</code> to manage history, <code>/compact</code> to summarize and free up context, <code>/export</code> to save a transcript, <code>/cost</code> for session spend, <code>/model</code> to switch models, <code>/vim</code> for modal editing, and <code>/init</code> to generate a <code>CLAUDE.md</code> for a fresh project.</p>
<h2>How I got this list: Claude reading itself</h2>
<p>Here's the fun part. There's no documentation page for the tips, they aren't in a config file you can <code>cat</code>, and they aren't fetched from a server. They're baked into the Claude Code executable — a single 233 MB binary sitting at <code>~/.local/share/claude/versions/2.1.162</code> on my machine.</p>
<p>But even compiled binaries are full of readable strings — the literal text of every message a program can print is sitting right there in the file. So the investigation was just a matter of knowing where to look.</p>
<p>First, find where the tips live. Tips fire an analytics event when shown, so I grepped the binary's strings for anything tip-shaped:</p>
<pre><code class="language-bash">strings -n 6 claude-binary | grep -oiE &quot;tengu_[a-z_]*tip[a-z_]*&quot;
# tengu_tip_shown
# tipId
# tipsHistory
</code></pre>
<p>That <code>tengu_tip_shown</code> event, with its <code>tipId</code> field, was the thread to pull. Each tip turned out to be a JavaScript object baked into the bundle, shaped like this:</p>
<pre><code class="language-javascript">{
  id: &quot;double-esc&quot;,
  content: async () =&gt; &quot;Double-tap esc to rewind the conversation to a previous point in time&quot;,
  cooldownSessions: 3,
  isRelevant: async () =&gt; true
}
</code></pre>
<p>Find one, find the array. A grep for the <code>content:async</code> signature surfaced all of them, and a small Python parser walked each object to recover its text — including the ones whose content is built dynamically from keybinding helpers and the current terminal type.</p>
<p>The whole thing took about four tool calls. No decompiler, no reverse-engineering, no guessing — just Claude reading the strings table of the program it <em>is</em>. There's something pleasingly recursive about asking an AI assistant to introspect its own source and report back what advice it's been quietly trying to give you.</p>
<h2>Why you never see them all</h2>
<p>Those two fields on each tip object — <code>isRelevant()</code> and <code>cooldownSessions</code> — explain the whole experience.</p>
<ul>
<li><strong><code>isRelevant()</code></strong> is a context check. The IDE-integration tip only fires when you're in an external terminal. The Stripe-plugin nudge only appears when your project actually depends on Stripe. The &quot;Opus Plan Mode&quot; reminder only shows if that's your configured default. Most tips are gated to a situation where they'd genuinely help.</li>
<li><strong><code>cooldownSessions</code></strong> is a repeat suppressor, typically <code>3</code>. Once you've seen a tip, it won't come back for at least that many sessions.</li>
</ul>
<p>So the tip at the bottom of your screen is the result of: <em>of all the tips whose context currently applies, which ones aren't on cooldown — pick one.</em> That's why a fresh project surfaces different advice than a long-running one, and why power users and first-timers see different rotations.</p>
<p>The advice was never hidden, just compiled. If you want to re-extract these after your next update, the recipe is simple: <code>strings</code> the binary at <code>~/.local/share/claude/versions/&lt;version&gt;</code> and grep for <code>content:async</code> near <code>cooldownSessions</code>. The tips evolve with each release — but now you know where they live.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Future Me Has Receipts: Building circleback</title>
      <link>https://timbeach.com/a/circleback/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/circleback</guid>
      <pubDate>Tue, 26 May 2026 00:00:00 +0000</pubDate>
      <description>A dozen long-running Claude Code sessions across unrelated projects — and the hard part isn't building the work, it's finding your way back to each thread.</description>
      <content:encoded><![CDATA[<h2>🧶 Future Me Has Receipts: Building <code>circleback</code></h2>
<p><img src="pix/circleback.png" alt="circleback picker" /></p>
<p>Here's what a normal week looks like for me:</p>
<ul>
<li>A Claude Code session debugging an LTI enrollment query at work (Postgres, SQL diffs, 70-message thread)</li>
<li>Another one prepping state-test contractor diffs (Python, xlsx files, waiting on partners to deliver data)</li>
<li>A third one building a Rust CLI for personal use (totally different stack, totally different brain mode)</li>
<li>A fourth one mid-audit, with a half-written message to a coworker that I haven't sent yet</li>
<li>A fifth one I started three weeks ago and forgot existed</li>
</ul>
<p>These sessions are <strong>wildly unrelated</strong>. They live in different directories, touch different languages, follow different work streams. None of them know about each other. And they're all <strong>long-running</strong> — Claude Code holds context across days or weeks, which is amazing until you have a dozen of them and can't remember which is which.</p>
<p>The single hardest thing about working this way isn't building the stuff. It's <strong>finding my way back</strong> to each of these threads after a few hours away. After a reboot. After a long meeting. After two days on a completely different project. After (sometimes) the laptop dying mid-thought when its battery decides it's done for the afternoon.</p>
<p>So I built a thing. A small thing. Let me show you what it is, and along the way I'll point out some of the Linux/Unix gears that make it tick, because they're cool and you should know them.</p>
<h2>🎯 What problem does it actually solve?</h2>
<p>Claude Code already lets you <code>claude --resume &lt;session-id&gt;</code> to jump back into a session. Cool. But:</p>
<ol>
<li>The session IDs are <strong>UUIDs</strong> — those 36-character monstrosities like <code>fc8b09ad-e13b-42e7-b04b-fad59f47c97c</code>. Try memorizing five of those at once.</li>
<li>Each session is <strong>scoped to its launch directory</strong>. You have to <code>cd</code> to exactly the right place before resume works. Not the parent dir. Not a sibling. <strong>The exact dir.</strong></li>
<li>The sessions live in <code>~/.claude/projects/&lt;some-encoded-cwd&gt;/&lt;uuid&gt;.jsonl</code>, which is great for Claude Code internally but unreadable as a top-down view of &quot;what am I working on.&quot;</li>
<li>If you don't write down what you were doing in each thread, <strong>future-you has no idea which session is which</strong>.</li>
</ol>
<p>For a while I had a hand-curated markdown file at <code>~/CIRCLE_BACKS/CIRCLE-BACKS.md</code> where I'd dump notes like:</p>
<pre><code>Resume this session with:
claude --resume fc8b09ad-e13b-42e7-b04b-fad59f47c97c
/home/trashh_panda/code/STRIDE/3_SQL/.../STATE_TEST_PREP
State Test Prep is in wait-and-diff mode...
</code></pre>
<p>This was a start, but only sort of. To resume one I had to:</p>
<ol>
<li>Open the file</li>
<li>Scan with my eyes</li>
<li>Copy the UUID</li>
<li><code>cd</code> to the right path</li>
<li>Paste the resume command</li>
</ol>
<p>And — equally important — <strong>I had to remember to write the entry in the first place</strong>. If I got pulled into something else and didn't park the thread, that whole working context dissolved when I switched away. Same outcome if the laptop powered off before I wrote the note. The capture step depended on me being disciplined, every single time, which is not a thing humans are good at.</p>
<h2>🔧 The three new pieces</h2>
<p>Here's what I just built, in plain English:</p>
<ol>
<li><strong><code>circleback</code></strong> — type that in any terminal, get a fuzzy-search picker over all your saved sessions, hit Enter, and you're back. Hit Ctrl-D to archive ones you're done with.</li>
<li><strong>A &quot;SessionStart&quot; hook</strong> — the <em>millisecond</em> a Claude session opens, a stub entry gets written. No more &quot;oh wait, I forgot to log this thread.&quot; Every session shows up in the list automatically, and if the laptop dies before I can write a proper closing note, at least the entry is <em>there</em>, with a timestamp, telling future-me where to look.</li>
<li><strong>A &quot;SessionEnd&quot; hook</strong> — when the session closes cleanly, the hook reads what was last said and replaces the stub's &quot;(in progress)&quot; placeholder with an actual closing thought.</li>
</ol>
<p>Three pieces, ~500 lines of bash total, zero new dependencies. Let me walk through the technologies.</p>
<h2>✨ fzf: the hero of every good terminal workflow</h2>
<p>If you don't know <code>fzf</code> yet, stop reading and <code>sudo pacman -S fzf</code> right now. I'll wait.</p>
<p><a href="https://github.com/junegunn/fzf">fzf</a> is a <strong>fuzzy finder</strong>. You pipe it a list of strings, it pops up an interactive picker with type-ahead matching:</p>
<pre><code>echo -e &quot;alpha\nbeta\ngamma&quot; | fzf
</code></pre>
<p>That's it. Three lines, a beautiful TUI picker. fzf is the most-loved kind of Unix tool: it does <strong>one thing</strong>, it accepts text on stdin, and it composes with literally anything.</p>
<p>For <code>circleback</code>, I:</p>
<ul>
<li>Parse the markdown file into one display line per entry</li>
<li>Pipe those lines to fzf with <code>--multi</code> (so I can mark several at once with <code>Tab</code>)</li>
<li>Bind <code>Ctrl-D</code> to &quot;archive marked&quot;, <code>Ctrl-E</code> to &quot;open in $EDITOR&quot;</li>
<li>On <code>Enter</code>, the script <code>exec claude --resume &lt;id&gt;</code>s from the entry's directory</li>
</ul>
<p>That <code>exec</code> is doing real work — it <strong>replaces</strong> the shell process with <code>claude</code>, so when you exit Claude you're back at your original prompt, no nested shell. The Unix way.</p>
<h2>🪝 Hooks: how Claude Code hands off control</h2>
<p>Claude Code (the CLI) has a thing called <strong>hooks</strong>. You can wire little scripts to fire at lifecycle events like <code>SessionStart</code>, <code>SessionEnd</code>, <code>PreCompact</code>, <code>PreToolUse</code>. You configure them in <code>~/.claude/settings.json</code>:</p>
<pre><code class="language-json">&quot;hooks&quot;: {
  &quot;SessionStart&quot;: [
    { &quot;hooks&quot;: [{ &quot;type&quot;: &quot;command&quot;, &quot;command&quot;: &quot;$HOME/.claude/hooks/circleback-session-start.sh&quot; }] }
  ],
  &quot;SessionEnd&quot;: [
    { &quot;hooks&quot;: [{ &quot;type&quot;: &quot;command&quot;, &quot;command&quot;: &quot;$HOME/.claude/hooks/circleback-session-finish.sh&quot; }] }
  ],
  &quot;PreCompact&quot;: [
    { &quot;hooks&quot;: [{ &quot;type&quot;: &quot;command&quot;, &quot;command&quot;: &quot;$HOME/.claude/hooks/circleback-session-finish.sh&quot; }] }
  ]
}
</code></pre>
<p>When the event fires, Claude Code pipes a small JSON payload to your script's <strong>standard input</strong>:</p>
<pre><code class="language-json">{&quot;session_id&quot;:&quot;70cbfbb4-c59e-40d0-a5c2-85b3764b405b&quot;,&quot;source&quot;:&quot;startup&quot;}
</code></pre>
<p>So in my hook, the first line is:</p>
<pre><code class="language-bash">sid=$(jq -r '.session_id // empty')
</code></pre>
<p>The <code>// empty</code> is <code>jq</code>-speak for &quot;if the field is missing, give me an empty string instead of <code>null</code>&quot;. Defensive coding.</p>
<h2>🛠️ awk, sed, jq: the old reliable trio</h2>
<p>Big chunks of this codebase are awk pipelines. Why? Because the entries in CIRCLE-BACKS.md are <strong>structured text</strong> — four lines per entry, blank lines as separators — and awk is built for exactly this.</p>
<p>Here's the heart of the parser (simplified):</p>
<pre><code class="language-awk">/^## .+\/$/ { section = $0; sub(/^## /,&quot;&quot;,section); sub(/\/$/,&quot;&quot;,section); next }
/^[[:space:]]*$/ {
  if (acc_n == 4 &amp;&amp; acc[1] == &quot;Resume this session with:&quot;) {
    # Emit a TSV record
    printf &quot;%s\t%s\t%s\t%s\t%d\t%d\n&quot;, section, sid, cwd, thought, start, end
  }
  acc_n = 0; next
}
{ if (acc_n == 0) start = NR; acc_n++; acc[acc_n] = $0 }
</code></pre>
<p>awk processes one line at a time. When it sees a blank line, it checks whether the four-line accumulator looks like a valid entry and emits a tab-separated record if so. When it sees a section header like <code>## WORK/</code>, it captures whatever name follows <code>## </code> — the parser doesn't hardcode any section names, which is what lets <em>you</em> define your own.</p>
<p>The output is one line per entry, fields separated by tabs:</p>
<pre><code>WORK&lt;TAB&gt;aaaaaaaa-...&lt;TAB&gt;/path&lt;TAB&gt;thought&lt;TAB&gt;3&lt;TAB&gt;6
</code></pre>
<p>That's the <strong>internal format</strong> of the picker. Why TSV? Because tabs basically never appear in your prose, so they make a perfect delimiter that bash can <code>IFS=$'\t' read -r</code> directly.</p>
<p><code>jq</code> does the same job for JSON — it's the awk of structured data. And <code>sed</code> shows up for surgical text edits, like deleting exactly lines 3-6 from a file:</p>
<pre><code class="language-bash">sed -i &quot;3,6d&quot; file.md
</code></pre>
<h2>🧪 TDD caught real bugs</h2>
<p>I wrote this whole thing test-first. ~110 tests, plain bash, no framework. (I considered <code>bats-core</code> but it would've required <code>sudo</code>, and the surface area is small enough that hand-rolled assertions are fine.)</p>
<p>Two real bugs the tests caught:</p>
<h3>Bug 1: <code>sort -r</code> quietly doesn't reverse</h3>
<p>In my archive function I needed to delete multiple line ranges from the file, processing them <strong>bottom-up</strong> so earlier deletions don't shift later line numbers. I wrote:</p>
<pre><code class="language-bash">sort -k1,1n -r
</code></pre>
<p>Reading that, you'd think: &quot;sort by column 1, numeric, reversed.&quot; Nope. The <code>-r</code> flag wasn't being applied because of how it interacts with <code>-k</code>. The correct form is:</p>
<pre><code class="language-bash">sort -k1,1nr
</code></pre>
<p>Bake the <code>r</code> into the key spec. The test for &quot;archive multiple ranges&quot; failed loudly and I caught it before shipping.</p>
<h3>Bug 2: the missing blank line</h3>
<p>When the SessionStart hook inserted the very first BEACH entry into a freshly-skeletoned file, the result looked like this:</p>
<pre><code>## BEACH/
Resume this session with:    ← no blank line between header and entry
claude --resume ...
</code></pre>
<p>The awk script was eating the blank line that should have lived between the section header and the first entry. Fixed by always emitting one — regardless of whether the section was previously empty.</p>
<p>The point: <strong>TDD is not about ceremony, it's about catching the dumb stuff before your hooks start running on your real workflow at 9am Monday.</strong></p>
<h2>🏷️ Friendly names, stable UUIDs</h2>
<p>You can rename a Claude session (<code>/rename my-cool-name</code>), and circleback picks that up automatically: the picker shows the friendly name as the row label instead of a UUID like <code>c31187ad-…</code>. It reads the name <strong>live</strong> from the session log every time you open the picker, so it's always current.</p>
<p>Under the hood, though, the entry in my notes file still stores the <strong>UUID</strong>, not the name — on purpose:</p>
<ul>
<li>The UUID is globally unique and never changes: a rock-solid anchor for resuming.</li>
<li>Reading the name live means a re-rename just shows up next launch. Nothing to keep in sync, nothing to drift or corrupt.</li>
<li>Two sessions could end up sharing a name; a collision can never break resume, because the file always holds the unique UUID underneath.</li>
</ul>
<p>Friendly name on the surface, stable ID underneath.</p>
<p>(Confession: I first convinced myself Claude Code didn't persist session names at all, and built a lesser version around that wrong assumption. It does — the name lands in the session log the instant you <code>/rename</code>. Filed under &quot;a grep that comes up empty is a fact about your search, not about reality.&quot;)</p>
<h2>🎬 What it looks like in action</h2>
<pre><code>$ circleback

[STRIDE] …/STATE_TEST_PREP — wait-and-diff mode, LM xlsx incoming
[STRIDE] ~/code/STRIDE/1_APPS — SBOP-7011 audit re-run done, draft to Ernie
[STRIDE] …/2026-05-12_Tue — arcade-db-query skill round-tripped
[auto][BEACH] /tmp — Goodbye.
</code></pre>
<p>Arrow keys to scroll. Right pane shows full preview (session ID, cwd, status, summary, full closing thought). <code>Enter</code> resumes. <code>Tab</code> marks. <code>Ctrl-D</code> archives. <code>Esc</code> quits.</p>
<p>Test it yourself:</p>
<pre><code class="language-bash"># Start a throwaway session
cd /tmp &amp;&amp; claude
# Type &quot;say goodbye&quot;
# /exit
# Check the file
cat ~/CIRCLE_BACKS/CIRCLE-BACKS.md
# Run the picker
circleback
</code></pre>
<p>The <code>/tmp</code> entry should be there as <code>[auto][BEACH] /tmp — Goodbye.</code> Mark it with Tab, Ctrl-D, type <code>y</code>, and it gets archived to <code>CIRCLE-BACKS-ARCHIVE.md</code>.</p>
<h2>📅 The daily rollup</h2>
<p>Once every session was getting captured automatically, a second use fell out almost for free: <strong>what did I actually do today, across all these unrelated projects?</strong></p>
<p>So circleback now keeps a per-day file — <code>~/CIRCLE_BACKS/daily/2026-05-27_SUMMARY.md</code> — with two regions that never step on each other:</p>
<ul>
<li><strong><code>## Sessions (auto)</code></strong> — one line per session that ran that day, written by the very same SessionEnd/PreCompact hook that fills in closing thoughts. Section tag, directory, closing thought, and the resume command. Zero effort; it's just <em>there</em> by evening.</li>
<li><strong><code>## Digest</code></strong> — prose, written <em>only</em> when I ask for it. I say &quot;update the daily summary&quot; and a small skill reads the day's session lines (and each session's own STATUS doc) and writes a skimmable, cross-project <em>what-mattered-today</em>. Standup notes, or the seed of an article like this one.</li>
</ul>
<p>The hook owns the mechanical spine; the skill owns the prose. They share a file but not a region, so neither clobbers the other.</p>
<p>There's also a no-Claude accessor, so I never type the dated path:</p>
<pre><code>circleback daily              # open today's summary in $EDITOR
circleback daily 2026-05-26   # a specific day
circleback daily --list       # which days have summaries
circleback daily --rebuild    # regenerate today's auto spine from the master list
</code></pre>
<p><code>--rebuild</code> is the safety net: the auto region is derived data, so if it ever drifts, you regenerate it from <code>CIRCLE-BACKS.md</code> — without touching your prose digest.</p>
<h2>🪧 The nudge that made me write this</h2>
<p>Here's the part that closed the loop. I added one more hook — separate from circleback, living in my <code>~/.claude</code> — on Claude Code's <code>UserPromptSubmit</code> event (it fires on every prompt and can inject context into that turn). After the fourth prompt of a session (so quick lookups are spared), exactly once, it plants a standing instruction: <em>at the next natural stopping point, ask whether this work is worth showing people publicly.</em></p>
<p>Three answers: <strong>draft it now</strong> (→ my <code>publish-article</code> skill), <strong>park it</strong> (→ circle-back), or <strong>skip</strong>. It's a habit enforced by a turn counter and a marker file, not by willpower. Resume the session later and it won't re-ask — the marker is keyed by session id.</p>
<p>This article is what &quot;draft it now&quot; looks like.</p>
<h2>🧠 The meta-point</h2>
<p>This whole thing is <strong>bash, awk, sed, jq, fzf, and one config-file edit</strong>. No new language, no framework, no daemon, nothing to compile. The total install footprint is:</p>
<ul>
<li>One executable script (<code>~/.local/bin/circleback</code>)</li>
<li>Two hook scripts (<code>~/.claude/hooks/circleback-session-*.sh</code>)</li>
<li>A few helper libraries (<code>lib/parse.sh</code>, <code>lib/config.sh</code>, <code>lib/enrich.sh</code>, <code>lib/archive.sh</code>, <code>lib/daily.sh</code>)</li>
<li>One small config file (<code>~/.config/circleback/config</code>)</li>
<li>One additive edit to <code>~/.claude/settings.json</code></li>
</ul>
<p>That's it. The whole thing is <strong>composable, debuggable, scriptable, and small enough to read top-to-bottom in an afternoon</strong>.</p>
<p>Linux gives you a stupid number of tiny, sharp tools. The trick is recognizing when you can compose them into something useful instead of reaching for a heavy framework. Every shell pipeline you write is a tiny essay in this style.</p>
<p>I've got a dozen Claude Code threads running across as many projects right now, and for the first time it feels like that's a feature instead of a liability. Future-me has receipts.</p>
<h2>📬 Want to try it?</h2>
<p>circleback is built to be installed by anyone — config-driven sections, an <code>install.sh</code> that checks your dependencies, walks you through your sections (work / personal / research / whatever, or one flat list), symlinks the binary, and wires the Claude Code hooks into your <code>settings.json</code> (backing it up first, safe to re-run). <code>uninstall.sh</code> reverses all of it and leaves your data alone.</p>
<p>The repo's <strong>private for now</strong> — the installer touches your <code>~/.claude/settings.json</code>, so I want it boringly reliable on a few machines that aren't mine before I point the whole internet at it. If you'd like early access to kick the tires, email me at <strong>beachtimothyd@gmail.com</strong> and I'll add you. It's Linux-first (built on Aegix) and wants <code>bash</code>, <code>fzf</code>, <code>jq</code>, and the <code>claude</code> CLI.</p>
<p>When it goes public I'll update this article with the link.</p>
<hr />
<p><em>Built alongside Claude itself, using its superpowers brainstorm → spec → plan → TDD workflow — ~110 passing bash tests at last count. Email me if you want early access. Future me has receipts.</em></p>
]]></content:encoded>
    </item>
    <item>
      <title>The OSI Model, Explained from a Whiteboard</title>
      <link>https://timbeach.com/a/osi-model-whiteboard/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/osi-model-whiteboard</guid>
      <pubDate>Sat, 02 May 2026 00:00:00 +0000</pubDate>
      <description>A whiteboard walk-through of the seven layers — what each one actually does, and why “that's a Layer 7 problem” still means something even though the modern internet runs on TCP/IP.</description>
      <content:encoded><![CDATA[<p>Sometimes the best way to lock in a concept is to grab a marker and start scribbling. I sketched out the OSI model recently — seven layers stacked top to bottom, with a few mnemonic hints squeezed into the margins. Here's the walk-through.</p>
<h2>What the OSI Model Actually Is</h2>
<p>The Open Systems Interconnection model is a conceptual framework that breaks network communication into seven distinct layers. It was published by ISO back in the 1980s, and while the modern internet runs on the looser TCP/IP model, OSI is still the lingua franca for <em>talking about</em> networking. When somebody says &quot;that's a Layer 7 problem&quot; or &quot;Layer 2 broadcast storm,&quot; they're speaking OSI.</p>
<p>Each layer has one job. Each layer talks to the layer above and the layer below — and in theory, only those. Data flows down the stack on the sending side, crosses the wire (or air), and flows back up the stack on the receiving side, getting unwrapped at each step.</p>
<h2>Layer 7: Application</h2>
<p><strong>HTTP, SMTP, DNS, SSH</strong></p>
<p>This is the layer closest to the user. Your browser, your email client, your terminal — they all live here. When you type a URL and hit enter, you're generating an HTTP request that originates at Layer 7.</p>
<p>Worth noting: &quot;Application Layer&quot; doesn't mean &quot;the app itself.&quot; It means the protocols apps use to talk to the network. Chrome isn't Layer 7. The HTTP protocol Chrome speaks <em>is</em>.</p>
<h2>Layer 6: Presentation</h2>
<p><strong>Encryption, compression, character encoding</strong></p>
<p>This is the translator. It takes data from Layer 7 and reformats it for transmission — encrypting it (TLS lives here, conceptually), compressing it, converting between character sets like UTF-8 and ASCII.</p>
<p>In the real-world TCP/IP stack, this layer often gets folded into Layer 7 or handled inline by libraries. But conceptually, it's the &quot;make this data ready to send&quot; step.</p>
<h2>Layer 5: Session</h2>
<p><strong>Conversation between two nodes — volleyball</strong></p>
<p>The volleyball metaphor is the clearest one I've found. A session is a back-and-forth rally between two endpoints. Layer 5 sets up the volley, keeps it going, and ends it cleanly when the point is over.</p>
<p>Think SSH login sessions, RPC calls, anything where state persists across multiple message exchanges. The session layer opens, maintains, and closes those conversations.</p>
<h2>Layer 4: Transport</h2>
<p><strong>Segmentation, acknowledgment, multiplexing — reliable</strong></p>
<p>Now we're into the plumbing. Layer 4 is where TCP and UDP live. Its job is to break data into segments, deliver them, and — in TCP's case — make sure they actually arrived.</p>
<ul>
<li><strong>Segmentation:</strong> Break the message into chunks small enough to send.</li>
<li><strong>Acknowledgment:</strong> TCP's &quot;did you get that?&quot; handshake.</li>
<li><strong>Multiplexing:</strong> Multiple conversations sharing one connection, sorted by port number.</li>
</ul>
<p>When someone talks about &quot;port 443&quot; or &quot;port 22,&quot; that's a Layer 4 concept.</p>
<h2>Layer 3: Network</h2>
<p><strong>Packet / datagram — routing and addressing</strong></p>
<p>This is IP. Layer 3 is responsible for getting a packet from Network A to Network B, possibly across a dozen routers along the way. It assigns logical addresses (IP addresses) and figures out the path.</p>
<p>If Layer 4 says &quot;deliver this reliably,&quot; Layer 3 says &quot;deliver this to <em>that house, in that city, in that country.</em>&quot; Routers operate at this layer.</p>
<h2>Layer 2: Data Link</h2>
<p><strong>Data frames — two nodes physically connected</strong></p>
<p>Layer 2 handles communication between two devices on the same physical network segment. Ethernet and Wi-Fi are Layer 2 protocols. MAC addresses are Layer 2 addresses.</p>
<p>Where Layer 3 worries about routing a packet across the internet, Layer 2 worries about getting a frame across a single hop — your laptop to your router, your router to the cable modem. Switches operate here.</p>
<h2>Layer 1: Physical</h2>
<p><strong>Let's get physical — raw bitstreams</strong></p>
<p>The wire. The radio wave. The fiber optic pulse. Layer 1 is the actual electrical, optical, or radio signal carrying ones and zeros.</p>
<p>No addressing here, no framing, no protocol logic — just voltage, frequency, and timing. Cables, connectors, hubs, repeaters, and the spec of &quot;what does a 1 look like on this medium?&quot; all live at Layer 1.</p>
<h2>Memorizing the Stack</h2>
<p>The classic mnemonics:</p>
<ul>
<li><strong>Top down:</strong> All People Seem To Need Data Processing.</li>
<li><strong>Bottom up:</strong> Please Do Not Throw Sausage Pizza Away.</li>
</ul>
<p><img src="pix/sausage_pizza.png" alt="Sausage pizza — Please Do Not Throw Sausage Pizza Away" /></p>
<p>Pick whichever sticks. Personally, I find the pizza one harder to forget — and the bottom-up direction matches the way data actually arrives at your machine: photons and voltages first, application semantics last.</p>
<h2>Why It Still Matters</h2>
<p>Most production debugging is OSI-flavored, even when nobody calls it that. &quot;DNS isn't resolving&quot; is Layer 7. &quot;TLS handshake failing&quot; straddles 6 and 7. &quot;Connection refused&quot; is 4. &quot;No route to host&quot; is 3. &quot;Link is down&quot; is 1 or 2. Knowing which layer to investigate first is half the job.</p>
<p>The OSI model isn't a precise description of how networks actually work — TCP/IP collapses some of these layers and ignores others. It's a thinking tool. A way to decompose a fundamentally messy problem into manageable slices. Once it clicks, you start seeing it everywhere.</p>
]]></content:encoded>
    </item>
    <item>
      <title>From ~/.local/src to the AUR</title>
      <link>https://timbeach.com/a/aegix-on-the-aur/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/aegix-on-the-aur</guid>
      <pubDate>Fri, 01 May 2026 00:00:00 +0000</pubDate>
      <description>How my suckless edits travel from ~/.local/src into the AEGIX monorepo and out to the AUR as installable -git packages — a post-commit hook, four packages, and one rule: live on this machine is truth, the network is a manual gesture.</description>
      <content:encoded><![CDATA[<p>If you run <a href="https://aegixlinux.org">Aegix</a> — or you're an Arch / Artix tinkerer who likes the suckless stack — you can now <code>yay -S dwm-aegix-git</code> (or <code>st-aegix-git</code>, <code>dmenu-aegix-git</code>, <code>dwmblocks-aegix-git</code>) and pull down the exact builds I run on my own machine. This post is the short story of how that pipeline got built, and a couple of small gotchas worth knowing if you publish your own.</p>
<h2>The problem</h2>
<p>I edit my suckless tools the obvious way: in <code>~/.local/src/{dwm,st,dmenu,dwmblocks}</code>, then <code>sudo make clean install</code>. That's the source of truth on this machine. Two things needed solving:</p>
<ol>
<li><strong>Reflect those edits into the AEGIX monorepo</strong> so the project's submodule pins stay current — without needing me to remember.</li>
<li><strong>Publish them to the AUR</strong> so anyone running Arch or Artix can install Aegix's flavor without cloning, patching, and <code>make</code>-ing four repos.</li>
</ol>
<p>Different problems, same starting point.</p>
<h2>Half one: the local sync</h2>
<p>The reflection part is a single <code>post-commit</code> hook in each <code>~/.local/src/&lt;tool&gt;</code> repo. When I commit, the hook fast-forwards the corresponding submodule in <code>~/code/PROJECTS/AEGIX/&lt;tool&gt;</code> to the new SHA and stages the submodule pointer bump in the parent. That's it.</p>
<p>It does <strong>not</strong> push anywhere. I tried an earlier design that auto-pushed to GitHub, and it bit me the first time my local was behind the remote — the hook happily force-shoved stale state over newer commits. The lesson:</p>
<blockquote>
<p>Live on this machine is truth. The network is a manual gesture.</p>
</blockquote>
<p>So now there's exactly one place automation touches: my local filesystem. <code>git push</code> stays in my fingers, where it belongs. The whole sync is ~150 lines of bash with a 28-assert test harness. Boring on purpose.</p>
<h2>Half two: the AUR side</h2>
<p>The four packages are all <code>-git</code> flavor, which means the PKGBUILD doesn't need editing when I tweak <code>config.h</code>. The <code>pkgver()</code> function auto-resolves against GitHub HEAD on every build:</p>
<pre><code class="language-bash">pkgver() {
  cd &quot;$_pkgname&quot;
  printf &quot;r%s.%s&quot; &quot;$(git rev-list --count HEAD)&quot; &quot;$(git rev-parse --short HEAD)&quot;
}
</code></pre>
<p>So my normal flow is now exactly two manual operations:</p>
<pre><code class="language-bash"># 1. Edit + test live
vim ~/.local/src/dwm/config.h
cd ~/.local/src/dwm &amp;&amp; sudo make clean install

# 2. Commit (hook reflects to AEGIX automatically)
git commit -am &quot;feat: new keybinding&quot;

# 3. When ready, publish
git push origin master
</code></pre>
<p>Next time anyone runs <code>yay -Syu</code>, AUR resolves the new HEAD and they get the rebuild. The PKGBUILD itself only needs touching for real packaging changes (new dep, license fix, build-system tweak).</p>
<h2>The flow</h2>
<pre><code>  ~/.local/src/&lt;tool&gt;/          ← edit + build + test
           │
           │ git commit
           ▼
  post-commit hook (local, no network)
           │
           └─► ~/code/PROJECTS/AEGIX/&lt;tool&gt;/   ← submodule advances
           
           │ git push            ← only manual network action
           ▼
  github.com/aegixlinux/&lt;tool&gt;
           │
           │ pkgver() resolves on yay -Syu
           ▼
  AUR users get fresh builds  ✨
</code></pre>
<p>Two manual git operations, four published packages.</p>
<h2>Two gotchas worth sharing</h2>
<p><strong>1. AUR work-trees inside a parent repo.</strong> I wanted <code>aur/&lt;pkg&gt;/PKGBUILD</code> to be tracked by the outer monorepo <em>and</em> by the AUR's own remote. Nested <code>.git</code> directories make Git refuse to track the inner files in the outer repo. The fix: hold each AUR package's <code>.git</code> outside its work-tree, in a sibling <code>aur/.aur-git/&lt;pkg&gt;/</code> dir, and run AUR-side git through a tiny wrapper:</p>
<pre><code class="language-bash">#!/usr/bin/env bash
PKG=&quot;$1&quot;; shift
export GIT_DIR=&quot;$HOME/AEGIX_AGENTIC/aur/.aur-git/$PKG&quot;
export GIT_WORK_TREE=&quot;$HOME/AEGIX_AGENTIC/aur/$PKG&quot;
exec git &quot;$@&quot;
</code></pre>
<p>Now <code>aur-git dwm-aegix-git push</code> does the right thing without confusing the parent repo.</p>
<p><strong>2. <code>st</code>'s <code>tic</code> runs at install time.</strong> The stock <code>st</code> Makefile calls <code>tic -sx st.info</code> during <code>make install</code>, which writes to <code>/usr/share/terminfo</code> — fine on a real install, but inside makepkg's fakeroot it tries to write to the real filesystem and fails. The fix is a one-line <code>prepare()</code> step in the PKGBUILD:</p>
<pre><code class="language-bash">prepare() {
  cd &quot;$_pkgname&quot;
  sed -i 's|tic -sx st.info|tic -sx -o &quot;$(DESTDIR)/usr/share/terminfo&quot; st.info|' Makefile
}
</code></pre>
<p>Both of these took longer to diagnose than to fix, which is the usual ratio.</p>
<h2>Why bother</h2>
<p>Honestly? Mostly so I stop accidentally diverging between &quot;the dwm I actually use&quot; and &quot;the dwm I publish.&quot; When the publishing is one <code>git push</code> away from the editor, there's no excuse for them to drift. And as a side effect, anyone curious about Aegix's stack can try a piece of it without committing to the whole distro.</p>
<p>If you want to peek: the four packages are on the AUR under <code>dwm-aegix-git</code>, <code>st-aegix-git</code>, <code>dmenu-aegix-git</code>, <code>dwmblocks-aegix-git</code>. The build pipeline lives at <a href="https://github.com/aegixlinux">github.com/aegixlinux</a>.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Pipeline vs Harness</title>
      <link>https://timbeach.com/a/pipeline-vs-harness/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/pipeline-vs-harness</guid>
      <pubDate>Wed, 29 Apr 2026 00:00:00 +0000</pubDate>
      <description>Two words that sound alike and get used loosely but mean opposite things — a pipeline is a conveyor belt that work flows through; a harness is a jig that wraps a fixed thing to drive it. The distinction, with the instances we actually use.</description>
      <content:encoded><![CDATA[<p>Two words that sound similar, get used loosely, and actually mean different things. Short version up top, then the nuance.</p>
<h2>TL;DR</h2>
<ul>
<li><strong>Pipeline</strong> = work moves <em>through</em> stages. The thing being processed flows; the stages are fixed.</li>
<li><strong>Harness</strong> = the system stays put; the harness <em>wraps</em> it to run/test/drive it. The wrapper is active, the wrapped thing is acted upon.</li>
</ul>
<p>A pipeline is a <em>conveyor belt</em>. A harness is a <em>jig</em> (or a horse's harness — same root metaphor).</p>
<h2>Pipeline</h2>
<h3>Colloquial sense</h3>
<p>A series of stages where the output of one step is the input of the next. Linear, directional, often automated. Borrowed from oil/water pipelines: stuff goes in one end, comes out the other, transformed along the way.</p>
<h3>Technical instances we actually use</h3>
<ul>
<li><strong>CI/CD pipeline</strong> — <code>lint → build → test → deploy</code>. GitHub Actions, Jenkins, GitLab CI.</li>
<li><strong>Data pipeline / ETL</strong> — <code>extract → transform → load</code>. Airflow, dbt, Dagster.</li>
<li><strong>Unix pipes</strong> — <code>cat foo | grep bar | sort | uniq -c</code>. The original.</li>
<li><strong>ML training pipeline</strong> — <code>ingest → featurize → train → evaluate → register</code>.</li>
<li><strong>Compiler pipeline</strong> — <code>lex → parse → typecheck → optimize → codegen</code>.</li>
<li><strong>Render pipeline</strong> — vertex shader → fragment shader → framebuffer.</li>
</ul>
<h3>Defining traits</h3>
<ol>
<li><strong>Directional flow</strong> — work moves forward through ordered stages.</li>
<li><strong>Stage isolation</strong> — each stage has a clear input contract and output contract.</li>
<li><strong>Transformation-centric</strong> — the <em>thing</em> (data, code, artifacts) is what changes.</li>
<li><strong>Often parallel-fan-out / fan-in</strong> — but still graph-shaped, not loopy.</li>
<li><strong>Stateless-ish stages</strong> — re-runnable, cacheable, idempotent when done well.</li>
</ol>
<p>When someone says &quot;the pipeline broke,&quot; they mean a stage failed and the artifact didn't make it to the next stage.</p>
<h2>Harness</h2>
<h3>Colloquial sense</h3>
<p>A thing that wraps around another thing to control it, hold it in place, or drive it. Horse harness, climbing harness, wiring harness. The harness doesn't <em>become</em> the horse — it constrains and directs the horse.</p>
<h3>Technical instances we actually use</h3>
<ul>
<li><strong>Test harness</strong> — the scaffolding that sets up fixtures, invokes the code under test, captures output, asserts. JUnit, pytest, RSpec. The harness is what makes a function <em>testable in isolation</em>.</li>
<li><strong>Agent / LLM harness</strong> — the loop and machinery around a language model: prompt assembly, tool dispatch, context management, retries, hooks. Claude Code is a harness around Claude. The model is the engine; the harness is the chassis.</li>
<li><strong>Hardware test harness</strong> — physical bench rig that powers a board, drives its inputs, measures its outputs.</li>
<li><strong>Wiring harness</strong> — bundled cables that connect a system together (cars, aircraft).</li>
<li><strong>Fuzzing harness</strong> — <code>LLVMFuzzerTestOneInput(...)</code> — a thin wrapper that hands fuzzer-generated bytes to the code being fuzzed.</li>
<li><strong>Benchmark harness</strong> — JMH, criterion.rs. Wraps the code, runs it many times under measured conditions.</li>
</ul>
<h3>Defining traits</h3>
<ol>
<li><strong>Wraps a system under operation</strong> — the wrapped thing (function, model, board, binary) is the subject; the harness is the apparatus.</li>
<li><strong>Control loop / driver</strong> — usually has its own event loop, timing, or invocation logic.</li>
<li><strong>Instrumentation</strong> — captures, observes, asserts, measures.</li>
<li><strong>Lifecycle ownership</strong> — sets up, tears down, isolates the system under test/run.</li>
<li><strong>Often stateful</strong> — maintains context across invocations of the wrapped thing.</li>
</ol>
<p>When someone says &quot;the harness is flaky,&quot; they mean the wrapper itself (setup, teardown, env) is broken — not the code being exercised.</p>
<h2>The overlap zone (where people mix them up)</h2>
<table>
<thead>
<tr>
<th>Term you'll hear</th>
<th>Which is it really?</th>
</tr>
</thead>
<tbody>
<tr>
<td>&quot;Test pipeline&quot;</td>
<td>A pipeline of stages (lint → unit → integration → e2e). Each stage may <em>use</em> a test harness.</td>
</tr>
<tr>
<td>&quot;Test harness&quot;</td>
<td>The framework that runs an individual test — fixtures, asserts, mocks.</td>
</tr>
<tr>
<td>&quot;Inference pipeline&quot;</td>
<td>Data flows: input → preprocess → model → postprocess → output.</td>
</tr>
<tr>
<td>&quot;Agent harness&quot;</td>
<td>Loop wrapping an LLM with tools and context. Not a pipeline — has cycles, branching, persistent state.</td>
</tr>
<tr>
<td>&quot;Build pipeline&quot;</td>
<td>Stages: compile → link → package → sign → publish.</td>
</tr>
<tr>
<td>&quot;Build harness&quot;</td>
<td>Less common; would mean the rig that <em>invokes</em> the build (e.g., a meta-builder driving many sub-builds).</td>
</tr>
</tbody>
</table>
<h3>Rule of thumb</h3>
<ul>
<li>If you can draw it as a <strong>DAG of stages</strong> with artifacts moving left-to-right → <strong>pipeline</strong>.</li>
<li>If you can draw it as a <strong>box wrapping another box</strong>, with a control loop and instrumentation → <strong>harness</strong>.</li>
<li>They compose: a CI <strong>pipeline</strong> runs a stage that invokes a test <strong>harness</strong> to exercise the code.</li>
</ul>
<h2>Why the distinction matters for our work</h2>
<ol>
<li><strong>Debugging triage</strong> — &quot;the pipeline failed at the test stage&quot; vs &quot;the test harness is hanging&quot; point at very different failure modes. One is an artifact problem (build broken, deps missing), the other is an environmental/wrapper problem (fixture setup, teardown leaking).</li>
<li><strong>Design choices</strong> — when building automation, ask: am I moving artifacts through stages (pipeline) or driving a system to observe its behavior (harness)? The shapes are different. Pipelines want orchestrators (Airflow, GHA). Harnesses want runners and drivers (pytest, custom loops).</li>
<li><strong>LLM-era specifically</strong> — &quot;agent&quot; work is overwhelmingly <em>harness</em> work. Claude Code, Cursor, the Claude Agent SDK — they are all harnesses around a model. Calling them pipelines obscures that the central thing is a loop with state and tool dispatch, not a feed-forward flow.</li>
</ol>
<h2>One-line mnemonic</h2>
<blockquote>
<p>A <strong>pipeline</strong> transforms what flows through it. A <strong>harness</strong> controls what sits inside it.</p>
</blockquote>
]]></content:encoded>
    </item>
    <item>
      <title>How My Blog Got a Voice</title>
      <link>https://timbeach.com/a/how-my-blog-got-a-voice/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/how-my-blog-got-a-voice</guid>
      <pubDate>Sun, 26 Apr 2026 00:00:00 +0000</pubDate>
      <description>Adding read-aloud to this blog took three tries — Web Speech that stays silent on Linux, in-browser WASM that hung the page — before the dumb-in-retrospect fix: render the audio once at publish time and ship the bytes. Plus the two parser bugs hiding on the way.</description>
      <content:encoded><![CDATA[<p><img src="pix/blog-got-a-voice.png" alt="How my blog got a voice" /></p>
<p>Click <strong>▶ read aloud</strong> at the top of this article. A British man named Lewis is going to read it to you. He works for me now.</p>
<p>This is a story about how I got there, and about all the wrong turns I took along the way. If you're considering adding text-to-speech to your site, please learn from my mistakes — there are at least four of them.</p>
<h2>🎤 The first attempt: Web Speech</h2>
<p>The Web Speech API has been built into browsers for over a decade. You hand <code>speechSynthesis.speak()</code> a string, the browser figures out a voice and reads it aloud. No download, no library, no API key. It is the easiest possible way to add TTS to a webpage.</p>
<p>I wired it up in maybe twenty lines. It worked beautifully on macOS. It worked on Windows. It worked on Android. Then I opened my own site in my own browser — Brave, on Aegix Linux — and the voice list came back empty. No audio. No error. Just silence.</p>
<p>It turns out that on Linux, the browser's &quot;speech synthesis&quot; is a thin wrapper around a system service called <code>speech-dispatcher</code>, which in turn shells out to <code>espeak-ng</code> (or Festival, if you're feeling vintage). If you don't have those installed — which most desktop Linux distros don't, by default — your browser knows zero voices, and the API politely returns nothing.</p>
<p>This was annoying for me personally, because <em>I am the entire Linux audience for my own blog</em>, and I was apparently locked out of my own read-aloud feature. But it would have been annoying for any of my visitors on Linux too, and I wasn't about to ship &quot;install these three packages first&quot; as a UX.</p>
<h2>🐌 The second attempt: WASM in the browser</h2>
<p>Fine, I thought. If the browser's native TTS can't be relied upon, I'll bring my own. Kokoro is a lovely open-source neural TTS model — small (82 million parameters), fast for its size, and there's a JavaScript port that runs entirely in the browser via WebAssembly. No system dependencies. Works in any browser anywhere.</p>
<p>The download is ~80 MB. That's a lot. But it's a one-time hit, cached in IndexedDB. Once you've heard one article, the rest are free. I added a button that said <code>HQ · ~80MB</code>, made the model load with a progress bar, and shipped it.</p>
<p>It was sublime. For about thirty seconds.</p>
<p>The first paragraph rendered fine. The model loaded, made some confident claims about what Lewis sounded like, and started reading. Then, somewhere in the middle of the second paragraph, Brave threw up a dialog that said <strong>&quot;This page is not responding.&quot;</strong> The model was synthesizing the <em>next</em> paragraph in the background — on the same thread the browser uses to fire audio events and repaint the screen — and the synthesis was taking long enough that the watchdog assumed the tab had hung.</p>
<p>I moved the synthesis into a Web Worker. The unresponsive dialog went away. But now there were multi-second gaps between paragraphs, because synthesizing each new paragraph took about as long as the previous paragraph's audio took to play. The &quot;look-ahead&quot; pipeline that was supposed to prepare the next paragraph in advance couldn't get ahead. It was a real-time-factor problem: my laptop is fast, but it isn't <em>that</em> fast, and other people's laptops are often slower than mine.</p>
<p>I sat with this for an evening, and eventually said it out loud: <em>I am asking every reader's CPU to do work that I should be doing once, on my own machine.</em></p>
<h2>📼 The pivot: render once, ship the bytes</h2>
<p>The realization is dumb in retrospect. Audio doesn't have to be live. I publish articles by hand, one at a time, on my own laptop. There is exactly one moment per article when I need TTS — at publish time — and exactly one machine that needs to do the work — mine.</p>
<p>So now, when I publish an article, a Python script splits the markdown into paragraphs and feeds each one through Kokoro running locally. The samples get concatenated, encoded as Opus at 64 kbps mono, and saved as <code>audio/&lt;slug&gt;.ogg</code>. Alongside it, a tiny <code>audio/&lt;slug&gt;.timings.json</code> records the start and end timestamp of every paragraph. Both files get rsynced to the server with the rest of the site.</p>
<p>The browser then does almost nothing. It sees the audio path in the article metadata, attaches a native <code>&lt;audio&gt;</code> element, and plays. As <code>currentTime</code> advances, a <code>timeupdate</code> listener finds which paragraph the playhead is in and adds a <code>tts-reading</code> class to its DOM element. That's how the highlighted line glows as Lewis reads it. There are no models, no workers, no WebAssembly. Just a 3 MB Opus file and a 13 KB JSON sidecar.</p>
<p>It works on every browser on every operating system. No 80 MB download. No &quot;page not responding.&quot; The highlight is exact, because the timestamps were measured at synthesis time — not estimated client-side.</p>
<p>The whole TTS-related code in the page is about 130 lines. The thing it replaced was almost 700.</p>
<h2>🪤 The traps the parsers hid</h2>
<p>Two bugs hit me on the way to shipping, and I want to flag them because they're shaped the same way: <em>two different markdown parsers disagreeing about what counts as a paragraph.</em></p>
<p>The site has a custom JavaScript markdown parser, and the Python render pipeline uses <code>markdown-it-py</code>. They're supposed to produce the same paragraph structure for the same input, because the highlight needs <code>paragraphs[idx]</code> on the server side to refer to the same DOM element on the client side. They didn't always agree.</p>
<p><strong>Trap one.</strong> My JS parser maps <code># Title</code> to <code>&lt;h2&gt;</code>, not <code>&lt;h1&gt;</code>. (I have no idea why past-me thought this was a good idea. Past-me is not available for comment.) <code>markdown-it-py</code>, being CommonMark-compliant, maps <code>#</code> to <code>&lt;h1&gt;</code>. So the article title was counted as a paragraph on the client and skipped on the server. One element off, every time. The fix was to make the client's TTS selector skip <code>&lt;h2&gt;</code>, mirroring the server skipping <code>&lt;h1&gt;</code> — which works because in this codebase, <code>&lt;h2&gt;</code> is <em>always</em> the article title.</p>
<p><strong>Trap two.</strong> When I wrote the <a href="#articles/jungian-dream-notes.md">dream notes article</a>, I used a verse-style format with one short sentence per line, separated by single newlines. CommonMark treats those lines as one paragraph with soft breaks. My JS parser treats every line as its own paragraph. So Python saw 52 paragraphs and the browser saw 110, the runtime sanity check fired, and the read-aloud button silently refused to open. The fix was to rewrite the article using <code>\n\n</code> between every line. Both parsers now agree.</p>
<p>The deeper lesson: when two systems both parse the same input, you eventually find out they parse it differently. I added a <code>--validate</code> mode to the render tool that flags timings vs. markdown drift, and a gate in <code>deploy.sh</code> that aborts if any article's audio is stale. That catches &quot;I edited an article and forgot to re-render,&quot; which is the most common future failure mode. It does <em>not</em> catch parser-disagreement bugs of the kind I just described — for that, you'd need to run both parsers from the same harness and diff their output. I'm leaving that as a future project.</p>
<h2>🌟 Why this is actually better</h2>
<p>I started out trying to give my Linux readers parity with my macOS readers. What I ended up with is something better than either.</p>
<p>Every reader gets the same voice. Every paragraph highlights at exactly the right moment. The audio loads progressively from a static file, which the browser is excellent at. There's no compute on the reader's device, no model to download, no system service to install. The whole feature degrades gracefully — articles that don't have audio (because I haven't re-rendered them, or because rendering failed) simply don't show the read-aloud button.</p>
<p>And the voice is <em>good</em>. <code>bm_lewis</code> is a British-accented neural TTS voice that takes itself seriously. It sounds like the audiobook narrator for a book on, say, Jungian dream interpretation. Which is convenient, because I just wrote one of those.</p>
<h2>🐉 What I'd do differently</h2>
<p>Less, mostly.</p>
<p>The Web Speech experiment took a few hours. The WASM-in-browser experiment took several days, including an entire branch of work — engine abstractions, look-ahead queues, IndexedDB caching, jsDelivr fallbacks, <code>_pendingResumeIdx</code>, <code>_keepAlive</code> intervals to work around a Chrome bug — that I deleted in a single commit when I switched to pre-rendering. I built a sophisticated solution to the wrong problem. The correct realization — that I publish articles by hand and could just render them by hand too — was sitting there the whole time.</p>
<p>The hard part wasn't the engineering. It was noticing that a constraint I'd accepted (TTS has to be live in the browser) was self-imposed. Once I let go of it, the implementation got smaller, faster, and more reliable in the same edit.</p>
<p>If you're building something where you find yourself defending a complicated piece of infrastructure on someone else's behalf — <em>every reader's CPU should run inference so that...</em> — try the version where you do that work once, on your own machine, and ship the bytes. You will probably be surprised how often it's enough.</p>
<p>Now press play, and let Lewis take it from here.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Jungian Dream Notes</title>
      <link>https://timbeach.com/a/jungian-dream-notes/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/jungian-dream-notes</guid>
      <pubDate>Thu, 23 Apr 2026 00:00:00 +0000</pubDate>
      <description></description>
      <content:encoded><![CDATA[<p><img src="pix/jungian-dream.png" alt="Jungian Dream" /></p>
<p><em>Dream notes from the night of Earth Day 2026. This one hit different.</em></p>
<h2>The House That Burns Before It Burns</h2>
<p>I find myself returned to a life that is no longer mine. I walk within it as though it still holds me. The rooms are familiar, but they do not agree with memory. They are like recollection seen through water, true in essence, false in form.</p>
<p>I knew I had come from a later time, and I had not come without purpose. The house stood whole, but it was already ash. I understood the past is not a fixed place, but a living chamber within the soul, which may be re-entered when inner knowledge ripens or expands.</p>
<h2>The Vehicle of Borrowed Motion</h2>
<p>I move through the night in a great vehicle, large and serviceable, yet I know it is not truly mine. It carries me forward with the weight of duty, and I accept its offices.</p>
<p>Within myself I heard: This is how I once lived, borne along by structures I did not question, fulfilling roles that preceded me. I saw what we call “our life” is often a vessel inherited, and only later do we ask whether we were its driver or its cargo.</p>
<h2>The Gathering of the Dogs</h2>
<p>On the dark roadside I find animals waiting. Some I know, and others I do not, yet all come willingly with the turn of my head. They enter the vehicle and lay in quiet trust.</p>
<p>I knew them to be companions of instinct, the faithful movements of the soul that bind themselves to us long before we understand them. I saw what is loyal in us does not ask whether it is recognized, but only whether it is received.</p>
<h2>The Transformation into the Living Beast</h2>
<p>Then the great vehicle dissolves, and in its place stands a creature of strength and patience, not unlike a yak. I mount it, and it bears me without resistance. I marvel, for I do not command it with force, yet it obeys.</p>
<p>Then I understood that which was once mechanical in me had become alive. For when a man ceases to be carried by structure, he must learn to ride what lives within him, and if he is fortunate, it will not throw him.</p>
<h2>The Crossing Between Worlds</h2>
<p>I pass from place to place without passage. Familiar roads give way to distant lands, and yet no journey seems to occur.</p>
<p>Then I saw the soul does not travel as the body travels. It moves by association, by memory, by likeness. And thus it binds together what the waking mind keeps apart. What we call distance is only the refusal to see continuity.</p>
<h2>The House of Quiet Knowing</h2>
<p>I come upon a place of stillness, where an old man tends a shop of subtle things. He speaks little, yet much was conveyed. I linger here, though I cannot say why.</p>
<p>Then I knew this was the place within where knowledge gathers before it becomes speech. The old man was not other than myself, but the part of me that does not hurry, for wisdom does not announce itself loudly, but waits until the noise has passed.</p>
<h2>The Knowledge of Fire</h2>
<p>Then it is given to me to know: The houses would burn. Not one, but many. And though they stand intact, their destruction is already present, yet I do not panic. Instead, I feel the weight of what must be spoken.</p>
<p>I saw, to know what is coming is not the same as to prevent it, and foresight does not grant dominion, only responsibility.</p>
<h2>The Return to the House</h2>
<p>I enter the house that was both past and present. Those within it move as though the day were ordinary. And I speak: “Fire is coming. You must prepare.” Some hear me. Others do not. And I repeat myself, calmly, as though repetition might bridge the gap between knowing and not knowing.</p>
<p>Then I understood, truth does not enter all ears equally, and there are moments when one must speak even while knowing one will not be fully believed.</p>
<h2>The Children of Uneven Time</h2>
<p>Among those present are the young. One receives my words and holds them. Another can not yet grasp them.</p>
<p>And I saw clearly within us are many ages. One part sees. Another part feels. Another part cannot yet know. And no argument will hasten what must ripen and expand. I learned, Patience is owed not only to others, but to the undeveloped regions of one’s own soul.</p>
<h2>The Crowd and Their Doubt</h2>
<p>I speak again and again. Some begin to act, though uncertainty clings to them. They move as those who half-believe.</p>
<p>And I knew, when when truth is heard, it is often received in fragments. To accept fully what is coming is to surrender the comfort of what is, and few surrender quickly.</p>
<h2>The Fire Already Begun</h2>
<p>I step outside and behold the street. Flames are already taking hold in the distance. Voices rise. Vehicles gather. The event I have come to warn against is already unfolding.</p>
<p>Then I saw awareness arrives within time, but events do not wait for awareness, and we are often late to what has long been in motion.</p>
<h2>The Market of Letting Go</h2>
<p>In the yard, people exchange their possessions. They barter lightly, as though the day were still ordinary. And I marvel, for the fire advances even as they trade.</p>
<p>Then I understood we begin to release our lives before we admit they are ending, and what appears as casual exchange is often the first movement of dissolution.</p>
<h2>The Relinquishing of Control</h2>
<p>Then a knowing comes upon me: It is not mine to save them. It is not mine to compel belief. It is mine only to speak. And having spoken, to depart.</p>
<p>I learned there is a boundary to responsibility. Beyond it lies illusion, the belief that one can govern what belongs to all.</p>
<h2>The Return</h2>
<p>I withdraw from that place. The path reverses, though no steps are retraced. The living beast gives way again to the vessel, and I find myself returned.</p>
<p>I saw the past may be entered, but not inhabited, and one who lingers too long forgets which time is his own.</p>
<h2>The Release of What Was Carried</h2>
<p>I return the animals to their place. They do not resist. And I keep nothing for myself.</p>
<p>Then I understood, that which accompanies us for a time is not therefore ours to keep, and care does not require possession.</p>
<h2>The Token of Knowing</h2>
<p>I am given a small object, a thing of no practical use. Yet I valued it. For it stood as proof, not to others, but to myself, that I had seen truly.</p>
<p>I saw the soul does not trade in evidence, but in symbols. And what it gives is not for display, but for remembrance.</p>
<h2>Final Word</h2>
<p>And so I came away with this: That a man may come to know what is unfolding, yet he cannot hasten others into that knowing. He may speak truth, but he cannot command its reception. He may see the fire, but he does not own the flame.</p>
<p>And if he is wise, he will do what is his to do, and leave the rest to what is greater than himself.</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Configure Obsidian the Agentic Way</title>
      <link>https://timbeach.com/a/how-to-config-obsidian/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/how-to-config-obsidian</guid>
      <pubDate>Tue, 21 Apr 2026 00:00:00 +0000</pubDate>
      <description></description>
      <content:encoded><![CDATA[<p><img src="pix/how-to-config-obsidian.png" alt="How to Configure Obsidian" /></p>
<p><strong>Step 1:</strong> Ask Claude.</p>
<p><strong>Step 2:</strong> There is no step 2.</p>
<p>OK fine, here's the long version.</p>
<p>Obsidian, like most modern apps, keeps its settings in a pile of JSON files tucked away inside your vault (<code>.obsidian/</code>). You <em>could</em> go clicking through Settings panels, memorizing the difference between &quot;Editor → Display&quot; and &quot;Editor → Behavior,&quot; hunting for the one toggle that turns off that specific thing you hate. Or you could just say what you want out loud.</p>
<p>The other day I got tired of the squiggly red underlines treating every third word as a typo. So I asked:</p>
<blockquote>
<p>how do we turn off spell check red underlining in obsidian? if you can find the config and update it directly, go ahead</p>
</blockquote>
<p>Claude found <code>.obsidian/app.json</code>, flipped <code>&quot;spellcheck&quot;: true</code> to <code>&quot;spellcheck&quot;: false</code>, and told me to reload the vault. Total time: maybe six seconds, most of which was me typing the question.</p>
<p>No scavenger hunts through preference panels. No StackExchange threads from 2019 describing menus that no longer exist. No <code>sed</code> incantations with escaped quotes.</p>
<p>You just describe the vibe you want, and a piece of software rearranges the other piece of software to match. The future is weird.</p>
<h2>Then teach it to do this forever</h2>
<p>One-off wins are nice. But if you're going to do this kind of thing a lot, the next move is to codify the trick into a skill. So I followed up with:</p>
<blockquote>
<p>thank you.. that was brilliant.. now let's take this one step further.. spin up subagents to look through .obsidian and one to go online and look at obsidian documentation.. then write a guide for future agents to understand how to interact with obsidian programmatically to change settings via claude code in natural language rather than clicking around in the interface.. if this goes well, also create a skill for this.. go into planning mode first if you need to</p>
</blockquote>
<p>Two parallel subagents went digging: one cataloged <code>.obsidian/</code> file by file, the other scraped <code>help.obsidian.md</code>, the forum, and vetted GitHub examples. They reported back, and Claude shipped <code>~/.claude/skills/configuring-obsidian/SKILL.md</code>.</p>
<p><img src="pix/obsidian-skill-shipped.png" alt="Obsidian skill shipped" /></p>
<p>The skill now knows the safety rules (close Obsidian first; <code>workspace.json</code> and <code>graph.json</code> are off-limits — Obsidian rewrites them constantly), the file map of which JSON controls what, and the cookbook recipes: toggling booleans in <code>app.json</code>, changing theme and font in <code>appearance.json</code>, enabling or disabling plugins, overriding hotkeys with <code>&quot;Mod&quot;</code> instead of <code>&quot;Ctrl&quot;</code> for portability, and reloading without a restart via the Command Palette.</p>
<p>Next time I — or any future session — asks anything about Obsidian settings, the skill loads automatically and Claude already knows where to look.</p>
<p>So the real loop is:</p>
<ol>
<li>Ask Claude to do the thing.</li>
<li>Ask Claude to write down how it did the thing.</li>
<li>Never think about the thing again.</li>
</ol>
]]></content:encoded>
    </item>
    <item>
      <title>Dependency Hell: Why Software Breaks When Everything Works</title>
      <link>https://timbeach.com/a/dependency-hell/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/dependency-hell</guid>
      <pubDate>Mon, 06 Apr 2026 00:00:00 +0000</pubDate>
      <description></description>
      <content:encoded><![CDATA[<p><img src="pix/dependency_hell.png" alt="Dependency Hell" /></p>
<p>You changed nothing. You tested it yesterday. You watched it pass. And now, on deployment day, everything is on fire.</p>
<p>If you've spent any time building software, you've probably been dragged into a special kind of chaos that the industry has lovingly named <strong>dependency hell</strong>. It's the place where your code is fine, everyone else's code is fine, but the combination of all of it together is decidedly not fine.</p>
<p>Let's talk about what it is, why it keeps happening, and what — if anything — you can do about it.</p>
<h2>🧱 The Analogy</h2>
<p>Imagine you're building a house. You need bricks, and each brick requires a specific mortar. Fine — you pick the right mortar. But the mortar requires a specific sand, and the sand is only compatible with a certain type of foundation aggregate. The foundation aggregate was updated last week and now requires a thinner mortar. But your bricks crack with thin mortar.</p>
<p>Nobody changed your blueprint. Nobody touched your bricks. But the house won't stand because three levels deep in your supply chain, someone &quot;improved&quot; their sand.</p>
<p>That's dependency hell. Your software depends on other software, which depends on other software, and somewhere in that chain, something shifted in a way that breaks the thing you're building — even though you didn't change a line of code.</p>
<h2>🔥 The Taxonomy of Suffering</h2>
<p>Not all dependency hell is the same. It comes in distinct flavors, each with its own special brand of misery.</p>
<h3>The Diamond Dependency Problem</h3>
<p>This is the classic. Your project depends on Library A and Library B. Both A and B depend on Library C — but they each require a <em>different version</em> of C. You can't install both versions simultaneously, so you're stuck. Your dependency graph forms a diamond shape, and at the bottom of that diamond is a conflict with no clean resolution.</p>
<p>Your Project needs Lib A <em>and</em> Lib B. Lib A needs Lib C version 1. Lib B needs Lib C version 2. You can only install one version of Lib C. Deadlock.</p>
<p>In some ecosystems, this is an unsolvable puzzle. In others, the tooling can deduplicate or isolate — but it's always a source of pain.</p>
<h3>Transitive Dependency Sprawl</h3>
<p>You install one package. That package pulls in 12 dependencies. Those 12 pull in 80 more. Before you know it, your <code>node_modules</code> directory weighs more than the application itself, and you're relying on code written by hundreds of strangers, any one of whom might push a breaking change, abandon their project, or delete their package entirely.</p>
<p>The real problem isn't the count — it's that you didn't choose any of those transitive dependencies. You don't know what they do. You don't know who maintains them. But your software can't run without them.</p>
<h3>Circular Dependencies</h3>
<p>Package A depends on B. Package B depends on A. Now nothing can be built first because everything needs the other thing to already exist. It's a chicken-and-egg problem that confuses build systems, package managers, and humans alike.</p>
<p>Circular dependencies are usually a design smell — they signal that two packages should either be merged or restructured — but they crop up in large codebases with organic growth.</p>
<h3>System-Level Shared Library Hell</h3>
<p>This is where things get truly nasty, especially on Linux.</p>
<p>When you install a program on a Linux system, it typically links against shared libraries — <code>.so</code> files that live in <code>/usr/lib</code> or similar paths. Multiple programs share the same library to save memory and disk space. Beautiful in theory. In practice, it means that upgrading one library can break every program that depends on it.</p>
<p>On Windows, this was historically called <strong>DLL Hell</strong> — the same fundamental problem with <code>.dll</code> files. On Linux, it manifests when a system update pulls in a new version of <code>libssl</code>, <code>glibc</code>, or some other foundational library, and suddenly half your installed software segfaults or refuses to start.</p>
<p>Package managers like <code>apt</code> and <code>pacman</code> try to manage this with dependency metadata, but they can only protect you from conflicts they know about. If you've installed anything from source, compiled against a specific library version, or mixed repositories — you're on your own.</p>
<p>The ABI (Application Binary Interface) is the invisible contract here. Source code might be &quot;compatible,&quot; but if the compiled binary layout changes — struct sizes, function signatures at the machine level — everything breaks silently and catastrophically.</p>
<h3>The Vendoring Dilemma</h3>
<p>One natural response to shared dependency chaos is <strong>vendoring</strong> — bundling your own copy of every dependency directly into your project. This gives you total control. Nothing changes unless you change it.</p>
<p>The tradeoff? You're now responsible for updating everything yourself. Security patches don't flow downstream automatically. Your project bloats. And if everyone vendors everything, you end up with twelve different versions of OpenSSL running on the same machine, each with its own set of known vulnerabilities.</p>
<p>Vendoring trades one kind of hell for another. It's a valid choice, but it's not a free lunch.</p>
<h2>💀 War Stories</h2>
<p>Theory is nice. Let's talk about the times dependency hell actually set things on fire.</p>
<h3>&quot;It Worked Yesterday&quot; — A Laravel Deployment Nightmare</h3>
<p>I've lived through many of these wars, including this one. We had an application deployment that was tested and verified the day before launch. Everything passed. Every check was green. Ship it tomorrow.</p>
<p>Tomorrow came. The deployment broke.</p>
<p>What happened? Overnight, a transitive dependency in the Composer ecosystem had updated. Laravel's dependency constraints were strict enough to notice the change but not strict enough to prevent it from being pulled in. The package that resolved perfectly at 4 PM was unresolvable by 8 AM because something three levels deep had pushed a new minor version that conflicted with another constraint.</p>
<p>Nothing in our code changed. Nothing in Laravel's code changed. But the dependency graph that Composer had to solve was now different, and the solver couldn't find a valid resolution. Deployment day became debugging day.</p>
<p>This is the insidious nature of dependency hell — it can be <em>time-dependent</em>. The same <code>composer install</code> can produce different results on different days if you aren't locking your dependencies aggressively. And even when you do lock them, the moment you need to update anything, you're re-entering the negotiation.</p>
<h3><code>left-pad</code> and the Disappearing Package (npm, 2016)</h3>
<p>In March 2016, a developer named Azer Koçulu unpublished a package called <code>left-pad</code> from npm. It was 11 lines of code. It padded strings with spaces on the left side. Trivial functionality.</p>
<p>The problem was that thousands of packages depended on it, including heavy-hitters in the React ecosystem. When it vanished, builds broke worldwide. CI pipelines failed. Production deployments stalled. Thousands of developers scrambled to figure out why their code — which they hadn't touched — suddenly wouldn't build.</p>
<p><code>left-pad</code> exposed a deeper truth: when an ecosystem incentivizes tiny, single-purpose packages, the web of transitive dependencies becomes so vast that removing any single thread can unravel the whole thing. Your project didn't depend on <code>left-pad</code>. But your project depended on something that depended on something that depended on <code>left-pad</code>. And that was enough.</p>
<h3>Python's <code>pip</code> and the Resolver That Couldn't</h3>
<p>For years, <code>pip</code> didn't have a proper dependency resolver. It installed packages in order, and if two packages needed conflicting versions of a shared dependency, <code>pip</code> would simply install whichever one it encountered last — silently overwriting the other. Your install would &quot;succeed,&quot; but your application would crash at runtime because it had the wrong version of something.</p>
<p>In 2020, pip finally shipped a real resolver. The good news: it catches conflicts. The bad news: it catches conflicts. Upgrades that previously &quot;worked&quot; (by silently being broken) now fail loudly with resolution errors. The Python ecosystem is still working through the aftershocks.</p>
<h3>Linux Shared Libraries: The <code>glibc</code> Trap</h3>
<p>On Linux, <code>glibc</code> — the GNU C Library — is the foundation that almost everything is built on. It provides the basic system calls, memory allocation, string handling, and threading that virtually every compiled program relies on.</p>
<p>Upgrading <code>glibc</code> can break programs compiled against an older version. Downgrading it can break your entire system. It's the one dependency where &quot;just update it&quot; and &quot;just don't update it&quot; are both dangerous advice.</p>
<p>Rolling-release distributions like Arch (and its derivatives, including Artix and Aegix) feel this more acutely than point-release distros like Debian. When your entire system updates continuously, the window for ABI-breaking changes is always open. You gain cutting-edge software at the cost of living permanently on the frontier of compatibility.</p>
<h2>🤔 Why This Keeps Happening</h2>
<p>Dependency hell isn't a bug in any particular tool. It's an emergent property of how software is built.</p>
<h3>Semantic Versioning Is a Social Contract, Not a Technical Guarantee</h3>
<p>Semver says: bump the major version for breaking changes, the minor version for features, the patch version for fixes. In practice, people get it wrong constantly. A &quot;patch&quot; release introduces a subtle behavior change. A &quot;minor&quot; release deprecates something your code relies on. Semver only works if every maintainer in your entire dependency tree follows it perfectly, and they don't.</p>
<h3>Ecosystems Incentivize Small Packages</h3>
<p>npm's culture of micro-packages means your dependency tree is wide and shallow — lots of packages, each doing one tiny thing. Python's culture is more &quot;batteries included,&quot; leading to fewer but larger dependencies. Neither approach is immune. Wide trees have more points of failure; deep trees have more severe failures when they break.</p>
<h3>Nobody Owns the Whole Stack</h3>
<p>Your application sits on top of frameworks, which sit on top of libraries, which sit on top of system packages, which sit on top of a kernel. Each layer is maintained by different people with different priorities, release schedules, and opinions about backward compatibility. There's no central authority ensuring that the whole stack works together at any given point in time.</p>
<h3>Time Is a Dimension of Your Dependency Graph</h3>
<p>The same dependency resolution can produce different results on different days. Packages get published, yanked, deprecated. Registries have outages. Mirrors fall behind. Your build on Monday and your build on Friday might resolve to different dependency trees, even with the same input.</p>
<h2>🛠️ Mitigation Strategies</h2>
<p>You can't eliminate dependency hell, but you can build bunkers.</p>
<h3>Lock Your Dependencies</h3>
<p>Every modern package manager has a lockfile: <code>package-lock.json</code>, <code>Cargo.lock</code>, <code>poetry.lock</code>, <code>composer.lock</code>. <strong>Commit them.</strong> A lockfile records the exact versions that were resolved at a specific point in time. It turns your build from &quot;whatever resolves today&quot; into &quot;exactly what resolved when we last explicitly updated.&quot;</p>
<p>If I had to give one piece of advice from this entire article, it would be this: <strong>use lockfiles and treat them as first-class artifacts.</strong></p>
<h3>Pin Transitives When It Matters</h3>
<p>Sometimes the lockfile isn't enough. If you're deploying to production, consider pinning your transitive dependencies explicitly. Tools like <code>pip-compile</code> (Python), <code>npm shrinkwrap</code> (Node), and <code>cargo lock</code> (Rust) give you varying degrees of control over the full dependency tree.</p>
<h3>Reproducible Builds and Nix</h3>
<p>The most rigorous approach to dependency management is <strong>Nix</strong>. Nix treats every package — including its exact dependencies, build flags, and compiler version — as a unique, content-addressed entity. Two builds with the same inputs will always produce the same outputs. There is no shared mutable state.</p>
<p>Nix is powerful and philosophically sound. It's also a steep learning curve and a different way of thinking about your system. But if reproducibility is critical to you, nothing else comes close.</p>
<h3>Containers: The Blunt Instrument</h3>
<p>Docker and its kin solve dependency hell by side-stepping it entirely. Bundle everything — your app, your dependencies, your runtime, your system libraries — into a container image. Ship the whole thing. It works because it literally ships the machine.</p>
<p>The tradeoff is that you're vendoring at the OS level. Every container image carries its own copies of system libraries, and keeping those updated for security is now your problem. You've traded system-level dependency conflicts for image-level maintenance burden.</p>
<p>It works. It's pragmatic. It's not elegant.</p>
<h3>Static Linking</h3>
<p>Instead of relying on shared libraries at runtime, you can statically link everything at compile time. The resulting binary contains all its dependencies and runs anywhere (on the same OS/architecture) without caring what's installed on the system.</p>
<p>Go does this by default, and it's one of the reasons Go binaries are praised for their deployment simplicity. Rust makes it straightforward with <code>musl</code> targets. C and C++ can do it, but it's more manual and sometimes legally complex (LGPL licensing requires dynamic linking in certain cases).</p>
<p>The cost: larger binaries, no shared security updates across programs, and potential license headaches. But for deployment reliability, it's hard to beat.</p>
<h2>🪢 The Fundamental Tension</h2>
<p>At its core, dependency hell exists because of an unresolvable tension in software engineering: <strong>code reuse and independence are at odds with each other.</strong></p>
<p>Every dependency you take on is a bet that someone else's code will continue to work the way you need it to, for as long as you need it to, without requiring changes on your end. Sometimes that bet pays off for years. Sometimes it blows up overnight.</p>
<p>The industry keeps building better tools — smarter resolvers, content-addressed stores, hermetic builds — and they genuinely help. But the fundamental problem won't go away because it's not a tooling problem. It's a coordination problem among millions of independent developers who don't know each other, don't share priorities, and can't predict the future.</p>
<p>The best you can do is understand the landscape, pick your tradeoffs deliberately, and always — <em>always</em> — check that lockfile.</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Write a Custom Claude Code Skill</title>
      <link>https://timbeach.com/a/custom-claude-skills/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/custom-claude-skills</guid>
      <pubDate>Thu, 19 Mar 2026 00:00:00 +0000</pubDate>
      <description></description>
      <content:encoded><![CDATA[<p>Claude Code can do a lot out of the box, but it doesn't know your workflows. It doesn't know that publishing an article to your website means copying a markdown file to a specific directory, adding an entry to a JSON registry, previewing locally, rsyncing to a VPS, and committing to git. Every time you ask, it has to explore your repo, discover the structure, and figure it out from scratch.</p>
<p>Skills fix this. A skill is a markdown file that teaches Claude a procedure it can follow with the tools it already has. No plugins, no scripts, no MCP servers — just instructions.</p>
<p><img src="pix/claude-custom-skills.jpg" alt="Custom Claude Skills" /></p>
<h2>Where Skills Live</h2>
<p>Claude Code discovers skills from two locations:</p>
<ul>
<li><strong>Global (personal):</strong> <code>~/.claude/skills/&lt;skill-name&gt;/SKILL.md</code> — available in every session</li>
<li><strong>Project-scoped:</strong> <code>.claude/skills/&lt;skill-name&gt;/SKILL.md</code> — available only in that project</li>
</ul>
<p>Each skill is a directory containing a <code>SKILL.md</code> file. The directory name becomes the slash command. So <code>~/.claude/skills/publish-article/SKILL.md</code> gives you <code>/publish-article</code>.</p>
<pre><code>~/.claude/skills/
  publish-article/
    SKILL.md              # Required entrypoint
    template.md           # Optional supporting files
</code></pre>
<h2>Anatomy of a SKILL.md</h2>
<p>A skill file has two parts: YAML frontmatter for discovery, and markdown content for instructions.</p>
<h3>Frontmatter</h3>
<pre><code class="language-yaml">---
name: publish-article
description: Use when publishing a markdown article to timbeach.com, adding content to the personal website, or when the user says &quot;publish article&quot;
---
</code></pre>
<p>Two fields:</p>
<ul>
<li><strong>name</strong> — letters, numbers, hyphens only. This is what shows up in the skills list.</li>
<li><strong>description</strong> — tells Claude <em>when</em> to use this skill. Start with &quot;Use when...&quot; and describe triggering conditions. Don't summarize what the skill does — just describe when it applies.</li>
</ul>
<p>The description matters more than you'd think. Claude reads it to decide whether to load your skill for a given task. If the description says &quot;Use when publishing articles&quot; and you say &quot;add this post to my website,&quot; Claude connects the dots.</p>
<h3>Content</h3>
<p>The rest of the file is the procedure Claude follows. Write it like you're explaining the workflow to a competent colleague who's never seen your project before. Be specific about paths, file formats, and the order of operations.</p>
<h2>A Real Example: publish-article</h2>
<p>Here's a skill I built for publishing markdown articles to my personal website. The site is a vanilla SPA — no build step, no framework. Articles are markdown files in an <code>articles/</code> directory with metadata in a single <code>articles.json</code> file. Deployment is an rsync to a VPS.</p>
<p>Without this skill, Claude would need to explore the repo every time: read the index.html to understand the rendering pipeline, examine the JSON format, figure out where images go, discover the deploy script. With the skill, it just follows the recipe.</p>
<h3>The Full Skill</h3>
<pre><code class="language-yaml">---
name: publish-article
description: Use when publishing a markdown article to timbeach.com, adding content to the personal website, or when the user says &quot;publish article&quot; or references timbeach.com articles
---
</code></pre>
<pre><code class="language-markdown"># Publish Article to timbeach.com

Publish a markdown article to timbeach.com from any working directory.
Accepts a file path or inline content.

**Repo:** `~/code/PROJECTS/VULTR_0/sites/timbeach.com`

## Procedure

### 1. Acquire Content

- **File path provided:** Read and validate it has at least one # heading.
- **No file path:** Ask the user for content. Write it to a temp file.

### 2. Handle Images

Scan for ![alt](path) references in the markdown.

For each image found:
1. Resolve path relative to the source file's directory
2. Check if file exists — warn and skip if not
3. Check for name collision in pix/ — ask user: overwrite, rename, or skip
4. Copy image to pix/
5. Rewrite the markdown path to pix/filename.ext

Then ask: &quot;Is there an additional image you'd like to include?&quot;

### 3. Propose Metadata

Infer all fields and present as one block for approval:

  &quot;kebab-case-title.md&quot;: {
    &quot;title&quot;: &quot;Inferred from first heading&quot;,
    &quot;date&quot;: &quot;2026-03-18&quot;,
    &quot;tags&quot;: [&quot;suggested&quot;, &quot;from&quot;, &quot;content&quot;],
    &quot;emoji&quot;: &quot;suggested-emoji&quot;
  }

User approves or tweaks in one shot.

### 4. Write Files

1. Copy markdown (with rewritten image paths) to articles/{filename}.md
2. Update articles/articles.json:
   - Read and parse as JSON
   - Verify filename key doesn't already exist
   - Add new entry
   - Write back with 2-space indentation

### 5. Local Preview

Start python3 -m http.server 8000 from the repo directory.
Tell the user to preview. Wait for approval.

### 6. Deploy

Run ./deploy.sh from the repo root. Report output.
If deploy fails, don't proceed to git commit.

### 7. Git Commit + Push

Stage only the specific changed files. Commit and push.
</code></pre>
<h3>Why This Works</h3>
<p>Notice what the skill does and doesn't do:</p>
<p><strong>It gives Claude facts it can't derive quickly.</strong> The repo path, the JSON schema, the image path convention, the deploy script's CWD requirement — these are things Claude would have to discover by reading the codebase. The skill front-loads that knowledge.</p>
<p><strong>It sequences the workflow.</strong> Preview before deploy. Deploy before commit. Don't commit if deploy fails. This ordering encodes your actual process, not something Claude would guess.</p>
<p><strong>It specifies interaction points.</strong> Propose metadata and wait. Preview and wait. These aren't things Claude would naturally pause for — it would just barrel through. The skill makes the human checkpoints explicit.</p>
<p><strong>It doesn't over-specify.</strong> The skill doesn't tell Claude how to read a file or how to run a bash command. It already knows how to do that. The skill only teaches what's specific to <em>your</em> workflow.</p>
<h2>Writing Your Own</h2>
<p>Pick a workflow you repeat. Something where you find yourself explaining the same sequence of steps to Claude across sessions. That's a skill waiting to be written.</p>
<h3>Step 1: Map the procedure</h3>
<p>Write out every step you'd take manually. Include the file paths, the exact commands, the order. Don't abstract — be concrete. If you <code>cd</code> to a specific directory before running a script because the script uses <code>$PWD</code>, write that down.</p>
<h3>Step 2: Identify what Claude can't infer</h3>
<p>Separate the steps into two buckets:</p>
<ul>
<li>Things Claude could figure out by reading your codebase (how your JSON is structured, what framework you use)</li>
<li>Things Claude can't easily derive (your preferred workflow order, which fields to propose for approval, where to deploy)</li>
</ul>
<p>Your skill should focus on the second bucket. Include enough of the first bucket to save Claude the exploration time, but don't document your entire codebase.</p>
<h3>Step 3: Define the interaction points</h3>
<p>Where should Claude pause and ask you? Metadata approval, preview confirmation, deploy authorization — these are places where your judgment matters and Claude shouldn't just proceed.</p>
<h3>Step 4: Write the SKILL.md</h3>
<p>Put the frontmatter at the top with a good description. Write the procedure as numbered steps. Be specific about paths and commands. Include error handling for things that actually go wrong (port already in use, file already exists, deploy fails).</p>
<h3>Step 5: Test it</h3>
<p>Start a new Claude Code session. Run <code>/your-skill-name</code> and see if Claude follows the procedure correctly. If it misses a step or makes wrong assumptions, update the skill and restart.</p>
<h2>Tips</h2>
<p><strong>Keep it under 500 words if you can.</strong> The skill gets loaded into Claude's context. Long skills burn tokens. Write what's necessary, skip what's obvious.</p>
<p><strong>Description is for <em>when</em>, not <em>what</em>.</strong> &quot;Use when deploying to production after tests pass&quot; is better than &quot;Runs the deploy pipeline with blue-green switching.&quot; Claude needs to know when to reach for the skill, not what it does — that's what the content is for.</p>
<p><strong>Hardcode paths.</strong> Skills are your personal tools. Don't parameterize things that never change. If your repo is always at <code>~/code/myproject</code>, write that path directly.</p>
<p><strong>Include error handling for real failures.</strong> Port conflicts, existing files, failed deploys — these actually happen. &quot;Parse error in JSON? Warn and stop&quot; is more useful than pretending everything always works.</p>
<p><strong>Global vs. project-scoped.</strong> If the skill only makes sense in one repo, put it in <code>.claude/skills/</code> in that repo. If you'd use it from anywhere (like publishing articles from whatever directory you're working in), put it in <code>~/.claude/skills/</code>.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Software Delivery and Deployment SOP</title>
      <link>https://timbeach.com/a/software-delivery-sop/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/software-delivery-sop</guid>
      <pubDate>Wed, 18 Mar 2026 00:00:00 +0000</pubDate>
      <description></description>
      <content:encoded><![CDATA[<p><em>Co-authored with <a href="https://masonborchard.com/">Mason U Borchard</a></em></p>
<p>A practical standard operating procedure for teams managing branching, releases, SQL changes, and deployments in a corporate software environment.</p>
<p><img src="pix/team-software-sop.png" alt="Software Delivery SOP" /></p>
<hr />
<h2>Philosophy: Every Feature is a &quot;Gift&quot;</h2>
<p>Sometimes changing the language can change our perception. Imagine if a feature branch was called a gift. This idea comes from <a href="https://erniegray.com">Ernie Gray</a>.</p>
<p>A common challenge in software development is the gravity of the development environment. Engineers spend hours completing code that works locally, submit a PR, check that it works on the dev environment, and then feel the rest of the process is beyond their control.</p>
<p>Escaping the gravity of the development environment into outer orbits requires more energy.</p>
<p>A great team ensures their code is a polished, deployable package — a gift to the team working together toward a great release. These SOPs define what &quot;polished and deployable&quot; looks like.</p>
<hr />
<h2>1. Story/Feature-Level Definition of Done</h2>
<p>Quality parts make quality systems. A consistent definition of done at the story level prevents incomplete or undocumented code from entering the pipeline.</p>
<p>A story is not done until <strong>all</strong> of the following are true:</p>
<ul>
<li>[ ] <strong>Code Review:</strong> Pull request is reviewed and approved by a teammate</li>
<li>[ ] <strong>Static Analysis:</strong> Developer has reviewed the scan and addressed all issues</li>
<li>[ ] <strong>SQL Archival:</strong> All required SQL is committed to the release folder in the repository and linked in the Release Manifest (see <a href="#5-sql-management-protocol">Section 5</a>)</li>
<li>[ ] <strong>Ticket Linking:</strong> The ticket contains a comment with the direct URL to any SQL files</li>
<li>[ ] <strong>Feature Toggle:</strong> If the feature is high-risk, a configuration flag is implemented for instant deactivation</li>
<li>[ ] <strong>Test Case:</strong> A test case is drafted in comments or the test suite, including named test users in the QA environment</li>
<li>[ ] <strong>Release Manifest:</strong> The story/feature is added to the Release Manifest</li>
<li>[ ] <strong>Communication:</strong> All decisions and context are documented on the ticket — not in chat threads or verbal conversations</li>
</ul>
<hr />
<h2>2. Source Control and Branching Strategy</h2>
<h3>2.1 Multi-Tier Branching Model</h3>
<p>Teams should follow a multi-tier branching model to isolate development, testing, and release preparation.</p>
<pre><code>feature/PROJ-XXXX ──► development ──► integration ──► release/REL-XXXX ──► main
       │                  │                │                │                │
  Individual work     DEV env          QA testing      CI/CD builds     Always = PROD
                                       on QA env       &amp; deploys to
                                                       PROD (pristine)
</code></pre>
<table>
<thead>
<tr>
<th>Branch</th>
<th>Purpose</th>
<th>Deploy Target</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>feature/&lt;dev&gt;/PROJ-XXXX-desc</code></td>
<td>Individual work</td>
<td>Local / DEV</td>
</tr>
<tr>
<td><code>development</code></td>
<td>Automated builds, early integration testing</td>
<td>DEV</td>
</tr>
<tr>
<td><code>integration</code></td>
<td>Formal QA testing of combined features</td>
<td>QA</td>
</tr>
<tr>
<td><code>release/REL-XXXX</code></td>
<td>Pristine release candidate — only QA-approved code. <strong>CI/CD builds and deploys artifacts from this branch.</strong></td>
<td>PROD (+ staging/perf)</td>
</tr>
<tr>
<td><code>main</code></td>
<td>Stable, production-ready code. Source of truth. Always reflects PROD.</td>
<td>—</td>
</tr>
</tbody>
</table>
<blockquote>
<p><strong>Important:</strong> Production artifacts are <strong>only</strong> built and deployed from release branches. The <code>development</code> branch deploys to DEV for early testing but is <strong>not</strong> a source for production artifacts.</p>
</blockquote>
<h3>2.2 Branch Naming</h3>
<p>All branches <strong>must</strong> include the ticket identifier from your project tracker.</p>
<p><strong>Feature branches:</strong> <code>feature/&lt;developer&gt;/PROJ-XXXX-short-description</code>
<strong>Release branches:</strong> <code>release/REL-XXXX</code> (sequential numbering)</p>
<h3>2.3 Creating Branches</h3>
<p>All new branches <strong>must</strong> be created from <code>main</code>.</p>
<pre><code class="language-bash">git checkout main
git pull origin main
git checkout -b feature/&lt;developer&gt;/PROJ-XXXX-short-description
</code></pre>
<p><strong>Why:</strong> Creating branches from <code>main</code> ensures that a release branch can be rebuilt easily from the sum of the individual branches included in the release.</p>
<h3>2.4 Release Lifecycle</h3>
<ol>
<li>A new release branch is created from <code>main</code> using the release naming convention</li>
<li>Feature branches and bug fixes for that release are merged into the release branch via pull requests</li>
<li>CI/CD builds and deploys artifacts from the release branch</li>
<li>QA testing is performed against the deployed build; fixes go back into the same release branch</li>
<li>Once the release passes QA, the release branch is merged into <code>main</code></li>
<li>A new release branch is created from <code>main</code> for the next cycle</li>
</ol>
<p><strong>Creating a new release branch:</strong></p>
<pre><code class="language-bash">git checkout main
git pull origin main
git checkout -b release/REL-XXXX
git push -u origin release/REL-XXXX
</code></pre>
<p><strong>Merging a completed release back to main:</strong></p>
<pre><code class="language-bash">git checkout main
git pull origin main
git merge --no-ff release/REL-XXXX
git push origin main
</code></pre>
<blockquote>
<p><strong>Tip:</strong> Use <code>--no-ff</code> (no fast-forward) merges to preserve release branch history in the git log. This makes it easy to trace which commits belonged to which release.</p>
</blockquote>
<h3>2.5 Branch Ownership</h3>
<p>Branch management is <strong>owned by the developer</strong>. Each developer is responsible for:</p>
<ul>
<li>Creating branches from <code>main</code></li>
<li>Keeping branches up to date</li>
<li>Resolving merge conflicts</li>
<li>Cleaning up stale branches after merge</li>
</ul>
<h3>2.6 Do's and Don'ts</h3>
<table>
<thead>
<tr>
<th>Do</th>
<th>Don't</th>
</tr>
</thead>
<tbody>
<tr>
<td>Branch from <code>main</code></td>
<td>Commit directly to <code>main</code> — all changes reach <code>main</code> through a release branch merge</td>
</tr>
<tr>
<td>Follow naming conventions exactly</td>
<td>Build or deploy production artifacts from <code>development</code> — it is for integration testing only</td>
</tr>
<tr>
<td>Complete the current release merge into <code>main</code> before creating the next release branch</td>
<td>Run parallel release branches — only one should be active at a time</td>
</tr>
<tr>
<td>Use <code>--no-ff</code> merges when merging release branches back to <code>main</code></td>
<td>Force push to <code>main</code></td>
</tr>
<tr>
<td>Use pull requests for all merges to shared branches</td>
<td>Merge unapproved features into the release branch</td>
</tr>
</tbody>
</table>
<hr />
<h2>3. Pull Requests</h2>
<h3>3.1 PRs to Development</h3>
<ul>
<li>Developers can PR to the <code>development</code> branch at will</li>
<li>Merging to <code>development</code> triggers automated build and deploy to the DEV environment</li>
<li>PRs to <code>development</code> do not require approval but are still required (no direct pushes)</li>
</ul>
<h3>3.2 PRs to Integration</h3>
<ul>
<li>When a feature is ready for formal QA, the developer merges it into the <code>integration</code> branch via PR</li>
<li>The <code>integration</code> branch is what the QA team deploys to the QA environment</li>
<li>PRs to <code>integration</code> require review</li>
</ul>
<h3>3.3 PRs to Release</h3>
<ul>
<li>Only features <strong>fully signed off by QA</strong> in the integration branch are merged into the release branch</li>
<li>The release branch is cut from <code>main</code> and must remain pristine — no rejected or unapproved code</li>
<li>PRs to release branches require review and approval</li>
</ul>
<h3>3.4 General PR Guidelines</h3>
<ul>
<li>PR title should include the ticket identifier</li>
<li>PR description should summarize what changed and why</li>
<li>Link the PR to the relevant ticket</li>
</ul>
<hr />
<h2>4. The Release Manifest</h2>
<p>A wonderful side-effect of the agentic AI trend is context as code in natural language. Scientific processes are good at &quot;breaking things into pieces&quot; at the expense of a holistic context. Version control and project trackers tend to atomize and disarticulate. Context is easy to lose sight of.</p>
<p>The Release Manifest is a <strong>living document</strong> that provides a collaborative, holistic, human-readable context of the work candidates for a given release. A human (or agent) should be able to understand intent and build your software using this document.</p>
<h3>4.1 Lifecycle</h3>
<ol>
<li>At the outset of a sprint (or following a release), a Release Manifest is created and cross-linked with the release ticket</li>
<li>Deferred features from the previous manifest are copied forward</li>
<li>The document is updated incrementally as features emerge from the sprint</li>
<li>At standup, the team briefly reviews the Release Manifest</li>
<li>At release assembly time, all features are either <strong>Approved</strong> or <strong>Deferred</strong>, and contents are transposed into the release ticket</li>
</ol>
<p><strong>Important:</strong> Release tickets should <strong>not</strong> be cloned from the previous deployment. Use a clean template to avoid stale information.</p>
<h3>4.2 Manifest Sections</h3>
<table>
<thead>
<tr>
<th>Section</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Proposed</strong></td>
<td>Code complete and merged to integration branch</td>
</tr>
<tr>
<td><strong>Approved</strong></td>
<td>Approved by QA, static analysis reviewed, merged to release branch</td>
</tr>
<tr>
<td><strong>Deferred</strong></td>
<td>Not ready yet — wait until next release</td>
</tr>
</tbody>
</table>
<h3>4.3 For Each Feature, Include:</h3>
<ul>
<li>A meaningful title with the ticket key (e.g., &quot;PROJ-1144 - Temperature Configuration&quot;)</li>
<li>A short context explaining:
<ul>
<li>What it is</li>
<li>How it works</li>
<li>How it's deployed (including any infrastructure components)</li>
</ul>
</li>
<li>Links to:
<ul>
<li>The tracker tickets</li>
<li>The feature branch</li>
<li>Associated SQL files</li>
</ul>
</li>
</ul>
<hr />
<h2>5. SQL Management Protocol</h2>
<p>Many organizations formally request all SQL processing via DBA tickets above the development environment. Well-organized SQL etiquette reinforces good habits and gives the acting DBA clear execution paths.</p>
<p>All SQL changes are version-controlled in the repository. The SQL folder serves as the <strong>source of truth</strong>, organized by release ticket ID.</p>
<h3>5.1 Directory Structure</h3>
<pre><code>/releases/REL-XXXX/
├── 001_PROJ-101_DDL_CreateUserTable.sql
├── 002_PROJ-101_DML_InsertDefaults.sql
├── 003_PROJ-205_DDL_AddPrefsColumn.sql
├── rollback/
│   ├── 001_PROJ-101_UNDO_DropUserTable.sql
│   ├── 002_PROJ-101_UNDO_DeleteDefaults.sql
│   └── 003_PROJ-205_UNDO_RemovePrefsColumn.sql
└── deferred/
    └── (scripts moved here if feature is rejected by QA)
</code></pre>
<h3>5.2 Naming Convention</h3>
<p><strong>Forward scripts:</strong> <code>SequenceNumber_TicketCode_Action_Description.sql</code>
<strong>Rollback scripts:</strong> <code>SequenceNumber_TicketCode_UNDO_Description.sql</code></p>
<h3>5.3 Each SQL Script Must Include</h3>
<ul>
<li>The <strong>primary DDL/DML</strong></li>
<li>A <strong>verification query</strong> (e.g., <code>SELECT count(*)</code>) to confirm success</li>
<li>A corresponding <strong>rollback script</strong></li>
<li><strong>Clear comments</strong> explaining what the script does</li>
</ul>
<h3>5.4 Ticket Linking</h3>
<p>The ticket <strong>must</strong> contain a comment with the direct URL to the SQL files in the repository.</p>
<p>A feature is <strong>not considered complete</strong> if scripts only exist in a local environment or the development database.</p>
<hr />
<h2>6. Deployment Strategy</h2>
<h3>6.1 Developer Ownership</h3>
<p>Deployment strategy is <strong>owned by the developer</strong>. Each developer is responsible for:</p>
<ul>
<li>Linking their story to the release ticket used for tracking the deployment</li>
<li>Adding their feature to the Release Manifest</li>
<li>Stories are <strong>not linked to the release ticket until the release branch is completed</strong></li>
</ul>
<h3>6.2 Release Checklist</h3>
<p>Before submitting the release for deployment approval:</p>
<ul>
<li>[ ] <strong>Build Artifact:</strong> Specific CI/CD artifact ID is listed (built from the release branch)</li>
<li>[ ] <strong>Branch Integrity:</strong> The release branch contains <strong>only</strong> the features listed in the release ticket</li>
<li>[ ] <strong>DBA Execution Order:</strong> A table lists every SQL script in exact order of execution</li>
<li>[ ] <strong>QA Sign-off:</strong> Formal statement or checkbox from QA confirming the release candidate is stable</li>
<li>[ ] <strong>Pre-Deployment Steps:</strong> Documented</li>
<li>[ ] <strong>Post-Deployment Steps:</strong> Documented</li>
<li>[ ] <strong>Static Analysis:</strong> Release branch is scanned and results are linked</li>
</ul>
<hr />
<h2>7. Handling Rejections and Rollbacks</h2>
<h3>7.1 Rejection Protocol</h3>
<p>If a feature <strong>fails QA</strong> in the integration branch:</p>
<ol>
<li>Perform a <code>git revert</code> on the merge commit (preserves branch history)</li>
<li>Move corresponding SQL scripts to the <code>/deferred/</code> subfolder to prevent DBA execution</li>
<li>Update the Release Manifest — move the feature to <strong>Deferred</strong></li>
</ol>
<h3>7.2 Rollback Protocol</h3>
<p>Every deployment plan must include a <strong>&quot;Point of No Return&quot;</strong> assessment.</p>
<p>If a failure occurs post-deployment:</p>
<ol>
<li>Operations redeploys the previous stable artifact ID</li>
<li>DBA executes scripts in the <code>/rollback/</code> folder in <strong>reverse sequence number order</strong></li>
</ol>
<p>This restores the environment to its exact previous state without guesswork.</p>
<hr />
<h2>8. Responsibilities and Timing</h2>
<table>
<thead>
<tr>
<th>Action</th>
<th>Responsible Party</th>
<th>Timing</th>
</tr>
</thead>
<tbody>
<tr>
<td>Commit SQL + rollback scripts</td>
<td>Developer</td>
<td>During feature development</td>
</tr>
<tr>
<td>Update Release Manifest</td>
<td>Developer</td>
<td>As features are completed</td>
</tr>
<tr>
<td>Update release ticket</td>
<td>Developer</td>
<td>Upon merge to release candidate</td>
</tr>
<tr>
<td>Verify artifact ID and scripts</td>
<td>Lead / Scrum Master</td>
<td>24 hours before submission</td>
</tr>
<tr>
<td>Execute deployment and SQL</td>
<td>Operations / DBA</td>
<td>Scheduled release window</td>
</tr>
</tbody>
</table>
<hr />
<h2>Quick Reference</h2>
<table>
<thead>
<tr>
<th>What</th>
<th>Rule</th>
</tr>
</thead>
<tbody>
<tr>
<td>Branch source</td>
<td>Always branch from <code>main</code></td>
</tr>
<tr>
<td>Branch naming</td>
<td>Must include project ticket ID</td>
</tr>
<tr>
<td>Post-release</td>
<td>Merge release branch back to <code>main</code> with <code>--no-ff</code></td>
</tr>
<tr>
<td>Branching model</td>
<td><code>feature</code> → <code>development</code> → <code>integration</code> → <code>release</code> → <code>main</code></td>
</tr>
<tr>
<td>Parallel releases</td>
<td><strong>No</strong> — only one active release branch at a time</td>
</tr>
<tr>
<td>Direct commits to main</td>
<td><strong>Never</strong> — all changes reach <code>main</code> through release branch merge</td>
</tr>
<tr>
<td>Production artifacts</td>
<td>Built <strong>only</strong> from release branches</td>
</tr>
<tr>
<td>PRs to development</td>
<td>Required, no approval needed</td>
</tr>
<tr>
<td>PRs to integration</td>
<td>Required, reviewed — this is what QA tests</td>
</tr>
<tr>
<td>PRs to release</td>
<td>Required, approval needed — only QA-approved code</td>
</tr>
<tr>
<td>SQL changes</td>
<td>In repository <code>/releases/REL-XXXX/</code> with rollback scripts</td>
</tr>
<tr>
<td>Release Manifest</td>
<td>Living document, updated by each developer, reviewed at standup</td>
</tr>
<tr>
<td>Release tickets</td>
<td>Fresh template, not cloned — assembled from Release Manifest</td>
</tr>
<tr>
<td>Definition of Done</td>
<td>Code review + static analysis + SQL archived + test case + manifest updated</td>
</tr>
<tr>
<td>Communication</td>
<td>On the ticket</td>
</tr>
<tr>
<td>Branch management</td>
<td>Developer-owned</td>
</tr>
<tr>
<td>Deployment strategy</td>
<td>Developer-owned</td>
</tr>
</tbody>
</table>
]]></content:encoded>
    </item>
    <item>
      <title>Claude Code Agent Teams: Put Your AI Coworkers in tmux Panes</title>
      <link>https://timbeach.com/a/claude-code-agent-teams/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/claude-code-agent-teams</guid>
      <pubDate>Sat, 21 Feb 2026 00:00:00 +0000</pubDate>
      <description></description>
      <content:encoded><![CDATA[<p><img src="../pix/agent-teams-diagram.png" alt="Agent Teams" /></p>
<p>You're staring at a feature that touches the API, the frontend, and the test suite. Three separate concerns, three separate contexts, and one of you. You could work through them sequentially — endpoint first, then component, then tests — context-switching each time, holding the whole architecture in your head at once. Or you could do what any reasonable engineering manager would do: delegate. Tell three specialists to work in parallel, coordinate through a shared task list, and synthesize the results when they're done.</p>
<p>Claude Code agent teams let you do exactly that. You spawn multiple Claude instances — each in its own tmux pane, each with its own context window, each working on a discrete piece of the problem. They message each other, share a task board, and report back to you. It's pair programming scaled sideways.</p>
<p>This guide walks you through setup, first launch, architecture, practical patterns, and the safety model. By the end, you'll have a one-word alias that turns a single Claude session into a coordinated team.</p>
<h2>Prerequisites</h2>
<p>You need three things:</p>
<ol>
<li><strong>Claude Code</strong> installed and working (<code>claude</code> command available in your shell)</li>
<li><strong>tmux</strong> installed (<code>tmux -V</code> to check — any recent version works)</li>
<li><strong>Two settings</strong> in your Claude configuration file</li>
</ol>
<p>Add the following to <code>~/.claude/settings.json</code> (create the file if it doesn't exist):</p>
<pre><code class="language-json">{
  &quot;env&quot;: {
    &quot;CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS&quot;: &quot;1&quot;
  },
  &quot;skipDangerousModePermissionPrompt&quot;: true
}
</code></pre>
<p>If the file already exists with other settings, merge these in. The <code>env</code> block enables the experimental teams feature. The <code>skipDangerousModePermissionPrompt</code> setting suppresses the confirmation dialog that appears each time you launch Claude with <code>--dangerously-skip-permissions</code> — without it, you'd have to click through a warning on every team session start. We'll discuss the safety implications of that flag at the end.</p>
<h2>The Alias</h2>
<p>The full launch command is verbose. Let's fix that. Add this alias to your shell configuration (e.g., <code>~/.bashrc</code>, <code>~/.zshrc</code>, or wherever you keep aliases):</p>
<pre><code class="language-bash">alias teamz=&quot;claude --dangerously-skip-permissions --teammate-mode tmux&quot;
</code></pre>
<p>Two flags, each doing something specific:</p>
<ul>
<li><strong><code>--dangerously-skip-permissions</code></strong> — bypasses all permission prompts. Teammates inherit this, which means they can run commands, edit files, and take actions without asking you first. This is what makes autonomous parallel work possible.</li>
<li><strong><code>--teammate-mode tmux</code></strong> — tells Claude to spawn each teammate as a separate process in its own tmux pane, rather than running them all in a single process.</li>
</ul>
<p>Reload your shell config (<code>source ~/.bashrc</code> or open a new terminal), and you're ready.</p>
<h2>Quick Start</h2>
<h3>1. Get into tmux</h3>
<p>Teammates spawn as tmux panes, so you need to be inside a tmux session first:</p>
<pre><code class="language-bash">tmux new -s work
</code></pre>
<p>Then navigate to your project:</p>
<pre><code class="language-bash">cd ~/code/my-project
teamz
</code></pre>
<blockquote>
<p><strong>What if you're not in tmux?</strong> Claude falls back to in-process mode — all teammates run inside your single terminal. You can cycle through them with <code>Shift+Down</code> and toggle the task list with <code>Ctrl+T</code>. It works, but you lose the visual parallel layout that makes teams powerful.</p>
</blockquote>
<h3>2. Describe what you want</h3>
<p>Once Claude is running, just tell it what you need in plain language:</p>
<pre><code>Create an agent team with 3 teammates:
- backend-dev: implement the REST API endpoints
- frontend-dev: build the React components
- tester: write integration tests for both

Have them coordinate through the task list. Require plan approval before implementation.
</code></pre>
<p>Claude — now acting as team lead — will:</p>
<ol>
<li><strong>Create the team</strong> with a config file at <code>~/.claude/teams/{team-name}/config.json</code></li>
<li><strong>Create a shared task list</strong> at <code>~/.claude/tasks/{team-name}/</code></li>
<li><strong>Spawn each teammate</strong> in its own tmux pane</li>
<li><strong>Assign initial tasks</strong> and begin coordinating</li>
</ol>
<p>Within seconds, your terminal splits into panes. Each teammate starts working.</p>
<h3>3. Watch, navigate, intervene</h3>
<p>Standard tmux navigation applies:</p>
<table>
<thead>
<tr>
<th>Action</th>
<th>Keys</th>
</tr>
</thead>
<tbody>
<tr>
<td>Move between panes</td>
<td><code>Ctrl+B</code>, then arrow keys</td>
</tr>
<tr>
<td>Zoom one pane full-screen</td>
<td><code>Ctrl+B</code>, then <code>z</code> (toggle)</td>
</tr>
<tr>
<td>Resize panes</td>
<td><code>Ctrl+B</code>, then <code>Alt+arrow</code></td>
</tr>
<tr>
<td>Click into a pane</td>
<td>Just click (if mouse mode is on)</td>
</tr>
</tbody>
</table>
<p>You can read any teammate's output, and if you click into their pane, you can type messages directly to them. The team lead pane (your original session) is where you issue high-level instructions.</p>
<h2>How It Works</h2>
<h3>Architecture</h3>
<pre><code>Team Lead (your main Claude session)
  ├── Teammate 1 (tmux pane) ──┐
  ├── Teammate 2 (tmux pane) ──┼── Shared Task List (~/.claude/tasks/)
  └── Teammate 3 (tmux pane) ──┘
              ↕ messaging ↕
</code></pre>
<p>Four moving parts:</p>
<ul>
<li><strong>Team lead</strong> — your original Claude session. It creates the team, defines tasks, spawns teammates, and synthesizes results. This is the only session you interact with directly (unless you click into a teammate's pane).</li>
<li><strong>Teammates</strong> — independent Claude processes, each with its own context window. They don't share memory with the lead or with each other — they communicate through messages and the task list.</li>
<li><strong>Task list</strong> — JSON files on disk at <code>~/.claude/tasks/{team-name}/</code>. Every agent can read and write to it. Tasks have statuses (<code>pending</code>, <code>in_progress</code>, <code>completed</code>), owners, dependencies, and descriptions. This is the coordination backbone.</li>
<li><strong>Messaging</strong> — agents send direct messages to each other by name. No polling, no shared state beyond the task list. The lead gets notified when teammates finish tasks or need help.</li>
</ul>
<h3>What teammates inherit (and what they don't)</h3>
<p>Each teammate automatically receives:</p>
<ul>
<li>Your project's <code>CLAUDE.md</code> instructions</li>
<li>Configured MCP servers</li>
<li>Available skills and plugins</li>
<li>The spawn prompt from the lead (their specific assignment)</li>
</ul>
<p>What they do <strong>not</strong> get: the lead's conversation history. If context matters for a task, the lead needs to include it in the spawn prompt or in a message. This is by design — it keeps each teammate's context window focused on their specific job rather than polluted with unrelated conversation.</p>
<h2>Common Patterns</h2>
<h3>Parallel feature development</h3>
<p>The most natural use case. You have a feature that spans multiple concerns:</p>
<pre><code>Build the notification system:
- API teammate: design the notification service and REST endpoints
- UI teammate: build the notification bell component and dropdown
- DB teammate: create the migration and notification model

Have them agree on the notification schema before implementing.
</code></pre>
<p>The key phrase is &quot;agree on the schema before implementing.&quot; Teammates can message each other directly — the lead doesn't have to relay everything. The DB teammate can share the schema with the API and UI teammates, and they can coordinate without you in the loop.</p>
<h3>Parallel debugging</h3>
<p>Four eyes are better than two. Twenty are better still:</p>
<pre><code>Users report the app crashes on login. Spawn 4 teammates to investigate:
- One checks the auth middleware
- One examines recent database migrations
- One reviews the session handling code
- One searches error logs and stack traces

Have them share findings and narrow down the root cause together.
</code></pre>
<p>Each investigator works a different angle simultaneously. When one finds something relevant, they message the others. The lead synthesizes the findings into a diagnosis.</p>
<h3>Multi-angle code review</h3>
<p>A single reviewer catches bugs. Multiple reviewers with different mandates catch categories of bugs:</p>
<pre><code>Review PR #42 from three angles:
- Security reviewer: check for injection, auth bypass, data exposure
- Performance reviewer: check for N+1 queries, unnecessary re-renders, missing indexes
- Test reviewer: verify coverage, edge cases, and assertion quality

Synthesize their findings into a single review.
</code></pre>
<h3>Research and design exploration</h3>
<p>Not all teamwork is about code. Sometimes you need perspectives:</p>
<pre><code>I'm designing a CLI tool for managing environment variables across projects.
Create a team to explore this:
- UX researcher: how do developers actually manage env vars today? What's painful?
- Architect: propose the data model, storage format, and CLI interface
- Devil's advocate: find the edge cases, challenge assumptions, identify where this breaks
</code></pre>
<h2>Controlling the Team</h2>
<h3>Message a specific teammate</h3>
<pre><code>Message the backend-dev teammate: &quot;Prioritize the auth endpoints — the frontend needs them first.&quot;
</code></pre>
<h3>Assign or reassign tasks</h3>
<pre><code>Assign the caching task to the backend-dev teammate.
</code></pre>
<p>Tasks can also have dependencies — &quot;don't start the integration tests until the API endpoints are done&quot; — which the lead manages through the task list.</p>
<h3>Require plan approval</h3>
<p>For high-stakes work, you can put teammates in plan mode. They research and propose a plan, then wait for your explicit approval before writing any code:</p>
<pre><code>Spawn an architect teammate to refactor the auth module. Require plan approval before any changes.
</code></pre>
<p>The teammate will explore the codebase, write up a plan, and send it to you. You review it, approve or reject with feedback, and only then do they start implementing. This gives you architectural control without micromanaging the implementation.</p>
<h3>Shut down teammates</h3>
<p>When work is done:</p>
<pre><code>Ask the tester teammate to shut down.
</code></pre>
<p>Or wind down everything:</p>
<pre><code>Shut down the team and clean up.
</code></pre>
<p>This removes the team config and task list files. The tmux panes close.</p>
<h3>Choose models for teammates</h3>
<p>Not every task needs the most capable (and expensive) model. You can specify:</p>
<pre><code>Create a team with 3 teammates using Sonnet for cost efficiency.
</code></pre>
<p>Use Opus for complex architectural work, Sonnet for straightforward implementation, Haiku for simple lookups and formatting. The lead can mix models across teammates.</p>
<h2>Tips and Troubleshooting</h2>
<h3>Getting the granularity right</h3>
<p>Task size is the single biggest factor in team effectiveness. Too small and you drown in coordination overhead — agents spend more time messaging than working. Too large and teammates go dark for long stretches, potentially duplicating effort or heading in the wrong direction.</p>
<p>The sweet spot: <strong>self-contained units of work</strong>. A module. A test file. An API endpoint with its route, controller, and validation. Aim for roughly 5–6 tasks per teammate per session. Each task should be something a teammate can complete without needing to ask three clarifying questions.</p>
<h3>Token economics</h3>
<p>Each teammate gets its own context window. Three teammates means roughly 3x the token usage of a single session — there's no sharing or deduplication of context across agents. Factor this into your planning, especially for long sessions.</p>
<h3>Things to know</h3>
<ul>
<li><strong>Teammates can DM each other.</strong> The lead sees a summary of peer messages but doesn't have to relay everything.</li>
<li><strong>One team per session.</strong> You can't nest teams or have a teammate lead its own sub-team.</li>
<li><strong>Sessions don't resume teammates.</strong> If you use <code>/resume</code> or <code>/rewind</code>, in-process teammates won't be restored. The team lead session resumes, but you'd need to re-spawn teammates.</li>
<li><strong>Orphaned tmux sessions</strong> happen if something crashes. Clean up with <code>tmux ls</code> and <code>tmux kill-session -t &lt;name&gt;</code>.</li>
</ul>
<h3>Common issues</h3>
<table>
<thead>
<tr>
<th>Problem</th>
<th>Solution</th>
</tr>
</thead>
<tbody>
<tr>
<td>No tmux panes appearing</td>
<td>You probably ran <code>teamz</code> outside a tmux session. Start tmux first.</td>
</tr>
<tr>
<td>Teammate seems stuck</td>
<td>Message them directly — sometimes they need a nudge or clarification.</td>
</tr>
<tr>
<td>Panes too small to read</td>
<td><code>Ctrl+B, z</code> zooms a single pane full-screen. Toggle it again to return.</td>
</tr>
<tr>
<td>Want to kill a specific pane</td>
<td><code>Ctrl+B</code>, then <code>x</code> confirms killing the active pane.</td>
</tr>
</tbody>
</table>
<h3>In-process fallback keys</h3>
<p>If you're not using tmux, teammates run in-process. Navigation:</p>
<table>
<thead>
<tr>
<th>Key</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Shift+Down</code></td>
<td>Cycle through teammates</td>
</tr>
<tr>
<td><code>Escape</code></td>
<td>Interrupt current teammate's turn</td>
</tr>
<tr>
<td><code>Ctrl+T</code></td>
<td>Toggle task list view</td>
</tr>
</tbody>
</table>
<h2>A Note on Safety</h2>
<p>The <code>--dangerously-skip-permissions</code> flag means what it says. Every agent in the team — lead and teammates alike — can execute arbitrary shell commands, edit any file in the project, and make destructive changes without asking permission. There is no confirmation step, no sandbox, no undo beyond what git provides.</p>
<p>This is the tradeoff that makes autonomous parallel work possible. If every teammate had to ask before running <code>npm test</code> or editing a file, the coordination overhead would make teams impractical.</p>
<p>Mitigate the risk:</p>
<ul>
<li><strong>Work in git-tracked directories</strong> with clean commit history. If a teammate breaks something, <code>git diff</code> shows what changed and <code>git checkout</code> reverts it.</li>
<li><strong>Don't run teams in directories with sensitive files</strong> (credentials, production configs, private keys) unless you trust the prompts you're giving.</li>
<li><strong>Start small.</strong> Try a two-agent team on a low-stakes task before orchestrating six agents on your production codebase.</li>
</ul>
<p>For finer-grained control without the nuclear option, configure permissions in <code>~/.claude/settings.json</code>:</p>
<pre><code class="language-json">{
  &quot;permissions&quot;: {
    &quot;allow&quot;: [
      &quot;Bash(npm run *)&quot;,
      &quot;Bash(git commit *)&quot;,
      &quot;Read&quot;,
      &quot;Edit(src/**)&quot;
    ],
    &quot;deny&quot;: [
      &quot;Bash(git push *)&quot;,
      &quot;Bash(rm -rf *)&quot;
    ]
  }
}
</code></pre>
<p>This lets you allow specific operations (running tests, committing, reading files, editing source) while blocking dangerous ones (force pushes, recursive deletes). It's more work to configure, but it lets you use teams without the global permission bypass.</p>
<h2>File Reference</h2>
<table>
<thead>
<tr>
<th>What</th>
<th>Location</th>
</tr>
</thead>
<tbody>
<tr>
<td>Team configuration</td>
<td><code>~/.claude/teams/{team-name}/config.json</code></td>
</tr>
<tr>
<td>Shared task list</td>
<td><code>~/.claude/tasks/{team-name}/</code></td>
</tr>
<tr>
<td>Claude settings</td>
<td><code>~/.claude/settings.json</code></td>
</tr>
</tbody>
</table>
<hr />
<p>One alias, one tmux session, one sentence describing what you want built. The agents handle the rest — splitting work, coordinating, reporting back. It won't replace thinking about architecture, but it will replace the tedium of context-switching between three files that all need to change at once.</p>
]]></content:encoded>
    </item>
    <item>
      <title>True Random Number Generators: From Quantum Physics to Silicon</title>
      <link>https://timbeach.com/a/trng-deep-dive/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/trng-deep-dive</guid>
      <pubDate>Fri, 20 Feb 2026 00:00:00 +0000</pubDate>
      <description></description>
      <content:encoded><![CDATA[<p><img src="../pix/true-randomness.jpg" alt="True Randomness" /></p>
<p>How do you get a genuinely unpredictable bit? Not a bit that <em>looks</em> random, not a bit computed from a seed, but a bit that did not exist in the universe until the moment you measured it. This article traces the answer from the foundations of quantum mechanics through circuit design, post-processing, standards, attacks, and the open philosophical questions that remain.</p>
<h2>Why Randomness Matters</h2>
<p>Cryptography, simulation, lotteries, statistical sampling, and security protocols all depend on unpredictable numbers. If an adversary can predict your random numbers, they can predict your encryption keys, forge your signatures, and break your protocols. The entire security of modern digital infrastructure rests on the assumption that certain numbers are genuinely unknowable in advance.</p>
<p>A pseudorandom number generator (PRNG) produces numbers that <em>look</em> random but are entirely determined by an initial seed. Know the seed, know the sequence. A <strong>true random number generator (TRNG)</strong> produces numbers from a physical process where the outcome is not determined by any prior state of the universe. The distinction is not academic — it is the difference between security that holds against any adversary and security that holds only against adversaries who lack a specific piece of information.</p>
<h2>What Is &quot;True&quot; Randomness?</h2>
<h3>The Quantum Foundation</h3>
<p>Classical physics is deterministic. Given the position and velocity of every particle, Newton's laws determine the entire future. In this framework, &quot;randomness&quot; is just a word for ignorance — we call a coin flip random because we can't track the air molecules, not because the outcome is undetermined.</p>
<p>Quantum mechanics broke this picture. In 1926, Max Born proposed that the wave function describes not a trajectory but a <strong>probability amplitude</strong>. The probability of finding a particle in a particular state is the squared magnitude of its wave function: <code>P(x) = |ψ(x)|²</code>. This is not a statement about incomplete knowledge. Before measurement, a quantum system does not <em>have</em> a definite value for the measured property — it exists in a superposition of possibilities. The measurement outcome is <strong>intrinsically probabilistic</strong>. No hidden information, no deeper theory, no additional computation can predict it.</p>
<h3>The Heisenberg Uncertainty Principle</h3>
<p>Heisenberg's principle formalizes this. A particle cannot simultaneously have a precise position and a precise momentum: <code>Δx · Δp ≥ ℏ/2</code>. This is not an instrument limitation — the universe itself does not contain that information. In electronic circuits, this means electrons at finite temperature exhibit random fluctuations that cannot be eliminated even in principle.</p>
<h3>Bell's Theorem: The Nail in the Coffin of Hidden Variables</h3>
<p>The strongest argument for genuine randomness comes from John Bell's 1964 theorem.</p>
<p><strong>The challenge (Einstein, 1935):</strong> Maybe quantum particles carry predetermined values we can't see — &quot;hidden variables&quot; — and the apparent randomness is just our ignorance.</p>
<p><strong>Bell's answer:</strong> He derived a mathematical inequality that <em>any</em> hidden variable theory must satisfy. Quantum mechanics predicts correlations that <strong>violate</strong> this inequality.</p>
<p><strong>The experiments:</strong> Starting with Alain Aspect (1982) and culminating in loophole-free Bell tests (Hensen et al. 2015, Giustina et al. 2015, Shalm et al. 2015), experiments consistently confirm quantum mechanics and violate Bell's inequality.</p>
<p><strong>What this means:</strong> The randomness in quantum measurements is not due to hidden variables we've failed to discover. When a photon hits a beam splitter and is either reflected or transmitted, that outcome is <strong>genuinely undetermined</strong> before it occurs. This is the deepest foundation for TRNGs.</p>
<h3>Quantum Indeterminacy vs Classical Chaos</h3>
<p><strong>Classical Chaos</strong> is deterministic but sensitive to initial conditions. It is unpredictable <em>in practice</em> — think weather, turbulence, dice. With perfect information, it would be perfectly predictable.</p>
<p><strong>Quantum Indeterminacy</strong> is fundamentally probabilistic. It is unpredictable <em>in principle</em> — think photon beam splitters, radioactive decay. Even with perfect information, the outcome remains unpredictable.</p>
<p>TRNGs based on quantum phenomena tap into fundamental indeterminacy. Sources like atmospheric noise or lava lamp convection rely on classical chaos amplifying quantum-level noise — practically unpredictable, but not provably so in the same rigorous sense.</p>
<h2>Physical Entropy Sources</h2>
<p>Ordered from most rigorously quantum-random to most dependent on classical chaos.</p>
<h3>Photon Beam Splitter QRNGs</h3>
<p>The conceptually simplest TRNG: a single photon hits a 50/50 beam splitter. Quantum mechanics dictates exactly 50% probability of reflection vs transmission, and <strong>no property of the photon before the beam splitter determines which path it takes</strong>.</p>
<p>One photon in, one genuinely random bit out. Bell's theorem guarantees no hidden variable determines the outcome. Modern implementations achieve Mbit/s to Gbit/s rates. <strong>ID Quantique</strong> (Geneva) pioneered commercial devices using this architecture.</p>
<h3>Vacuum Fluctuation QRNGs</h3>
<p>Even in a perfect vacuum, electromagnetic fields fluctuate — <strong>vacuum fluctuations</strong> are a direct consequence of the Heisenberg uncertainty principle applied to the EM field. A homodyne detection scheme combines a laser with a vacuum input on a beam splitter, and the difference signal between two photodetectors is dominated by quantum vacuum noise.</p>
<p>No classical analog exists — this noise is purely quantum. The Australian National University (ANU) operates a public vacuum QRNG at qrng.anu.edu.au achieving 5.7 Gbit/s. It can be sampled at high frequencies since homodyne detection is continuous.</p>
<h3>Radioactive Decay</h3>
<p>A radioactive atom has a probability of decaying per unit time, but the exact moment is completely unpredictable. The nucleus exists in a superposition of &quot;decayed&quot; and &quot;not decayed&quot; states — the transition is genuinely stochastic.</p>
<p><strong>Why it's the philosophical gold standard:</strong> No hidden variables (Bell's theorem applies). It is <strong>immune to environmental conditions</strong> — temperature, pressure, EM fields don't affect nuclear decay rates. Each decay is independent (Poisson process). John Walker's <strong>HotBits</strong> project (1996) used Cesium-137 plus a Geiger counter.</p>
<p><strong>Practical limitations:</strong> Regulatory issues, low bit rates, source activity decreases over time, not suitable for consumer electronics.</p>
<h3>Avalanche Noise (Zener Diodes)</h3>
<p>When a p-n junction diode is reverse-biased near its breakdown voltage, two quantum phenomena generate noise. <strong>Zener breakdown</strong> (below 5V) involves electrons quantum-tunneling through the depletion region, where individual tunneling events are quantum mechanically random. <strong>Avalanche breakdown</strong> (above 5V) involves accelerated carriers ionizing lattice atoms, creating cascading secondary carriers where the multiplication factor per carrier is stochastic — quantum scattering processes determine when and where impact ionization occurs.</p>
<p>The noise can be millivolts to volts — much larger than thermal noise — making these circuits practical and popular. Diodes in the 5-7V breakdown range are preferred because they operate primarily via avalanche multiplication.</p>
<p><strong>Design note:</strong> Why avalanche over thermal noise? The signal is 1000x larger, requiring far less amplification and reducing the risk that amplifier noise dominates the entropy source.</p>
<h3>Shot Noise</h3>
<p>Walter Schottky described shot noise in 1918. When current flows across a potential barrier (p-n junction, tunnel junction), it's not a smooth flow — it's discrete electrons crossing at random, independent times. The power spectral density is <code>S_I = 2qI</code> where q is the electron charge and I is DC current. This gives white noise (flat across all frequencies). Each electron's barrier crossing is governed by quantum tunneling probabilities — fundamentally stochastic.</p>
<h3>Thermal Noise (Johnson-Nyquist)</h3>
<p>Every resistor above absolute zero generates random voltage fluctuations from the thermal motion of charge carriers. At room temperature across a 10kΩ resistor with 10kHz bandwidth, this amounts to about 1.3 μV RMS. Tiny, but measurable.</p>
<p><strong>The quantum connection:</strong> At the deepest level, the thermal motion is governed by quantum statistical mechanics (Fermi-Dirac distribution). At very high frequencies or very low temperatures, the classical formula breaks down and Planck's quantum noise formula takes over.</p>
<p><strong>Engineering reality:</strong> You need 60-80 dB of amplification to work with these signals, and your amplifier's own noise floor must be well below the signal level — a significant design challenge.</p>
<h3>Ring Oscillator Jitter and Metastable Flip-Flops</h3>
<p>A ring oscillator (an odd number of inverters in a loop) has propagation delays that fluctuate due to thermal noise, shot noise, and flicker noise in the transistors. This <strong>jitter</strong> accumulates over time, making the oscillator's phase drift in a random walk.</p>
<p><strong>Why this matters enormously:</strong> Ring oscillator TRNGs require <strong>no special components</strong> — only standard digital logic gates. They work in any CMOS process, including FPGAs and ASICs. This is why they dominate in system-on-chip designs.</p>
<p><strong>Metastable flip-flops:</strong> A flip-flop driven into metastability (input arrives exactly at the clock edge) must resolve to 0 or 1, with thermal noise determining which. Intel's RDRAND uses this principle — pairs of cross-coupled inverters are periodically forced to their metastable point.</p>
<p><strong>Design note:</strong> Why ring oscillators for on-chip TRNGs? No analog components, no special fabrication steps, portable across process nodes. The tradeoff: susceptibility to electromagnetic injection locking (an external signal can lock the oscillators, destroying randomness).</p>
<h3>Atmospheric Noise and Lava Lamps</h3>
<p>About 2,000 thunderstorms are active at any moment, producing roughly 50 lightning flashes per second. A radio receiver tuned to an unused frequency picks up a chaotic superposition of these emissions. <strong>random.org</strong> has served over a billion random bits per day using this approach since 1998.</p>
<p><strong>Cloudflare's LavaRand:</strong> A wall of about 100 lava lamps filmed by a camera. The Rayleigh-Bénard convection creates complex, never-repeating patterns driven by chaotic fluid dynamics with thermal noise at boundaries. Pixel data is hashed to extract entropy. Other Cloudflare offices use chaotic pendulum mobiles (London) and radioactive decay (Singapore).</p>
<p><strong>Design note:</strong> Why lava lamps? Defense in depth. Even if an attacker could solve the intractable fluid dynamics, the entropy is mixed with other sources. The lava lamps are one layer, not the only layer.</p>
<h2>From Analog Noise to Digital Bits</h2>
<h3>The Amplification Problem</h3>
<p>The central engineering challenge: raw entropy signals are typically <strong>microvolts</strong> in amplitude, while the noise floor of the measurement circuitry can be comparable or larger. If your entropy source produces 10 μV of genuine random noise but your amplifier's input noise is 15 μV, you're measuring the amplifier, not the entropy source.</p>
<p><strong>A typical signal chain:</strong> First, a <strong>low-noise preamplifier</strong> — JFET-input op-amps with roughly 1 nV/√Hz input noise and 40-60 dB gain. Second, a <strong>bandpass filter</strong> — high-pass (1-10 kHz) removes DC drift and 1/f noise while low-pass (100 kHz to several MHz) limits bandwidth to Nyquist frequency and attenuates interference. Third, a <strong>second amplification stage</strong> bringing total gain to 60-80 dB. Finally, an <strong>anti-aliasing filter</strong> — a steep low-pass immediately before digitization.</p>
<p>AC coupling between stages (via capacitors) is essential — without it, DC offset accumulates through the high-gain chain and saturates the amplifiers at the supply rails, producing a very deterministic output.</p>
<h3>Digitization</h3>
<p><strong>Comparator-based (1-bit):</strong> Amplified noise compared against a threshold. Above = 1, below = 0. Simple but the sampling rate must be much lower than the noise bandwidth to ensure independence between samples.</p>
<p><strong>ADC-based (multi-bit):</strong> An ADC captures multiple bits per sample, but only the least significant bits carry genuine entropy (MSBs carry the deterministic signal shape). An 8-bit ADC might yield 2-4 bits of entropy per sample.</p>
<p><strong>Design note:</strong> Why comparators over ADCs in many designs? Simplicity, low power, easy on-chip integration. The throughput penalty is accepted because conditioning and CSPRNG expansion provide the needed volume.</p>
<h3>Sampling Rate</h3>
<p>This is critical. If the noise bandwidth is B Hz, the autocorrelation time is roughly 1/(2B). Sampling faster than this produces correlated (non-independent) bits. Practical designs sample at B/5 to B/10 for good independence, accepting the throughput cost.</p>
<h2>Conditioning Raw Entropy</h2>
<h3>Why Raw Bits Aren't Uniform</h3>
<p>No physical entropy source produces perfectly uniform, independent bits. The raw output suffers from <strong>bias</strong> — comparator offset, amplifier asymmetry, or DC leakage means P(1) ≠ 0.5. Even 1 mV of comparator offset against 100 mV noise RMS gives P(1) ≈ 0.496. It also suffers from <strong>autocorrelation</strong> — sampling too fast relative to noise bandwidth means successive bits are correlated. <strong>Non-stationarity</strong> means temperature, voltage, and aging shift the statistical properties over time. And <strong>deterministic components</strong> — clock signals, power supply switching noise, and nearby digital circuits — inject periodic patterns.</p>
<p>A raw TRNG bit might carry only 0.7-0.99 bits of min-entropy rather than the ideal 1.0 bit. Conditioning transforms a stream with imperfect entropy density into a shorter stream with full entropy density.</p>
<h3>Von Neumann Debiasing (1951)</h3>
<p>Examine raw bits in pairs: (0, 1) outputs 0. (1, 0) outputs 1. (0, 0) or (1, 1) are discarded.</p>
<p><strong>Why it works:</strong> If each bit independently has probability p of being 1, then P(0,1) = (1-p)·p = P(1,0). Equal regardless of p. The matched pairs are discarded because their probabilities <em>do</em> depend on p.</p>
<p><strong>The cost:</strong> At best, 75% of input bits are wasted (only 25% of pairs are usable). With heavy bias (p=0.9), efficiency drops to about 9%. Output rate is variable, complicating downstream clocking.</p>
<p><strong>Limitation:</strong> Assumes independence. If successive bits are correlated (which they are in practice), bias leaks through.</p>
<h3>XOR Folding</h3>
<p>XOR N consecutive bits to produce one output bit. For bias p, XOR of two bits has P(1) = 2p(1-p) — closer to 0.5. XORing more bits reduces bias exponentially. Simple but doesn't handle autocorrelation, and throughput drops N:1.</p>
<h3>Cryptographic Conditioning</h3>
<p>Modern TRNG designs use cryptographic hash functions as entropy condensers. This is what NIST SP 800-90B mandates.</p>
<p><strong>Von Neumann</strong> uses pair comparison, gives at most 25% throughput, and removes first-order bias only. <strong>XOR folding</strong> uses N-to-1 XOR, gives 1/N throughput, and reduces bias but doesn't fix correlation. <strong>LFSR</strong> uses a linear hash over GF(2), gives roughly 100% throughput, but is not cryptographic and is vulnerable to algebraic attacks. <strong>SHA-256</strong> hashes 512 raw bits down to 256 output bits, giving roughly 50% throughput with full entropy if min-entropy rate exceeds 0.5. <strong>AES-CBC-MAC</strong> uses block cipher conditioning, gives variable throughput, and produces 128-bit conditioned output per block. <strong>HMAC-DRBG</strong> uses HMAC in a feedback construction, gives variable throughput, and is NIST SP 800-90A compliant.</p>
<p><strong>Design note:</strong> Why hash-based conditioning over von Neumann? The hash function's avalanche property destroys any bias or correlation in the input. It provides a fixed output rate regardless of input statistics, and has a security proof under standard cryptographic assumptions.</p>
<h2>Health Monitoring</h2>
<h3>Why It's Critical</h3>
<p>A TRNG is a physical device, and physical devices fail. When a TRNG fails, it may produce deterministic or predictable output — <strong>a catastrophic security failure invisible to software unless actively detected.</strong></p>
<p>Failure modes include diode aging, amplifier rail saturation (stuck at all 0s or all 1s), EM frequency injection into ring oscillators, temperature extremes reducing thermal noise, and manufacturing defects producing biased output.</p>
<h3>NIST SP 800-90B Mandatory Tests</h3>
<p><strong>Repetition Count Test:</strong> Counts consecutive identical outputs. If the count exceeds a threshold C, declare failure. For 0.85 bits/sample min-entropy, C = 25 consecutive identical samples triggers the alarm.</p>
<p><strong>Adaptive Proportion Test:</strong> Within a window of 1024 samples (binary), counts how many match the first sample. If the count exceeds a threshold, declare failure. This catches bias shifts the repetition test would miss.</p>
<h3>Startup vs Continuous</h3>
<p><strong>Startup tests</strong> run before any output is provided — collect and test a large initial sample (for example, 4096 samples). No output until tests pass. <strong>Continuous tests</strong> run on every sample during operation and must be lightweight (a counter and a comparison per sample).</p>
<h3>When Tests Fail</h3>
<p>The options range from most to least conservative: suppress output immediately, alarm and retry (wait, re-run startup tests), fall back to stored entropy on a time-limited basis, or degrade gracefully with notification — continue from a previously-seeded CSPRNG but flag that live entropy is unavailable (this is Linux's approach).</p>
<p>Intel's RDRAND sets the carry flag (CF) to indicate success. CF=0 means the DRNG failed health tests — software must check this.</p>
<h3>Statistical Test Suites</h3>
<p>Used during design validation and certification, not online. <strong>NIST SP 800-22</strong> runs 15 tests (monobit, runs, FFT, matrix rank, etc.) on 1M-bit sequences. <strong>Diehard</strong> (Marsaglia, 1995) offers 18 tests including birthday spacings, parking lot, and squeeze. <strong>TestU01</strong> (L'Ecuyer) is the gold standard — SmallCrush (10 tests), Crush (96), BigCrush (160). <strong>NIST SP 800-90B entropy estimation</strong> uses 10 different min-entropy estimators; the final assessment is the minimum across all (conservative bound).</p>
<h2>Real-World Implementations</h2>
<h3>Intel RDRAND/RDSEED (Ivy Bridge, 2012+)</h3>
<p>A three-stage pipeline. First, the <strong>entropy source:</strong> pairs of cross-coupled inverters forced to metastability, where thermal noise determines resolution. Raw output is roughly 3 Gbps with about 0.5 bits min-entropy per raw bit, including continuous health testing. Second, the <strong>conditioner:</strong> AES-CBC-MAC compresses roughly 512 raw bits into a 256-bit seed with full entropy. Third, the <strong>CSPRNG:</strong> AES-CTR-DRBG (SP 800-90A compliant) generates up to 512 values per seed.</p>
<p><strong>RDRAND</strong> returns CSPRNG output (roughly 500 MB/s). <strong>RDSEED</strong> returns conditioned entropy directly (slower, can fail if entropy is consumed faster than generated).</p>
<h3>Linux /dev/random and /dev/urandom</h3>
<p><strong>Historical architecture (pre-5.17):</strong> An entropy pool accumulated entropy from interrupt timing, input devices, disk I/O, and RDRAND. SHA-1 mixing. <code>/dev/random</code> blocked when the entropy estimate hit zero; <code>/dev/urandom</code> never blocked.</p>
<p><strong>Modern architecture (5.17+, Jason Donenfeld's overhaul):</strong> ChaCha20-based CSPRNG replaced the entropy pool. <code>/dev/random</code> and <code>/dev/urandom</code> are now <strong>functionally identical</strong> after initial seeding. blake2s is used for input mixing. Jitter entropy serves as backup. RDRAND/RDSEED are XORed in (never trusted alone). The <code>getrandom()</code> syscall is the preferred interface — blocks only until initial seeding, then never.</p>
<p><strong>Design note:</strong> Why unify /dev/random and /dev/urandom? The blocking was based on a misconception that a CSPRNG &quot;uses up&quot; entropy. Once seeded with 256 bits, ChaCha20's output is computationally indistinguishable from random. Blocking caused real-world harm (GnuPG stalling, users installing dubious entropy daemons) with zero security benefit.</p>
<h3>Hardware Security Modules (HSMs)</h3>
<p>The highest-assurance implementations. Dedicated analog noise sources (thermal or shot noise) in tamper-responsive enclosures. If physical tampering is detected, all keys and entropy are zeroized. FIPS 140-3 Level 3/4 certified. Vendors include Thales Luna, Entrust nShield, and Utimaco.</p>
<h3>Quantum RNG Chips</h3>
<p><strong>ID Quantique Quantis:</strong> Photon beam-splitter architecture, 4-16 Mbps (chip), up to 240 Mbps (PCIe). Available as chip-scale modules for smartphones and IoT. <strong>Quside (Spain):</strong> Phase-diffusion QRNG, over 100 Gbps demonstrated in research.</p>
<h3>Cloudflare LavaRand</h3>
<p>Camera feeds a lava lamp wall, pixel data seeds the CSPRNG. One entropy source among several. London office uses chaotic pendulum mobiles. Singapore uses radioactive decay. Defense in depth.</p>
<h2>The Hybrid Architecture: TRNG + CSPRNG</h2>
<h3>Why This Dominates</h3>
<p>Virtually every modern system uses the same pattern:</p>
<pre><code>TRNG (slow, genuine entropy)
    ↓ seed (128-512 bits)
CSPRNG (fast, computationally indistinguishable from random)
    ↓ output (GB/s)
    ↑ periodic reseed from TRNG
</code></pre>
<p><strong>Throughput:</strong> CSPRNG runs at CPU speed (AES-NI: over 10 GB/s). No physical entropy source matches this. <strong>Unpredictability:</strong> TRNG seeding means even state compromise is temporary — the next reseed restores security. <strong>Resilience:</strong> If the TRNG temporarily fails, the CSPRNG continues securely from its current state.</p>
<h3>Entropy Pools and Fortuna</h3>
<p>An entropy pool accumulates entropy from multiple sources via a cryptographic mixing function.</p>
<p><strong>Fortuna</strong> (Schneier and Ferguson) uses 32 separate pools. Each entropy source distributes input round-robin. Pool P0 is used at every reseed, P1 every 2nd, P2 every 4th, and so on. This guarantees recovery from state compromise within 2^31 reseeds, even if an attacker monitors some sources. Fortuna is used in FreeBSD and influenced Windows' CryptGenRandom.</p>
<h3>The PRNG-to-TRNG Spectrum</h3>
<p>At the weakest end sits a <strong>deterministic PRNG</strong> like Mersenne Twister — predictable with state knowledge and the fastest option. Next is a <strong>CSPRNG</strong> like AES-CTR or ChaCha20 — computationally hard to predict and very fast. Then a <strong>hybrid (TRNG+CSPRNG)</strong> like Linux RNG or Intel RDRAND — non-deterministic seed plus computational speed. Above that, a <strong>TRNG with conditioning</strong> (PTG.2 device) where every bit depends on fresh entropy at moderate speed. Then a <strong>raw TRNG</strong> (PTG.3 device) with information-theoretic security but slow. At the very top, a <strong>device-independent QRNG</strong> using Bell-test certification — provably unpredictable but very slow.</p>
<h2>Standards and Certification</h2>
<h3>NIST SP 800-90 Series (US)</h3>
<p><strong>90A</strong> specifies DRBGs — Hash_DRBG, HMAC_DRBG, CTR_DRBG. (Dual_EC_DRBG was removed after the NSA backdoor scandal.) <strong>90B</strong> covers entropy sources — min-entropy estimation (10 different estimators, take the minimum), mandatory health tests, IID vs non-IID tracks. <strong>90C (draft)</strong> describes how to combine 90A + 90B into a complete random bit generator.</p>
<h3>AIS 31 (German BSI)</h3>
<p>A fundamentally different philosophy from NIST. <strong>NIST SP 800-90B</strong> is empirical and statistical — &quot;show me the output looks random.&quot; Its core requirement is statistical tests on collected samples. This is low-barrier and allows novel sources to be evaluated, but it can't detect a deterministic source that passes all tests.</p>
<p><strong>AIS 31 (BSI)</strong> is model-based and physical — &quot;explain to me WHY it's random.&quot; Its core requirement is a stochastic model of the entropy source. This provides deeper assurance and catches sources that pass tests but aren't truly random, but it can only certify well-understood sources.</p>
<p><strong>AIS 31 classes:</strong> <strong>PTG.1</strong> is a deterministic RNG (essentially a CSPRNG) that passes statistical tests, seeded from PTG.2+. <strong>PTG.2</strong> is a physical TRNG with conditioning that requires a stochastic model <em>plus</em> statistical tests — most hardware TRNGs certify here. <strong>PTG.3</strong> is a physical TRNG <em>without</em> conditioning — raw output must pass all tests. Extremely difficult, essentially requiring a quantum source with near-perfect uniformity.</p>
<h3>FIPS 140-2/3</h3>
<p>Security requirements for cryptographic modules. <strong>Level 1-2</strong> requires basic statistical testing. <strong>Level 3</strong> adds identity-based authentication and tamper-evident enclosures. <strong>Level 4</strong> adds environmental failure protection — the module zeroizes if temperature, voltage, or EM excursions are detected.</p>
<p>FIPS 140-3 validation typically takes 12-24 months and costs $50K-$200K+.</p>
<h2>Attacks and Security</h2>
<h3>The Dual_EC_DRBG Scandal</h3>
<p>The most consequential cryptographic scandal of the 21st century. The algorithm uses two elliptic curve points P and Q. If you know the discrete log relationship between them (Q = eP), you can recover the internal state from a single output block and predict all future output.</p>
<p>In 2007, Shumow and Ferguson publicly noted this backdoor possibility. In 2013, Snowden documents confirmed the NSA had paid RSA Security $10M to make Dual_EC_DRBG the default in BSAFE. NIST removed it from SP 800-90A in 2014.</p>
<p><strong>Lasting impact:</strong> Fundamental loss of trust in NIST-recommended algorithms (which NIST has worked to restore through more transparent processes). Motivated &quot;nothing up my sleeve&quot; number requirements in cryptographic designs.</p>
<h3>The RDRAND Controversy</h3>
<p>Intel's RDRAND is a black box on the CPU die. You cannot inspect the implementation, cannot access raw entropy, and external testing can only evaluate CSPRNG output (which passes all statistical tests regardless of entropy source quality, because AES-CTR-DRBG is strong).</p>
<p>Theodore Ts'o (Linux kernel RNG maintainer): <em>&quot;I am so glad I resisted pressure from Intel engineers to let /dev/random rely only on the RDRAND instruction.&quot;</em></p>
<p><strong>The 2019 AMD bug:</strong> Certain AMD processors had RDRAND always return 0xFFFFFFFF — a complete, silent failure demonstrating why you never trust a single source.</p>
<p><strong>Current consensus:</strong> RDRAND is one input to an entropy pool, never the sole source. Linux XORs it with other sources — even a backdoored RDRAND cannot weaken the final output (XOR with an independent source can only help).</p>
<h3>Environmental Manipulation</h3>
<p><strong>Temperature:</strong> Cooling a chip to -40°C can reduce thermal noise entropy to near zero. <strong>Voltage:</strong> Lowering supply voltage reduces noise margins; voltage glitches can force deterministic behavior. <strong>EM injection:</strong> A focused EM field can lock ring oscillators in phase, eliminating jitter entirely. Bayon et al. (CHES 2014) reduced ring oscillator TRNG entropy to essentially zero from centimeters away.</p>
<h3>Side-Channel Attacks</h3>
<p><strong>Electromagnetic emanation:</strong> EM probes near the chip can observe jitter patterns and infer generated bits. Markettos and Moore (2009) extracted internal state from several commercial TRNGs. <strong>Power analysis:</strong> SPA/DPA on the TRNG's power consumption can reveal which bits were generated. <strong>Timing:</strong> If output rate is data-dependent (for example, von Neumann debiasing), timing reveals information about raw source values.</p>
<h3>Supply Chain Attacks</h3>
<p>A hardware Trojan inserted during fabrication can subtly weaken a TRNG — reducing noise bandwidth, adding a deterministic component to oscillators, or inserting a kill switch. Such trojans may involve changes to only a few transistors in a billion-transistor chip and pass all functional and statistical testing.</p>
<h3>Never Trust a Single Source</h3>
<p>This is the most important practical lesson. Hardware can fail silently (AMD RDRAND bug). Manufacturing variations mean your test chip is not your production chip. Environmental conditions differ between lab and deployment. Backdoors exist (Dual_EC_DRBG proved this). <strong>XOR with independent sources can only help, never hurt</strong> — mixing multiple sources means compromising the output requires compromising ALL sources simultaneously.</p>
<h2>Historical Timeline</h2>
<p><strong>~3000 BCE</strong> — Mesopotamian dice (sheep ankle bones). <strong>1655</strong> — Roulette wheel attributed to Pascal. <strong>1918</strong> — Schottky describes shot noise. <strong>1926</strong> — Born proposes probabilistic interpretation of QM; Johnson observes thermal noise. <strong>1927</strong> — Heisenberg uncertainty principle; Tippett publishes first random number tables. <strong>1928</strong> — Nyquist derives thermal noise formula. <strong>1940s</strong> — Monte Carlo methods (Ulam, von Neumann, Metropolis) at Los Alamos. <strong>1951</strong> — Von Neumann publishes debiasing technique. <strong>1955</strong> — RAND Corporation publishes &quot;A Million Random Digits.&quot; <strong>1957</strong> — <strong>ERNIE 1</strong> — neon tube discharge noise selects UK Premium Bond winners (built by Tommy Flowers' team). <strong>1964</strong> — Bell's theorem. <strong>1982</strong> — Aspect's Bell test experiments. <strong>1996</strong> — HotBits (radioactive decay RNG); SGI patents LavaRand. <strong>1998</strong> — random.org (atmospheric noise). <strong>1999</strong> — Intel i810 — first consumer CPU with on-chip TRNG. <strong>2007</strong> — Dual_EC_DRBG backdoor publicly noted. <strong>2012</strong> — Intel RDRAND/RDSEED (Ivy Bridge). <strong>2013</strong> — Snowden confirms NSA backdoor in Dual_EC_DRBG. <strong>2015</strong> — Loophole-free Bell tests (Delft, Vienna, NIST). <strong>2018</strong> — NIST SP 800-90B published; cosmic Bell test using quasar light. <strong>2019</strong> — ERNIE 5 (quantum RNG); AMD RDRAND bug discovered. <strong>2022</strong> — Linux 5.17 unifies /dev/random and /dev/urandom. <strong>2020s</strong> — Chip-scale QRNGs commercially available for smartphones and IoT.</p>
<h2>Frontiers</h2>
<h3>Device-Independent Quantum RNGs</h3>
<p>The theoretical gold standard. Two entangled particles are measured by spatially separated devices. If the CHSH Bell inequality is violated (S &gt; 2), the outputs <strong>must</strong> contain genuine randomness — regardless of device trust. Even if every component was manufactured by an adversary, Bell violation certifies randomness.</p>
<p>Current limitations: requires over 82.8% detector efficiency (to close the detection loophole), cryogenic detectors, low throughput (bits/second). Active research is pushing toward practical rates.</p>
<h3>Randomness Expansion and Amplification</h3>
<p><strong>Expansion:</strong> A short seed of n perfect random bits can generate 2^(poly(n)) certified random bits via Bell test protocols. Proven possible by Vazirani and Vidick (2012).</p>
<p><strong>Amplification:</strong> Starting from <em>weak</em> randomness (each bit has bounded bias ε &lt; 1/2), you can arrive at perfect randomness. This is <strong>impossible classically</strong> (Santha-Vazirani, 1986) but <strong>possible quantumly</strong> (Colbeck-Renner, 2012). The profound implication: if <em>any</em> unpredictability exists in the universe, perfect randomness follows.</p>
<h3>NIST Randomness Beacon and League of Entropy</h3>
<p><strong>NIST Beacon:</strong> Publishes signed, chained 512-bit random values every 60 seconds from two independent quantum sources. Public, verifiable, unpredictable. Used for lotteries, audits, timestamping.</p>
<p><strong>drand (League of Entropy):</strong> Cloudflare, Protocol Labs, and others operate a distributed beacon using threshold cryptography — no single participant can predict or bias output. More robust than any single-operator beacon.</p>
<h3>Exotic Sources</h3>
<p><strong>Cosmic microwave background:</strong> Quantum vacuum fluctuations from cosmic inflation, frozen 13.8 billion years ago. The 2018 &quot;cosmic Bell test&quot; used quasar photons (billions of light-years away) to choose measurement settings, closing the freedom-of-choice loophole. <strong>Brownian motion:</strong> Nanoparticle tracking gives well-characterized stochastic signals. <strong>Neural noise:</strong> Neurons fire with inherent stochasticity due to random ion channel behavior — speculative but theoretically sound.</p>
<h2>Philosophy: The Deepest Questions</h2>
<h3>What Does &quot;Random&quot; Actually Mean?</h3>
<p><strong>Kolmogorov complexity:</strong> A string is random if it's incompressible — the shortest program that outputs it is approximately as long as the string itself. A PRNG output, no matter how long, has low Kolmogorov complexity (the algorithm plus seed is short). A truly random string of n bits has complexity roughly n. The fundamental problem: Kolmogorov complexity is <strong>uncomputable</strong> (halting problem), so you can never prove a specific finite string is random.</p>
<p><strong>Martin-Löf randomness:</strong> An infinite sequence is random if no computable betting strategy can make unbounded money on it. Equivalent to saying no computable adversary can distinguish it from uniform.</p>
<p><strong>Information-theoretic view:</strong> A TRNG produces genuine <em>information</em> in Shannon's sense. Each bit is irreducible — it didn't exist in the universe before measurement. A PRNG produces no new information; it merely stretches the information in its seed.</p>
<h3>Can We Prove Randomness?</h3>
<p><strong>For finite strings: No.</strong> It could have been generated by an unknown deterministic process. All statistical tests have finite power. AES-CTR output passes every known test but is entirely deterministic.</p>
<p><strong>For processes: Conditionally yes.</strong> If you accept quantum mechanics (and reject superdeterminism), Bell inequality violations prove the outputs contain genuine randomness. This is the strongest known certification.</p>
<h3>The Interpretations Problem</h3>
<p><strong>Copenhagen:</strong> Measurement outcomes are fundamentally stochastic. TRNG randomness is real. <strong>Many-Worlds (Everett):</strong> All outcomes occur in different branches. No collapse, no randomness at the universal level. QRNGs produce different bits in different branches. <strong>Bohmian mechanics:</strong> Deterministic pilot wave guides particles. Randomness is epistemic (quantum equilibrium), like classical chaos but with stronger unpredictability. <strong>Superdeterminism:</strong> Everything was predetermined by initial conditions, including &quot;free&quot; measurement choices. Bell violations don't imply randomness.</p>
<h3>The Practical Resolution</h3>
<p>For engineering purposes, the debate is irrelevant. Quantum processes are the best known source of unpredictability. No known technology can predict quantum measurement outcomes. Bell tests can certify that outputs are at least as random as QM predicts. Whether the universe is &quot;really&quot; deterministic at some deeper level doesn't affect practical security — no adversary has access to that deeper level.</p>
<p>The hierarchy for practical security: <strong>Weakest</strong> — Algorithmic (PRNG), predictable with state knowledge. <strong>Moderate</strong> — Classical physical (thermal noise, chaos), unpredictable in practice, deterministic in principle. <strong>Strongest</strong> — Quantum mechanical, unpredictable even in principle, certifiable via Bell tests.</p>
<h2>Key Takeaways</h2>
<p><strong>Quantum mechanics provides the foundation.</strong> Bell's theorem and its experimental confirmation establish that certain physical events are fundamentally undetermined. TRNGs exploit this.</p>
<p><strong>No raw source is perfect.</strong> Every physical entropy source has bias, correlation, and non-stationarity. Conditioning is not optional.</p>
<p><strong>The hybrid architecture won.</strong> TRNG seeds CSPRNG. You get genuine entropy for the seed and computational speed for bulk output. This is Linux, Windows, Intel, ARM — everyone.</p>
<p><strong>Never trust a single source.</strong> The AMD RDRAND bug, Dual_EC_DRBG, and environmental manipulation attacks all prove this. Mix sources. XOR can only help.</p>
<p><strong>Statistical tests cannot prove randomness.</strong> They detect non-randomness. Passing all tests is necessary but not sufficient. AES-CTR output passes everything but is deterministic.</p>
<p><strong>Standards disagree on philosophy.</strong> NIST says &quot;show me it looks random.&quot; BSI says &quot;explain to me why it's random.&quot; Best practice: satisfy both.</p>
<p><strong>The deepest randomness is certifiable.</strong> Device-independent QRNGs use Bell violations to prove randomness without trusting the device. This is the theoretical endpoint of the field.</p>
<p><em>Further reading: NIST SP 800-90A/B/C, BSI AIS 31, Killmann and Schindler &quot;A Proposal for Functionality Classes for Random Number Generators&quot; (2011), Herrero-Collantes and Garcia-Escartin &quot;Quantum Random Number Generators&quot; (Rev. Mod. Phys. 2017), Ma et al. &quot;Quantum Random Number Generation&quot; (npj Quantum Information 2016)</em></p>
]]></content:encoded>
    </item>
    <item>
      <title>Deploy a Website</title>
      <link>https://timbeach.com/a/deploy-a-website/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/deploy-a-website</guid>
      <pubDate>Sun, 28 Sep 2025 00:00:00 +0000</pubDate>
      <description></description>
      <content:encoded><![CDATA[<p>This document outlines the complete process used to deploy Mason Borchard's personal website from development to production on the internet.</p>
<p><img src="../pix/moon-man.jpeg" alt="Moon Man" /></p>
<h2>Overview</h2>
<p>This guide covers deploying a static HTML website using a VPS (Virtual Private Server), custom domain, and nginx web server. The process involves server setup, domain configuration, DNS management, web server configuration, and security considerations.</p>
<h2>Step 1: VPS Setup</h2>
<h3>Choosing a VPS Provider</h3>
<ul>
<li><strong>Provider</strong>: Vultr (vultr.com)</li>
<li><strong>Plan</strong>: Basic/entry-level VPS instance</li>
<li><strong>Specifications</strong>:
<ul>
<li>1 vCPU</li>
<li>1GB RAM</li>
<li>25GB SSD storage</li>
<li>1TB bandwidth</li>
</ul>
</li>
<li><strong>Operating System</strong>: Debian 12 (recommended for stability)</li>
<li><strong>Cost</strong>: ~$5-6/month</li>
<li>Add ssh keys to vultr and attach to instance before deploying it so you can connect easily later</li>
</ul>
<h2>Step 2: Domain Registration and DNS Configuration</h2>
<h3>Domain Registration</h3>
<ul>
<li><strong>Registrar</strong>: Any reputable domain registrar (epik.com)</li>
<li><strong>Domain</strong>: masonborchard.com</li>
<li><strong>Cost</strong>: ~$10-15/year for .com domain</li>
</ul>
<h3>DNS Record Configuration</h3>
<p>Configure the following DNS records in your domain registrar's control panel:</p>
<pre><code>Type    Name    Value                   TTL
A       @       YOUR_VPS_IPV4_ADDRESS   30
A       www     YOUR_VPS_IPV4_ADDRESS   30
AAAA    @       YOUR_VPS_IPV6_ADDRESS   30
AAAA    www     YOUR_VPS_IPV6_ADDRESS   30
</code></pre>
<p><strong>Notes:</strong></p>
<ul>
<li><code>@</code> represents the root domain (masonborchard.com) -&gt; the @ you can leave out as blank works with Epik</li>
<li><code>www</code> creates the www subdomain (www.masonborchard.com)</li>
<li>A records point to IPv4 addresses</li>
<li>AAAA records point to IPv6 addresses</li>
<li>TTL of 30 seconds allows for quick DNS updates during setup</li>
</ul>
<h2>Step 3: Web Server Installation and Configuration</h2>
<h3>Install nginx</h3>
<pre><code class="language-bash"># Install nginx web server
sudo apt install nginx -y

# Start and enable nginx
sudo systemctl start nginx
sudo systemctl enable nginx

# Verify nginx is running
sudo systemctl status nginx
</code></pre>
<h3>Create Website Directory Structure</h3>
<pre><code class="language-bash"># Create directory for the website
sudo mkdir -p /var/www/masonborchard.com

# Set appropriate permissions
sudo chmod -R 755 /var/www/masonborchard.com
</code></pre>
<h3>Upload Website Files</h3>
<pre><code class="language-bash"># Copy your index.html to the web directory via rsync or w/e
# Or create a quick &quot;hello world&quot; index.html
vim /var/www/masonborchard.com/index.html
</code></pre>
<h3>Configure nginx Virtual Host</h3>
<p>Create nginx configuration file:</p>
<pre><code class="language-bash">sudo vim /etc/nginx/sites-available/masonborchard.com
</code></pre>
<p>Add the following configuration:</p>
<pre><code class="language-nginx">server {
    listen 80;
    listen [::]:80;

    server_name masonborchard.com www.masonborchard.com;

    root /var/www/masonborchard.com;
    index index.html index.htm;

    location / {
        try_files $uri $uri/ =404;
    }

    # Security headers
    add_header X-Frame-Options &quot;SAMEORIGIN&quot; always;
    add_header X-XSS-Protection &quot;1; mode=block&quot; always;
    add_header X-Content-Type-Options &quot;nosniff&quot; always;
    add_header Referrer-Policy &quot;no-referrer-when-downgrade&quot; always;

    # Cache static assets
    location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
        expires 1y;
        add_header Cache-Control &quot;public, immutable&quot;;
    }
}
</code></pre>
<p>Enable the site:</p>
<pre><code class="language-bash"># Create symbolic link to enable site
sudo ln -s /etc/nginx/sites-available/masonborchard.com /etc/nginx/sites-enabled/

# Remove default nginx site
sudo rm /etc/nginx/sites-enabled/default

# Test nginx configuration
sudo nginx -t

# Reload nginx
sudo systemctl reload nginx
</code></pre>
<h2>Step 4: Firewall Configuration</h2>
<h3>Configure UFW (Uncomplicated Firewall)</h3>
<pre><code class="language-bash"># Install UFW if not already installed
sudo apt install ufw -y

# Set default policies
sudo ufw default deny incoming
sudo ufw default allow outgoing

# Allow SSH (important - don't lock yourself out!)
sudo ufw allow ssh

# Allow HTTP and HTTPS traffic
sudo ufw allow 'Nginx Full'

# Enable firewall
sudo ufw enable

# Check firewall status
sudo ufw status verbose
</code></pre>
<h2>Step 5: SSL Certificate Setup (Optional but Recommended)</h2>
<h3>Install Certbot for Let's Encrypt SSL</h3>
<pre><code class="language-bash"># Install certbot with nginx plugin via apt
sudo apt install certbot python3-certbot-nginx -y

# Obtain SSL certificate (make sure your domain is already pointing to your server)
sudo certbot --nginx -d masonborchard.com -d www.masonborchard.com

# Test automatic renewal
sudo certbot renew --dry-run
</code></pre>
<p><strong>Important Prerequisites for Certbot:</strong></p>
<ol>
<li><strong>DNS must be working</strong>: Your domain must already be pointing to your server and resolving correctly</li>
<li><strong>HTTP must be accessible</strong>: Your nginx site must be working on port 80 before running certbot</li>
<li><strong>Firewall must allow HTTP/HTTPS</strong>: Ensure ports 80 and 443 are open</li>
</ol>
<p><strong>How Certbot Works:</strong></p>
<ol>
<li>Certbot creates temporary files in your web directory to verify domain ownership</li>
<li>Let's Encrypt servers access these files via HTTP to confirm you control the domain</li>
<li>Once verified, certbot downloads the SSL certificates</li>
<li>The <code>--nginx</code> flag automatically updates your nginx configuration to use HTTPS</li>
<li>Certbot sets up automatic renewal via systemd timer</li>
</ol>
<p><strong>If Certbot Fails:</strong></p>
<ul>
<li>Verify domain resolution: <code>dig masonborchard.com</code> should return your server IP</li>
<li>Test HTTP access: <code>curl -I http://masonborchard.com</code> should return a 200 response</li>
<li>Check nginx logs: <code>sudo tail /var/log/nginx/error.log</code></li>
<li>Ensure no other services are using port 80</li>
</ul>
<p>This will automatically:</p>
<ul>
<li>Obtain SSL certificates from Let's Encrypt</li>
<li>Update nginx configuration to use HTTPS and redirect HTTP to HTTPS</li>
<li>Set up automatic certificate renewal (certificates expire every 90 days)</li>
</ul>
<h2>Step 6: Verification and Testing</h2>
<h3>Test Website Accessibility</h3>
<ol>
<li>
<p><strong>DNS Propagation</strong>: Use tools like <code>dig</code> or online DNS checkers</p>
<pre><code class="language-bash">dig masonborchard.com
dig www.masonborchard.com
</code></pre>
</li>
<li>
<p><strong>HTTP Response</strong>: Test with curl</p>
<pre><code class="language-bash">curl -I http://masonborchard.com
curl -I https://masonborchard.com  # if SSL configured
</code></pre>
</li>
<li>
<p><strong>Browser Testing</strong>: Visit the domain in multiple browsers</p>
</li>
</ol>
<h3>Performance and Security Testing</h3>
<ul>
<li><strong>GTmetrix</strong> or <strong>PageSpeed Insights</strong>: Test loading performance</li>
<li><strong>SSL Labs</strong>: Test SSL configuration (if HTTPS enabled)</li>
<li><strong>Security Headers</strong>: Check security header implementation</li>
</ul>
<h2>Step 7: Ongoing Maintenance</h2>
<h3>Regular Tasks</h3>
<ul>
<li><strong>System Updates</strong>: <code>sudo apt update &amp;&amp; sudo apt upgrade</code></li>
<li><strong>Log Monitoring</strong>: Check nginx logs in <code>/var/log/nginx/</code></li>
<li><strong>SSL Renewal</strong>: Automated via certbot, but monitor for issues</li>
<li><strong>Backup</strong>: Regular backups of website files and server configuration</li>
</ul>
<h3>Monitoring</h3>
<pre><code class="language-bash"># Check nginx status
sudo systemctl status nginx

# View nginx access logs
sudo tail -f /var/log/nginx/access.log

# View nginx error logs
sudo tail -f /var/log/nginx/error.log

# Check server resources
htop
df -h
</code></pre>
<h2>Cost Breakdown</h2>
<ul>
<li><strong>VPS</strong>: ~$5-6/month</li>
<li><strong>Domain</strong>: ~$10-15/year</li>
<li><strong>SSL Certificate</strong>: Free (Let's Encrypt)</li>
<li><strong>Total Annual Cost</strong>: ~$75-90/year</li>
</ul>
<h2>Troubleshooting Common Issues</h2>
<h3>DNS Not Resolving</h3>
<ul>
<li>Check DNS record configuration in registrar panel</li>
<li>Wait for DNS propagation (up to 48 hours) but it usually only takes a few minutes</li>
<li>Use DNS checker tools online</li>
</ul>
<h3>Website Not Loading</h3>
<ul>
<li>Verify nginx is running: <code>sudo systemctl status nginx</code></li>
<li>Check nginx configuration: <code>sudo nginx -t</code></li>
<li>Review nginx error logs: <code>sudo tail /var/log/nginx/error.log</code></li>
</ul>
<h3>SSL Certificate Issues</h3>
<ul>
<li>Ensure domain points to server before running certbot</li>
<li>Check firewall allows HTTP/HTTPS traffic</li>
<li>Verify nginx configuration is correct</li>
</ul>
<p>This deployment process provides a robust, scalable foundation for hosting static websites with professional-grade infrastructure and security.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Install Signal Desktop on Aegix Linux</title>
      <link>https://timbeach.com/a/install-signal-on-aegix/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/install-signal-on-aegix</guid>
      <pubDate>Tue, 19 Aug 2025 00:00:00 +0000</pubDate>
      <description></description>
      <content:encoded><![CDATA[<pre><code class="language-bash">yay -S signal-desktop --noconfirm
</code></pre>
<p>Launch the app in a terminal with:</p>
<pre><code class="language-bash">signal-desktop
</code></pre>
<p>Or use <code>Mod + d</code> and start typing signal-desktop to launch it via dmenu.</p>
<p>Notice the QR code.</p>
<p>Go to the Signal app on your phone and find Settings.</p>
<p>Tap &quot;Linked devices&quot;</p>
<p>Tap &quot;Link a new device&quot;</p>
<p>This will open up your camera.</p>
<p>Scan the QR code to link your device.</p>
<p>😘</p>
]]></content:encoded>
    </item>
    <item>
      <title>How tmux Works</title>
      <link>https://timbeach.com/a/how-tmux-works/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/how-tmux-works</guid>
      <pubDate>Fri, 01 Aug 2025 00:00:00 +0000</pubDate>
      <description></description>
      <content:encoded><![CDATA[<h2>🧠 How tmux Works</h2>
<p><code>tmux</code> is a <strong>terminal multiplexer</strong> — it lets you:</p>
<ul>
<li>Start a terminal session that <strong>stays alive even if you disconnect</strong> (like over SSH)</li>
<li><strong>Split your terminal</strong> into multiple panes and windows</li>
<li><strong>Switch between tasks</strong> or commands without opening new terminals</li>
<li><strong>Reattach</strong> to sessions later</li>
</ul>
<h2>⚙️ Basic Concepts</h2>
<ul>
<li><strong>Session</strong>: A named (or unnamed) workspace. Think of it like a virtual terminal container.</li>
<li><strong>Window</strong>: Like a tab in a terminal, inside a session.</li>
<li><strong>Pane</strong>: A split view within a window (horizontal/vertical).</li>
</ul>
<h2>🚀 Using <code>tmux</code> with Explicit Session Names</h2>
<h3>✅ Start a session with a name</h3>
<pre><code class="language-bash">tmux new-session -s timothason
</code></pre>
<p>This creates a new tmux session named <code>mysession</code> and attaches you to it.</p>
<h3>🔄 Attach to a named session</h3>
<pre><code class="language-bash">tmux attach-session -t timothason 
# or tmux a -t timothason
</code></pre>
<h3>📋 List all sessions</h3>
<pre><code class="language-bash">tmux ls
</code></pre>
<h3>🧯 Kill a session</h3>
<pre><code class="language-bash">tmux kill-session -t mysession
</code></pre>
<h2>⌨️ Inside tmux: Common Controls</h2>
<p>All shortcuts use the <code>prefix</code> key, which is <code>Ctrl+b</code> by default</p>
<pre><code class="language-bash">| Action             | Key sequence             |
| ------------------ | ------------------------ |
| New window         | `Ctrl+b`, then `c`       |
| Next window        | `Ctrl+b`, then `n`       |
| Split vertically   | `Ctrl+b`, then `&quot;`       |
| Split horizontally | `Ctrl+b`, then `%`       |
| Move between panes | `Ctrl+b`, then arrow key |
| Detach             | `Ctrl+b`, then `d`       |
</code></pre>
<p>You can <strong>detach</strong> from a session and leave it running, then <strong>reattach</strong> later.</p>
<h2>✅ Tips</h2>
<ul>
<li>Use <strong>one session per project</strong> or task (e.g. <code>tmux new -s rails</code>).</li>
<li>You can <strong>script tmux</strong> to auto-start with custom panes/windows.</li>
<li>Tmux works great with <strong>remote servers</strong> to avoid losing work if disconnected.</li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title>Adding a Second Aegix User</title>
      <link>https://timbeach.com/a/second-aegix-user/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/second-aegix-user</guid>
      <pubDate>Wed, 30 Jul 2025 00:00:00 +0000</pubDate>
      <description></description>
      <content:encoded><![CDATA[<p>Let's say we want to create a secondary user on an <a href="https://aegixlinux.org">Aegix Linux</a> system. For this example the user we created during the installation process is called <code>borchard</code> and the secondary user we want to create will be called <code>timothy</code>.</p>
<h2>1. First, check what groups &quot;borchard&quot; belongs to:</h2>
<pre><code class="language-bash">groups borchard
</code></pre>
<p>or</p>
<pre><code class="language-bash">id borchard
</code></pre>
<h2>2. Create the timothy user with home directory and zsh shell:</h2>
<pre><code class="language-bash">sudo useradd -m -s /bin/zsh timothy
</code></pre>
<h2>3. Add timothy to the wheel group (most important for sudo access):</h2>
<pre><code class="language-bash">sudo usermod -aG wheel timothy
</code></pre>
<h2>4. Set a password for timothy:</h2>
<pre><code class="language-bash">sudo passwd timothy
</code></pre>
<h2>5. Copy the group memberships from borchard to timothy:</h2>
<p>You can do this automatically with:</p>
<pre><code class="language-bash">sudo usermod -G $(id -Gn borchard | tr ' ' ',') timothy
</code></pre>
<h2>6. Create the essential directories that Aegix expects:</h2>
<pre><code class="language-bash">sudo -u timothy mkdir -p /home/timothy/{Downloads,Documents,Pictures,Music,Videos/obs,code,ss,Applications/vs-code-insider}
sudo -u timothy mkdir -p /home/timothy/.cache/zsh/
sudo -u timothy mkdir -p /home/timothy/.config/{abook,mpd/playlists}
sudo -u timothy mkdir -p /home/timothy/.local/src
</code></pre>
<h2>7. Copy the Aegix dotfiles configuration:</h2>
<p>Since Aegix uses the &quot;gohan&quot; dotfiles, you'll want to copy the configuration:</p>
<pre><code class="language-bash">sudo cp -r /home/borchard/.config /home/timothy/
sudo cp -r /home/borchard/.local /home/timothy/
sudo cp /home/borchard/.* /home/timothy/ 2&gt;/dev/null || true
sudo chown -R timothy:wheel /home/timothy
</code></pre>
<h2>8. Set up vim/neovim plugins for timothy:</h2>
<pre><code class="language-bash">sudo -u timothy mkdir -p /home/timothy/.config/nvim/autoload
sudo -u timothy curl -Ls &quot;https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim&quot; &gt; /home/timothy/.config/nvim/autoload/plug.vim
sudo -u timothy nvim -c &quot;PlugInstall|q|q&quot;
</code></pre>
<h2>9. Verify the setup:</h2>
<pre><code class="language-bash"># Check groups
groups timothy

# Check home directory
ls -la /home/timothy

# Test switching to the user
su - timothy
</code></pre>
<p>The new timothy user should now have:</p>
<ul>
<li>A home directory with the standard Aegix directory structure</li>
<li>The same group memberships as borchard (including wheel for sudo access)</li>
<li>The Aegix dotfiles and configurations</li>
<li>zsh as the default shell</li>
<li>Neovim with plugins installed</li>
</ul>
<p>You can now log in as timothy or switch to that user with <code>su - timothy</code>.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Parsimony and Aegix Linux</title>
      <link>https://timbeach.com/a/parsimony/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/parsimony</guid>
      <pubDate>Tue, 29 Jul 2025 00:00:00 +0000</pubDate>
      <description></description>
      <content:encoded><![CDATA[<p><strong>Parsimony</strong> refers to simplicity or frugality in design—favoring the fewest necessary components or complexities. In software engineering, it embodies minimalism, efficiency, and clarity, where complexity is deliberately avoided unless justified by necessity.</p>
<p>Aegix Linux exemplifies parsimony by employing a streamlined approach to its architecture and user experience. Built upon Artix Linux and utilizing the lightweight <strong>Runit</strong> init system instead of the more complex systemd, Aegix emphasizes performance, simplicity, and user control. By reducing dependencies, avoiding unnecessary layers, and adhering to straightforward POSIX-compliant scripting, Aegix Linux provides users with a clean, efficient operating environment that embodies the very principle of parsimony.</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Add New Articles to timbeach.com</title>
      <link>https://timbeach.com/a/add-articles/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/add-articles</guid>
      <pubDate>Tue, 29 Jul 2025 00:00:00 +0000</pubDate>
      <description></description>
      <content:encoded><![CDATA[<p>This site uses a custom, lightweight article system that makes it easy to add new content without any complex build processes or databases.</p>
<h2>Use This System for Your Own Site</h2>
<p>Want to build your own website with this article system? The complete source code is available on GitHub at <a href="https://github.com/timbeach/timbeach.com">https://github.com/timbeach/timbeach.com</a>. You can fork the repository and customize it for your own content while keeping the parsimonious design philosophy intact.</p>
<h2>How It Works</h2>
<p>The system consists of two simple components:</p>
<ol>
<li><strong>Markdown files</strong> - Your actual article content</li>
<li><strong>JSON metadata</strong> - Article information like title, date, and tags</li>
</ol>
<h2>Adding a New Article</h2>
<h3>Step 1: Create the Markdown File</h3>
<p>Create a new markdown file in the <code>articles/</code> directory:</p>
<pre><code class="language-bash"># Example: articles/my-new-article.md
echo &quot;# My New Article&quot; &gt; articles/my-new-article.md
</code></pre>
<p>Write your article content using standard markdown syntax:</p>
<pre><code class="language-markdown"># My New Article

This is my new article content.
</code></pre>
<h2>Features</h2>
<ul>
<li><strong>Code blocks</strong> work perfectly</li>
<li><strong>Bold</strong> and <em>italic</em> text</li>
<li><a href="https://example.com">Links</a> to external sites</li>
</ul>
<h2>Code Example</h2>
<pre><code class="language-bash"># This is a comment
echo &quot;Hello, World!&quot;
</code></pre>
<p>The system supports all standard markdown features!</p>
<h3>Step 2: Add Metadata to JSON</h3>
<p>Add an entry to <code>articles/articles.json</code>:</p>
<pre><code class="language-json">{
  &quot;my-new-article.md&quot;: {
    &quot;title&quot;: &quot;My New Article&quot;,
    &quot;date&quot;: &quot;2025-07-29&quot;,
    &quot;tags&quot;: [&quot;tutorial&quot;, &quot;example&quot;, &quot;markdown&quot;]
  }
}
</code></pre>
<h3>Step 3: That's It!</h3>
<p>The article will automatically appear in the articles list. No build process, no database, no complex CMS - just files and JSON.</p>
<h2>System Features</h2>
<h3>Automatic Loading</h3>
<ul>
<li>Articles load from markdown files when available</li>
<li>Falls back to built-in content if files aren't accessible</li>
<li>No server-side processing required</li>
</ul>
<h3>Markdown Support</h3>
<ul>
<li>Full markdown syntax support</li>
<li>Code blocks with language highlighting</li>
<li>Links, images, and formatting</li>
<li>Lists, tables, and more</li>
</ul>
<h3>Simple Maintenance</h3>
<ul>
<li>Version control friendly (just text files)</li>
<li>Easy to backup and restore</li>
<li>No database migrations or complex deployments</li>
</ul>
<h2>File Structure</h2>
<pre><code>timbeach.com/
├── articles/
│   ├── articles.json          # Article metadata
│   ├── my-article.md          # Article content
│   └── another-article.md     # More articles...
└── index.html                 # The main site
</code></pre>
<h2>Benefits of This Approach</h2>
<ul>
<li><strong>Simplicity</strong> - Just markdown and JSON</li>
<li><strong>Performance</strong> - Static files load fast</li>
<li><strong>Reliability</strong> - No database dependencies</li>
<li><strong>Portability</strong> - Easy to move or backup</li>
<li><strong>Version Control</strong> - Text files work great with git</li>
</ul>
<h2>Advanced Features</h2>
<h3>Terminal Integration</h3>
<p>The site features a terminal-style navigation system with commands:</p>
<ul>
<li><code>ls</code> - List articles and directories</li>
<li><code>cd articles</code> - Navigate to articles directory</li>
<li><code>cat filename.md</code> - Display article content</li>
<li><code>tree</code> - Show directory structure with articles sorted by date</li>
<li><code>help</code> - Show all available commands</li>
</ul>
<h3>Dynamic Loading System</h3>
<p>The JavaScript implementation includes:</p>
<ul>
<li><strong>Graceful fallback</strong> - If external files fail to load, built-in content is displayed</li>
<li><strong>Cache busting</strong> - Timestamp parameters prevent browser caching issues</li>
<li><strong>Smooth transitions</strong> - Content fades in/out during navigation</li>
<li><strong>Direct linking</strong> - URLs like <code>#articles/filename.md</code> work for sharing specific articles</li>
</ul>
<h3>Markdown Parser</h3>
<p>The custom markdown parser handles:</p>
<ul>
<li>Headers (H1, H2, H3)</li>
<li>Code blocks with language highlighting</li>
<li>Inline code formatting</li>
<li>Bold and italic text</li>
<li>Links with target=&quot;_blank&quot;</li>
<li>Paragraph wrapping</li>
<li>Preserves formatting within code blocks</li>
</ul>
<h3>Search Functionality</h3>
<p>When viewing the articles directory:</p>
<ul>
<li>Real-time search by title or filename</li>
<li>Case-insensitive matching</li>
<li>Instant filtering of article list</li>
</ul>
<h2>Technical Implementation Details</h2>
<h3>Data Flow</h3>
<ol>
<li><strong>Page Load</strong>: JavaScript fetches <code>articles/articles.json</code></li>
<li><strong>Article Request</strong>: When user clicks an article, JavaScript fetches the <code>.md</code> file</li>
<li><strong>Parsing</strong>: Custom markdown parser converts content to HTML</li>
<li><strong>Display</strong>: Content appears with terminal-style navigation</li>
</ol>
<h3>Error Handling</h3>
<ul>
<li><strong>Network failures</strong>: Falls back to built-in article content</li>
<li><strong>Missing files</strong>: Shows &quot;Article Not Found&quot; message with error details</li>
<li><strong>JSON parse errors</strong>: Gracefully handles malformed metadata</li>
</ul>
<h3>Performance Optimizations</h3>
<ul>
<li><strong>Lazy loading</strong>: Articles only load when requested</li>
<li><strong>Minimal dependencies</strong>: No external JavaScript libraries</li>
<li><strong>Efficient caching</strong>: Browser caches static files naturally</li>
<li><strong>Small footprint</strong>: Entire site is a single HTML file + articles</li>
</ul>
<h2>File Naming Conventions</h2>
<p>Use lowercase with hyphens for readability:</p>
<ul>
<li>✅ <code>my-article-title.md</code></li>
<li>✅ <code>linux-tutorial.md</code></li>
<li>❌ <code>MyArticleTitle.md</code></li>
<li>❌ <code>my_article_title.md</code></li>
</ul>
<h2>Deployment</h2>
<p>The deployment is equally simple:</p>
<pre><code class="language-bash">./deploy.sh
</code></pre>
<p>This rsync script pushes all changes to the production server, excluding <code>.git/</code>, <code>archive/</code>, and <code>.well-known/</code> directories.</p>
<p>This system proves that you don't need complex tools to create a beautiful, functional website. Sometimes the simplest solution is the best solution - and this custom article system exemplifies the philosophy of parsimony in web development.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Simplicity in Software Engineering</title>
      <link>https://timbeach.com/a/simplicity/</link>
      <guid isPermaLink="false">https://timbeach.com/#/article/simplicity</guid>
      <pubDate>Fri, 10 Jan 2025 00:00:00 +0000</pubDate>
      <description></description>
      <content:encoded><![CDATA[<p>Simplicity is the cornerstone of effective software engineering. It leads to code that is easier to understand, maintain, and debug. By embracing straightforward logic, reducing unnecessary complexity, and adhering to well-defined standards, developers create software that's resilient and adaptable.</p>
<p>At its heart, simplicity respects the user's and developer's time and attention, focusing efforts on clarity and essential functionality. Whether through minimal dependencies, clear documentation, or intuitive design, prioritizing simplicity results in robust, elegant software solutions that endure.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
