Notes on software engineering

Archive / page 22

421–440 of 546 posts, newest first.

  1. 2023
  2. Search across all loaded resources in Firefox

    You can search for a string in any resource loaded by a page (including across HTML, JavaScript and CSS) in the Debugger pane by hitting Command+Shift+F.

    1 min read
  3. Using Fabric with an SSH public key

    Inspired by this tweet by Mike Driscoll I decided to try using Fabric to run commands over SSH from a Python script, using a public key for authentication.

    1 min read
  4. Compiling the SQLite spellfix.c module on macOS

    I wanted to browse a backup copy of my Plex database, which is a SQLite file. I tried this: The module is an optional module for SQLite.

    1 min read
  5. Enabling a gin index for faster LIKE queries

    I tried using a gin index to speed up queries against a column. PostgreSQL: More performance for LIKE and ILIKE statements provided useful background.

    1 min read
  6. Scroll to text fragments

    I ran a Google search this morning for and when I clicked on the top result it jumped me to a highlighted snippet of text on the page, despite that page not having relevant anchor links.

    1 min read
  7. Planning parallel downloads with TopologicalSorter

    For complicated reasons I found myself wanting to write Python code to resolve a graph of dependencies and produce a plan for efficiently executing them, in parallel where possible.

    1 min read
  8. Finding uses of an API with the new GitHub Code Search

    The GitHub Code Search beta is really powerful - it allows advanced search - including regular expression matches - against every public repo on GitHub.

    1 min read
  9. literalinclude with markers for showing code in documentation

    I wanted to include some example Python tests in the Datasette documentation - but since they were tests, I also wanted to execute them as part of my test suite to make sure they worked correctly.

    1 min read
  10. Understanding Kristofer Joseph's Single File Web Component

    Via Brian LeRoux I found single-file-web-component.html by Kristofer Joseph. It's really clever! It demonstrates how to build a custom Web Component in a single HTML file, using some neat tricks.

    1 min read
  11. Searching for repositories by topic using the GitHub GraphQL API

    I wanted to use the GitHub GraphQL API to return all of the repositories on the https://github.com/topics/git-scraping page.

    1 min read
  12. Annotated explanation of David Beazley's dataklasses

    David Beazley on Twitter: So, I just published this deliciously evil spin on dataclasses. It's tiny and the resulting classes import about 15-20 faster than dataclasses.

    1 min read
  13. Basic strace to see what a process is doing

    I had a long-running process and I wanted to check that it was at least doing something . I know its PID (32425 in this case) - here's how to use to see what it's doing right now.

    1 min read
  14. List all columns in a SQLite database

    Here's a devious trick for listing ALL columns in a SQLite database, using a SQL query that generates another SQL query.

    4 min read
  15. Null case comparisons in SQLite

    I wanted to say "output this transformed value if it's not null, otherwise nothing". The recipe I figured out was: Full query example: This uses datasette-rure for the function.

    1 min read
  16. Storing files in an S3 bucket between GitHub Actions runs

    For my git-history live demos I needed to store quite large files ( 200MB SQLite databases) in between GitHub Actions runs, to avoid having to recreate the entire file from scratch every time.

    1 min read
  17. Copy tables between SQLite databases

    I figured out a pattern for doing this today using the CLI tool - given two SQLite databases in the current folder, called and : I'm using that in this GitHub Actions workflow.

    1 min read
  18. Check spelling using codespell

    Today I discovered codespell via this Rich commit. is a really simple spell checker that can be run locally or incorporated into a CI flow. codespell is designed to run against source code.

    1 min read
  19. Free API Gateway to expose localhost (ngrok alternative)

    I needed to build and use many inhouse tools (like controlling my lights, checking doors cameras remotely, checking my server's temperature, etc).

    1 min read
  20. GPT-4 for API design research

    I came up with a really useful prompt for GPT-4 today. I was considering options for refactoring how Datasette's core view functions work, and was contemplating alternative ways to dispatch to…

    1 min read
  21. Downloading partial YouTube videos with ffmpeg

    I spoke at WordCamp US 2023, and wanted to grab a copy of the video of my talk. I always try to keep my own copies of these because I've seen some conferences eventually take these offline in the…

    2 min read