til

320 posts tagged “til”.

  1. 2025
  2. Castle vs. Moat

    This is the classic "Castle vs. Moat" debate in security architecture. While Docker provides a Moat (isolation from the host machine), the Sandbox provides the Code of Conduct (rules for what happens…

    1 min read
  3. Circuit breakers needs durable state

    I just noticed that I have missed a big point during the design phase of my workflow engine! I Leonard that, proper circuit breakers must have a durable state in a proper database.

    1 min read
  4. Critical lessons from implementing a highly complex workflow system

    - Transaction Boundaries are Sacred: When spawning child tasks, the parent MUST commit its transaction before children become visible to workers.

    1 min read
  5. Installing lxml for Python on an M1/M2 Mac

    I ran into this error while trying to run on an M2 Mac, inside a virtual environment I had intitially created using : I eventually realized that this was using the system Python - - which doesn't have…

    1 min read
  6. Recursively fetching metadata for all files in a Google Drive folder

    For google-drive-to-sqlite I wanted a mechanism to recursively return metadata on every file in a specified Goole Drive folder.

    2 min read
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  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. 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
  21. Installing Selenium for Python on macOS with ChromeDriver

    I needed to run Selenium on macOS for the first time today. Here's how I got it working. Install the chromedriver binary If you have homebrew This is by far the easiest option: brew install…

    2 min read