Notes on software engineering

Archive / page 18

341–360 of 550 posts, newest first.

  1. 2024
  2. Simplest possible OAuth authentication with Auth0

    Auth0 provides an authentication API which you can use to avoid having to deal with user accounts in your own web application.

    2 min read
  3. Set a GIF to loop using ImageMagick

    I managed to accidentally create a GIF that ran once without looping. I think this is because I created it in LICEcap but then deleted some frames and re-saved it using macOS Preview.

    1 min read
  4. Close terminal window on Ctrl+D for macOS

    I always forget how to set this up. It's hidden in Preferences - Profiles - Basic - Shell:

    1 min read
  5. Generating a calendar week grid with the Python Calendar module

    I needed to generate a grid calendar that looks like this (design by Natalie Downe): The Python standard library calendar module has a utility function that really helps here: Outputs:

    1 min read
  6. Getting Mastodon running on a custom domain

    This TIL is mainly a rehash of these two articles by Jacob and Andrew: - Setting up a personal Fediverse ID / Mastodon instance - Jacob Kaplan-Moss - The Fediverse, And Custom Domains - Andrew Godwin…

    2 min read
  7. Piping from rg to llm to answer questions about code

    Here's a trick I've used a couple of times in the past few days. If I have a question about a codebase and I want to answer it using an LLM, I'll use (aka ) to search that codebase for a specific…

    4 min read
  8. Creating desktop backgrounds using Midjourney

    I decided to create a new desktop background for my Mac using Midjourney. My laptop has a 16:10 aspect ratio and a retina screen, so I wanted as high a resolution image as possible.

    1 min read
  9. Escaping strings in Bash using !:q

    TIL this trick, via Pascal Hirsch on Twitter. Enter a line of Bash starting with a comment, then run on the next line to see what that would be with proper Bash escaping applied.

    1 min read
  10. SQLite can use more than one index for a query

    I was trying to figure out if SQLite has the ability to use more than one index as part of executing a single query, or if it only ever picks a single index that it thinks will give the best…

    1 min read
  11. How to scp files to and from Fly

    I have a Fly instance with a 20GB volume, and I wanted to copy files to and from the instance from my computer using . Here's the process that worked for me. 1. Connect to Fly's WireGuard network.

    1 min read
  12. Loading lit from Skypack

    Lit 2 stable was released today, offering a tiny, feature-full framework for constructing web components using modern JavaScript.

    1 min read
  13. Using iconv to convert the text encoding of a file

    In sqlite-utils issue 439 I was testing against a CSV file that used UTF16 little endian encoding, also known as .

    1 min read
  14. SQLite timestamps with floating point seconds

    Today I learned about this: Which outputs: Note the seconds component which reads - that's what you get from the format string.

    1 min read
  15. Emulating a big-endian s390x with QEMU

    I got a bug report concerning my sqlite-fts4 project running on PPC64 and s390x architectures. The s390x is an IBM mainframe architecture, which I found glamorous!

    1 min read
  16. Promoting the stable version of the documentation using rel=canonical

    I was thinking about documentation SEO today. Like many projects, Datasette offers multiple versions of the documentation: - https://docs.datasette.io/en/latest/ is the latest branch on GitHub -…

    1 min read
  17. Querying for GitHub issues open for less than 60 seconds

    While writing this thread about my habit of opening issues and closing them a few seconds later just so I could link to them in a commit message I decided to answer the question "How many of my issues…

    1 min read
  18. Using S3 triggers to maintain a list of files in DynamoDB

    This is a three-quarters-baked experiment that I ran this morning. I'm interested in efficiently tracking which new files have been added to an S3 bucket, where that bucket could potentially hold…

    6 min read
  19. The most basic possible Hugo site

    With Claude's help I figured out what I think is the most basic version of a static site generated using Hugo.

    2 min read
  20. Listing files uploaded to Cloud Build

    Today while running I noticed the following: indicates a Google Cloud Storage bucket. Can I see what's in that bucket? Turns out I can: The option adds the size information.

    1 min read
  21. Show the SQL schema for a PostgreSQL database

    This took me longer to figure out than I care to admit. pg dump -s name-of-database Surprisingly there doesn't seem to be an easy way to do this using a statement within PostgreSQL itself.

    1 min read