Notes on software engineering

Archive / page 18

341–360 of 546 posts, newest first.

  1. 2024
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. Using the ChatGPT streaming API from Python

    I wanted to stream the results from the ChatGPT API as they were generated, rather than waiting for the entire thing to complete before displaying anything.

    1 min read
  19. Converting HTML and rich-text to Markdown

    If you copy and paste from a web page - including a full table - into a GitHub issue comment GitHub converts it to the corresponding Markdown for you. Really quick way to construct Markdown tables.

    1 min read
  20. JavaScript date objects

    A few notes on JavaScript object, based on trying to do some basic things with them in Observable notebooks.

    1 min read
  21. Python packages with pyproject.toml and nothing else

    I've been using and for my Python packages for a long time: I like that it works without me having to think about installing and learning any additional tools such as Flit or pip-tools or Poetry or…

    5 min read