RSSAmplifier

Blog

The Hack Job Handbook

A blog about hacking, programming, and other tech stuff.

nihilok.github.ioRSS feed ↗10 posts

Latest posts

Your Agent Doesn't Need a README

Your AI agent is reading your README right now. It’s on paragraph three of the “Getting Started” section, trying to figure out whether npm run dev or make dev is the current way to start the project. It will get there eventually. That’s the problem. We write READMEs for humans. Structured headings, prose explanations, code blocks with context. A human reads “To run the tests, use cargo test…

How I Gave Claude Code a Deterministic Toolbox (and Stopped It Guessing How to Run My Project)

If you’ve spent any real time pairing with Claude Code, you’ve seen the dance. You ask it to run the tests. It reads your README. Maybe it finds a Makefile , maybe a package.json , maybe a scripts/ directory. It tries make test . That fails. It tries npm test . Wrong project. It cat s your Makefile, parses the targets, picks one, runs it with the wrong arguments. Three tool calls and 2,000 tokens…

Integration Test Isolation in a Next.js App with Drizzle ORM

1. Introduction: The Complexity of Modern Integration Testing The evolution of web application architecture has precipitously increased the complexity of ensuring software quality. In the era of the monolithic, server-rendered application—typified by frameworks such as Ruby on Rails or early ASP.NET—testing strategies were relatively straightforward. The application ran in a single process,…

Why I Built Another Task Runner

Yes, I know. Another task runner. In 2026. Let me explain why. The Problem I’m not a Make expert. But somehow I became the person people ask when they need to add a task to our Makefile. Last week it was “How do I pass an environment variable to this target?” The week before: “Why does this only work if I add a tab character?” And the week before that it was me forgetting to add a task to .PHONY .…

Offline Encryption Using WebAuthn

I’ve been diving deep into browser-based cryptography lately, and implementing truly secure offline encryption is frustratingly complex. The core problem? Getting consistent key material across sessions without storing anything sensitive. After countless late nights of cursing at my keyboard, I stumbled upon an intriguing solution: using WebAuthn (e.g. those little USB security keys like YubiKey)…

Loading tmux when loading shell

This is something I’ve had mixed success with in the past. I’ve had things that worked but not quite in the way I wanted them to, and other things that just didn’t work! (Try sticking an exec before an error in .zshrc , and you’ve just nerfed your shell startup!) There are a few things we need to consider, e.g. Do we want the same session as last time? What if there is no session? Can we create a…

Server status monitor bash script

When managing multiple servers, keeping track of their availability is crucial. Building on an example from “Cybersecurity Ops with bash” by Paul Troncone, I’ve developed a bash script that provides a simple yet effective way to monitor server status across multiple hosts. Let’s break down how this script works and why it can be a valuable tool for system administrators. #!/usr/bin/env bash # For…

Global find and replace with bash

I’m working on a server migration script (watch this space) where I need to do a global find and replace in a bunch of files on a VPS (Virtual Private Server). I’m currently reading a bbok called “Cybersecurity Ops with bash” by Paul Troncone, which has been a great resource for learning bash scripting, and I found a solution in the book that I can use to do the global find and replace: find…

Server setup script

Building on a previous post , here is a script that automates the setup of a server. When setting up a new server there are several things that I either do by default (on autopilot) or I forget to do. This script installs and configures various components such as nginx , certbot for Let’s Encrypt SSL certificates, fail2ban , ufw , and more. It also provides an option to disable password…

Detecting a Loop

OpenAI’s o1-mini (coding/reasoning) model had this to say about detecting a loop in a 2D grid: To determine whether there’s a possible looping path in a 2D grid of MapPosition objects—where the loop can be any closed path (not necessarily a perfect rectangle or square) and may include branches or paths outside the loop—you’ll need to perform a more generalized cycle detection within the grid.…