Notes on software engineering

Archive / page 23

441–460 of 547 posts, newest first.

  1. 2023
  2. 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
  3. Local wildcard DNS on macOS with dnsmasq

    I wanted to get wildcard DNS running on my Mac laptop, for development purposes. I wanted to point to my localhost IP address. I figured out how to do this using , installed via Homebrew.

    2 min read
  4. Using json_extract_path in PostgreSQL

    The function in PostgreSQL can be used to extract specific items from JSON - but I couldn't find documentation for the path language it uses.

    1 min read
  5. Upgrading Python Homebrew packages using pip

    VisiData 2.0 came out today. I previously installed VisiData using Homebrew, but the VisiData tap has not yet been updated with the latest version.

    1 min read
  6. Using the GitHub Actions cache with npx and no package.json

    Some of my repositories have GitHub Actions workflows that execute commands using , for example my graphql-scraper repo using to install and run the tool: npx get-graphql-schema…

    1 min read
  7. CLI tools hidden in the Python standard library

    Seth Michael Larson pointed out that the Python module can be used as a CLI tool like this: This is a neat Python feature: modules with a block that are available on Python's standard import path can…

    2 min read
  8. Cybersecurity Diary: Reflections on Recent Retail Breaches

    Today I’m jotting down my thoughts on the spate of cyber incidents that hit three of the UK’s most recognised retailers—Marks & Spencer, the Co-op Group, and Harrods—over the past two weeks.

    4 min read
  9. Returning related rows in a single SQL query using JSON

    When building database-backed applications you'll often find yourself wanting to return a row from the database along with its related rows.

    1 min read
  10. Mouse support in vim

    Today I learned that if you hit in vim and then type and hit enter… vim grows mouse support! In your terminal!

    1 min read
  11. Counting SQLite virtual machine operations

    When SQLite executes a query, it does so by executing a sequence of virtual machine operations. There are mechanisms for cancelling a query after a specific number of these operations, to protect…

    1 min read
  12. Histogram with tooltips in Observable Plot

    Given an array of datetime objects, I wanted to plot a histogram. But I wanted to automatically pick a bucket size for that histogram that resulted in something interesting, no matter what range of…

    1 min read
  13. Pixel editing a favicon with Pixelmator

    I wanted to add a favicon to Datasette, using a PNG image served from as suggested in this article by Adam Johnson.

    1 min read
  14. Google Chrome --headless mode

    In the README for monolith (a new Rust CLI tool for archiving HTML pages along with their images and assets) I spotted this tip for using Chrome in headless mode to execute JavaScript and output the…

    2 min read
  15. Logging OpenAI API requests and responses using HTTPX

    My LLM tool has a feature where you can set a environment variable to see full debug level details of any HTTP requests it makes to the OpenAI APIs.

    2 min read
  16. Testing Electron apps with Playwright and GitHub Actions

    Yesterday I figured out (issue 133) how to use Playwright to run tests against my Electron app, and then execute those tests in CI using GitHub Actions, for my datasett-app repo for my Datasette…

    1 min read
  17. Building and deploying a custom site using GitHub Actions and GitHub Pages

    I figured out a minimal pattern for building a completely custom website using GitHub Actions and deploying the result to GitHub Pages. First you need to enable GitHub Pages for the repository.

    1 min read
  18. shot-scraper for a subset of table columns

    For Datasette issue 1844 I wanted to create the following screenshot: From this page: https://congress-legislators.datasettes.com/legislators/legislator terms?

    1 min read
  19. Fixing broken text encodings with sqlite-transform and ftfy

    I was working with a database table that included values that were clearly in the wrong character encoding - values like this: Rue Léopold I I used my sqlite-transform tool with the ftfy Python…

    1 min read
  20. Opt-in integration tests with pytest --integration

    For both s3-credentials and datasette-publish-fly I have a need for real-world integration tests that actually interact with the underlying APIs (AWS or Fly) to create and destroy resources on those…

    1 min read
  21. Accessing 1Password items from the terminal

    I save things like API keys in 1Password. Today I figured out how to access those from macOS terminal scripts.

    1 min read