Notes on enginering leadership and software development.

#coding

2025

2024

2023

2022


Daily Notes

  • May 24th:

    Using Fish shell with Pure? Don't forget `fish-async-prompt`

    I've used Tide for a long time, but it spams my fish_variables.fish on every command, and I didn't want to deal with that in dotfiles. So I switched to pure-fish/pure, and that got annoying quickly, because the git prompt pieces are slow to render.

    So heads up — you're supposed to install fish-async-prompt to go with that, it makes things show up instantly.

    Here's my current plugin list anyway:

    jorgebucaran/fisher
    jorgebucaran/nvm.fish
    jethrokuan/z
    pure-fish/pure
    acomagu/fish-async-prompt
    patrickf1/fzf.fish
  • January 29th:

    Back to Swift on Server things

    Got a few new PRs merged into Swift-NIO! It feels so great when folks say thank you 🖤

  • January 10th:

    Counterscale supports `pushState` now

    @benvinegar's Counterscale supports SPA push state apps now! I've set it up for respawn.io, and unless I messed it up, I'll public analytics dashboard in a couple of weeks.

  • December 31st:

    TIL `npx concurrently`

    Was writing a few posts this week, and finally got tired of running contentlayer2 dev and next dev in two split panes.

    So, I added a new script to package.json:

    {
      "scripts": {
        "dev": "pnpm run contentlayer dev --parallel 'next dev'"
      }
    }

    Was really tempting to bring Overmind from my Rails days, but this works.

  • December 2nd:

    Advent of Code 2023, in Swift!

    There's a reason you stick with Python for Leetcode-style problems. And yet, I was itching to learn more Swift, so I'll do Advent of Code this year. In Swift!

    Here's the repo.

  • November 19th:

    Contentlayer supports markdown and even MDX formatting in the frontmatter fields of your documents, as long as you specify the field type as mdx or markdown.

    The tricky part is that:

    • markdown fields give you raw HTML code. You'd have to wrap it in __dangerouslySetHTML or something.
    • mdx gives you the code that you have to pass into useMDXComponent to render.
    • Either way, you have to decide where to allow markdown formatting and where to strip it.

    I've just implemented it for the blog here:

    • Posts lists gets new PostDescription component that renders MDX-processed post description.
    • Post metadata and RSS gets raw description, implemented in a little custom field on Contentlayer that strips formatting.
  • July 18th:

    TIL there are beforeprint and afterprint events on window in Javascript, so you can manipulate the DOM to make the print version look nicer beyond what you can do with print styles in CSS.

    Especially helpful to hide a 3rd-party iframe (in our case, Intercom widget) that otherwise caused the printed page to overflow horizontally.