27th August 2008 - Link Blog
Django snippets: Sign a string using SHA1, then shrink it using url-safe base65. I needed a way to create tamper-proof URLs and cookies by signing them, but didn’t want the overhead of a full 40 character SHA1 hash. After some experimentation, it turns out you can knock a 40 char hash down to 27 characters by encoding it using a custom base65 encoding which only uses URL-safe characters.
Recent articles
- New release of LLM adds support for reasoning traces, OpenAI Responses, server-side tools, and smarter logging - 4th August 2026
- Stateless MCP has recaptured my interest (and inspired mcp-explorer and datasette-mcp) - 31st July 2026
- OpenAI’s accidental cyberattack against Hugging Face is science fiction that happened - 22nd July 2026