Case studies
#powershell#debugging#windows#electron#docker#pterodactyl#python#csharp#wpf#bash#security#cpp#git#performance#ci#nodejs#pyside6#react-native
80 posts
·5 min read

DailyBrief's eval harness: real model runs on a data copy, judged by pure functions
I could not tell whether a prompt change improved the daily brief. The harness runs the real pipeline on a copy of my data and judges it with unit-tested checks, including one for terse caveman prose.
In short
- npm run eval runs the real pipeline against a temp copy of the user's data and judges the output with plain functions, so a prompt change can be measured instead of eyeballed.
- The judging code is pure and unit-tested; it checks the brief's shape, forbidden task titles, trend-only warnings, unknown task ids and terse "caveman" prose.
- The real data folder is only read, and a before/after fingerprint warns if anything in it changed during the run.
#testing#llm#evals#powershell#nodejs
·5 min read

A BEAM image for Pterodactyl: SIGTERM, stderr-only scripts, honest hints
The BEAM answers SIGINT with a BREAK menu and waits for a key. What the Elixir and Gleam yolk does about stop signals, stdout capture and Phoenix start-up hints.
In short
- The BEAM answers SIGINT with its interactive BREAK menu and waits for a key, so the image sets STOPSIGNAL SIGTERM and lets the VM run init:stop().
- Every message from the start scripts goes to stderr, because some entrypoints capture the startup command's stdout and execute it.
- The Phoenix hints were rewritten (01c2b8f) to say what the egg does, instead of pointing at a panel tab, and to name the real fix for websocket origins.
#docker#elixir#pterodactyl#signals#bash
·5 min read

TaskPad deadlines: why due:+3d becomes a date as you type, and date-only means 23:59:59
TaskPad draws due:2026-10-10 as a live countdown pill. Relative tokens like due:+3d are rewritten into absolute dates while typing, so a deadline never drifts, and date-only means the end of that day.
In short
- A due token holds only an absolute date or time; relative forms like due:+3d or due:friday are rewritten into dates when you press space or Enter, so a deadline cannot drift.
- Date-only means the end of that day (23:59:59), and the countdown is computed at draw time and refreshed by a 30 second timer.
- Scanning is kept cheap by a plain substring check for "due" before any regex runs, and the caret line shows raw text so editing stays possible.
#csharp#wpf#avalonedit#datetime#text-editor
·5 min read

Forgejo on a Pterodactyl panel: write app.ini once, then only sed what the panel owns
The Forgejo image for Pterodactyl generates app.ini on first start and afterwards rewrites only six keys the panel controls, so hand edits survive restarts and a failed admin setup retries.
In short
- forgejo-start writes app.ini only when it does not exist, with SQLite, built-in SSH off, install locked and freshly generated secrets.
- On every start it rewrites just six keys (port, bind address, ROOTURL, DOMAIN, registration switch, RUNUSER) with sed, so manual edits to the rest of the file survive.
- The administrator is created once, guarded by a marker file that is written only on success, so a failed attempt is retried on the next start.
#bash#docker#pterodactyl#forgejo#idempotency
·5 min read

DailyBrief's board file only grew, so I added a daily compactor that moves, never deletes
Every AI run in DailyBrief reads kanban.json, and that file only ever appended. A 169-line PowerShell script now moves old notes and finished tasks into an archive once a day, losslessly.
In short
- kanban.json was append-only, and every digest and AI check re-read all of it, so each run cost more than the last.
- core/compact-kanban.ps1 moves old aiNotes and tasks finished or deleted more than 30 days ago into kanban-archive.json, once a day, under the board lock.
- Nothing is deleted: items move whole with their comments and ids, the script is idempotent, and it writes the archive before it shrinks the board.
#powershell#electron#json#performance#data-retention
·5 min read

Putting Directus on a Pterodactyl panel: uid 1000, tini and a PUBLIC_URL
The official Directus image does not run on Wings as is. Node already owns uid 1000, the panel expands its own startup string, and PUBLIC_URL has to come from one domain field.
In short
- The official Directus image is reused as the base, because the npm package needs native builds of sharp and sqlite3 per platform, which the image already carries.
- Wings needs uid 1000 as a user named container, tini as PID 1, and a startup string it expands itself; the image reproduces all three.
- A start script turns panel variables into Directus settings, including building PUBLICURL from a domain, and a later commit renamed that variable to CMSDOMAIN.
#docker#pterodactyl#bash#directus
·5 min read

DiskDesk · Story
Two things my DiskDesk release workflow got wrong in its first hour
gh release create fails when the release already exists, and $env:ProgramFiles(x86) does not mean what it looks like in PowerShell. Two small CI fixes, 14 seconds apart.
In short
- The workflow ended with gh release create, which assumes the release does not exist yet; a tag pushed by hand or a rerun breaks that assumption.
- The Inno Setup path used $env:ProgramFiles(x86) in PowerShell, whose parentheses are not part of the variable name, so it needed braces.
- The fix is two small edits, but the version guard and the workflowdispatch split around them are what keep a release honest.
#github-actions#powershell#ci#windows
·5 min read

DailyBrief · Story
My workspace on G: was invisible to DailyBrief, and the fix exposed a 3 minute scan
Every scan root was hardcoded under the user profile, so a workspace on another drive never showed up. Making folders configurable meant fixing a walk that entered every node_modules first.
In short
- The scan roots were a hardcoded list of folders under %USERPROFILE%, so a workspace on another drive was invisible to every script.
- Get-ChildItem -Recurse entered every nodemodules and .git folder and filtered the results afterwards; the source comment in core/walk.ps1 puts that at three minutes per monitor run on G:\Desktop.
- A shared roots.ps1 now feeds every script, a pruned walk never enters dependency folders, and removing a folder no longer triggers a full rescan.
#powershell#filesystem#performance#electron