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

DailyBrief: a personal AI advisor on the desktop with PowerShell
A 391 MB digest, a mojibake fix that never worked, and a 30k-token baseline cut to 1.2k: the real bugs behind DailyBrief, a desktop AI advisor built on PowerShell and a headless Claude CLI.
In short
- The unit of planning is the project, not the folder: a registry rebuilt every 30 minutes with no AI involved.
- Scripts gather and compress activity into a small digest, the model returns a small JSON patch, and a script applies it.
- A stripped claude -p session cut the recorded per-call baseline from about 30k tokens to about 1.2k.
#ai#powershell#electron#claude
·10 min read

DiskDesk: a Windows desktop on any drive, built with Python and COM
A second Windows desktop on any drive, built by calling the shell instead of imitating it. The hard parts: context menus that came up empty, and an updater that must never ask a question.
In short
- Wherever Windows already has an API, DiskDesk calls it: context menus, thumbnails, file operations and the clipboard all go through the shell.
- Real context menus need IContextMenu2 and IContextMenu3, which pywin32 does not expose, so shellmenu.py calls raw vtable slots through ctypes and forwards menu messages from a hidden window.
- The folder menu and the real desktop's own entries are merged, and folder-scoped verbs come only from the DiskDesk folder so Paste never hits the real Desktop.
#python#windows#qt#com
·11 min read

Light Browser: a native C++ browser shell on WebView2 and WebKitGTK
A small C++ browser on the system web engine. One bad parser branch took 215 sites offline, and the fix shaped the whole blocker. Plus the OOM, antivirus and update bugs I hit.
In short
- Reusing the system web engine keeps the Windows exe near 2 MB (2,137,088 bytes in my last local build), but I only get the hooks WebView2 exposes.
- A parser branch I missed once took 215 sites offline. The fix, and the rule behind it, is that the blocker drops any rule it cannot honor exactly.
- Chromium's low-end mode saved RAM but killed Figma-class apps with out-of-memory crashes, so I removed it a day after adding it.
#cpp#webview2#webkitgtk#browser
·11 min read

Movix.ge: Token-Gated Streaming, Catalog Ingestion and Fast Search
I built a Netflix-style site for a Georgian audience, then lived with it: a token check that trusted one fixed address, an ISR experiment I reverted, and a service worker that reloaded the page in a loop.
In short
- Video URLs carry opaque, IP-bound tokens stored on the server, so sessions can be counted and revoked, at the cost of one database read per request. This is hotlink control, not DRM.
- The early token check read the client's own address header and also required one hard-coded address. I moved to the proxy's address and made the stored one the only rule.
- I tried ISR in April 2026, reverted it, and chose dynamic rendering because the language lives in a cookie.
#nextjs#postgresql#prisma#video-streaming
·9 min read

First-party analytics for a Next.js portfolio, built from scratch
First-party analytics for this portfolio: hashed visitors, no IPs on disk, MySQL because the host wipes the folder, and no third-party script left on the page.
In short
- The IP address is never stored. A visitor is a 16 character hash of IP, user agent and a random salt that is deleted after a day.
- The server derives identity, device and country itself, so a forged request cannot claim to be somebody else.
- Live visitors are held in memory for 60 seconds. Stored events go to MySQL in one batched insert every two seconds.
#nextjs#analytics#privacy#mysql
·13 min read

Custom Pterodactyl Yolks: Docker Images for Wings Containers
Images that build but will not start under Wings: file capabilities, a banner that gets executed, a container that never exits. How I found each one and made CI boot every yolk the way Wings does.
In short
- Wings runs containers as uid 988, so every image creates a matching container user and keeps all data under /home/container.
- Binaries with the capnetbindservice file capability fail to exec under Wings, so the images rewrite the files to drop it.
- Each pterodactyl- repo has a CI job that boots the image with Wings' uid and dropped capabilities, and publishes only if the service answers.
#pterodactyl#docker#wings#devops
·10 min read

Renode Starter Templates: Deploy Node and Python Apps With No Setup
Six public starters for the Renode hosting platform, built around one contract: SERVER_PORT, a start script that works alone, pinned runtimes and secrets kept out of git.
In short
- The contract has four rules: bind 0.0.0.0 on SERVERPORT, expose a no-argument start command, pin the runtime, keep secrets out of git.
- The Next.js start script runs next build first, because the panel only runs npm run start and next start fails without a build.
- A missing bot token stops the process with a clear message, so the console explains the failure in the first second.
#renode#hosting#nodejs#python
·10 min read

Building a Windows memory scanner in Python with ctypes and NumPy
Unfair is a Windows memory scanner in one Python file. The hard parts were not the Win32 calls: they were narrowing 5,827 candidates to one, guarding a tool that can write to any process, and shipping it as an elevated exe.
In short
- One scan proves little: searching for 100 returns thousands of addresses, and two or three rescans after the value changes usually leave a handful.
- Only committed, unguarded, writable private or image regions are read, which shrinks the work a lot compared with the whole address space.
- Unknown-value scans snapshot every eligible region and filter with NumPy, at the cost of up to hundreds of MB, then fall back to a cheap address list under two million survivors.
#python#ctypes#windows#numpy