Welcome!

My repository of things I've learned. Mostly programming related. Part microblog, part knowledge base, part digital garden. If you like this, you might enjoy my blog.

72 TILs so far!

Recent TILs

  • caddy

    Run an HTTPS reverse proxy for local development

    Really the title should be something like "run an SSL-terminating reverse proxy", but most of the resources on the subject talk about using "HTTPS for local development", so here we are.

  • git

    Add a Git hook on Windows

    Git Hooks are scripts that Git runs for you when certain actions occur.

  • windows

    Create a file without an extension

    I was trying to save a file without an extension from Notepad. For some reason, even if I removed the extension from the filename and selected "All files", it still saved as a .txt.

  • git

    Add a global .gitignore

    If you use git on a Mac, chances are you've accidentally committed a .DS_Store to a repo. I used to reflexively add .DS_Store to all my .gitignore files to avoid ever repeating that mistake.

  • valibot

    Parse a Date or string into a Date

    One common pattern with TypeScript projects is using a validation library like Valibot to validate incoming data at points of ingress to your application. (Intentionally or unintentionally, this is the "parse, don't validate" pattern, coined by Alexis King in her excellent blog post of the same name.)

  • fzf

    Make a TUI for switching and deleting git branches

    Is dealing with git branches annoying to anyone else? There's a lot of typing long branch names, especially if you're cleaning up a bunch of old branches at oncex.

  • typescript

    Add custom element to JSX.IntrinsicElements

    As of version 19, React supports custom elements!

  • html

    Define a custom element

    I've been using web components for a bit, and I've accrued a bit of code I generally use as a base for my custom elements. "Boilerplate" has a negative connotation, so let's just call it a "web component starter kit".

  • javascript

    Programmatically create SVG elements

    This is simple, but it tripped me up for a bit. TL;DR you can't do this:

  • css

    Anchor scroll position to the bottom

    Recently, I was building a vertical "timeline" for an explorable explanation, in which new elements would be added below any existing ones. As elements were added, I wanted the scroll position anchored to the bottom of the timeline, as it would be in a chat app.