Notes on software engineering

Archive / page 3

41–60 of 547 posts, newest first.

  1. 2025
  2. Open a debugging shell in GitHub Actions with tmate

    :warning: 17 Feb 2022: There have been reports of running tmate causing account suspensions . See this issue for details. Continue with caution.

    1 min read
  3. Geopoly in SQLite

    I noticed this morning that one of my Datasette installations had the Geopoly SQLite extension enabled.

    4 min read
  4. Running a Python ASGI app on Vercel

    Vercel really wants you to deploy static assets with serverless functions tucked away in a separate folder.

    1 min read
  5. Exporting and editing a Twitter Spaces recording

    I hosted a Twitter Spaces conversation the other day. The recording is only available for 30 days afterwards, and I wanted to publish it elsewhere.

    1 min read
  6. SQLite BLOB literals

    I wanted to construct a string of SQL that would return a blob value: This was while writing a unit test for - for issue 19. I used it in the test here.

    1 min read
  7. Understanding option names in Click

    I hit a bug today where I had defined a Click option called but in doing so I replaced the Python bulit-in function: This inspired me to finally figure out how Click function argument names work.

    1 min read
  8. Programmatically comparing Python version strings

    I found myself wanting to compare the version numbers , and the in Python code, in order to mark a test as skipped if the installed version of Datasette was pre-1.0.

    1 min read
  9. Publishing to a public Google Cloud bucket with gsutil

    I decided to publish static CSV files to accompany my https://cdc-vaccination-history.datasette.io/ project, using a Google Cloud bucket (see cdc-vaccination-history issue 9).

    1 min read
  10. Checking if something is callable or async callable in Python

    I wanted a mechanism to check if a given Python object was "callable" - could be called like a function - or "async callable" - could be called using .

    1 min read
  11. Password hashing in Python with pbkdf2

    I was researching password hashing for datasette-auth-passwords. I wanted very secure defaults that would work using the Python standard library without any extra dependencies.

    1 min read
  12. Subqueries in select expressions in SQLite - also window functions

    I figured out a single SQL query for the following today. Given a table of GitHub repositories, for each repository return: 1. The repository name 2.

    5 min read
  13. A shell script for running Go one-liners

    bitfield/script is a really neat Go project: it tries to emulate shell scripting using Go chaining primitives, so you can run code like this: To achieve the same thing as: A comment from on Hacker…

    2 min read
  14. Using lsof on macOS

    stands for "list open files". Here are some very basic usage notes for the version that ships with macOS.

    1 min read
  15. Configuring GitHub Codespaces using devcontainers

    GitHub Codespaces provides full development environments in your browser, and is free to use with anyone with a GitHub account.

    3 min read
  16. Logging users out of Auth0

    If you implement Auth0 for login, you may be tempted to skip implementing logout. I started out just with a page that cleared my own site's cookies, ignoring the Auth0 side of it.

    1 min read
  17. Serving a custom vector web map using PMTiles and maplibre-gl

    Protomaps is "an open source map of the world, deployable as a single static file on cloud storage". It involves some very clever technology, rooted in the PMTiles file format which lets you create a…

    5 min read
  18. Using fs_usage to see what files a process is using

    Today I wanted to figure out where the CLI tool on my Mac kept its authentication tokens. I solved the problem using the macOS command, which traces filesystem activity for everything or for a…

    2 min read
  19. Using heroku pg:pull to restore a backup to a macOS laptop

    Today I worked out how to use the Heroku command and Postgres.app to pull a Heroku backup to my laptop.

    1 min read
  20. Creating a minimal SpatiaLite database with Python

    When writing a test for datasette-leaflet-freedraw I realized I didn't have a simple tiny recipe for creating an in-memory SpatiaLite database in Python.

    1 min read
  21. Protocols in Python

    Datasette currently has a few API internals that return objects. I was thinking about how this might work in the future - if Datasette ever expands beyond SQLite (plugin-provided backends for…

    1 min read