Simon Willison’s Weblog

Subscribe
Atom feed

Elsewhere

Filters: Sorted by date

None
TIL Treating warnings as errors in pytest — I was seeing this warning in a Django project when I thought I was correctly using timezone-aware dates everywhere:
None
TIL Allowing a container in Docker Desktop for Mac to talk to a PostgreSQL server on the host machine — I like using [Postgres.app](https://postgresapp.com/) to run PostgreSQL on my macOS laptop. I use it for a bunch of different projects.
None
TIL Generating a calendar week grid with the Python Calendar module — I needed to generate a grid calendar that looks like this (design [by Natalie Downe](https://github.com/natbat/pillarpointstewards/issues/23)):
Sighting 9:50 AM — Northern Elephant Seal, in Año Nuevo State Reserve, CA, US
Northern Elephant Seal
Northern Elephant Seal
Release shot-scraper 0.10 — A command-line utility for taking automated screenshots of websites
Sighting 1:58 PM — Red Rock Crab, in Pillar Point Harbor, CA, US
Red Rock Crab
Red Rock Crab
None
TIL Compiling to WASM with llvm on macOS — [howto-wasm-minimal](https://github.com/ern0/howto-wasm-minimal) by Zalka Ernő ([my fork here](https://github.com/simonw/howto-wasm-minimal)) is a neat demo of a minimal WASM module. It uses C++ to define functions for simple image manipulation including blurring an image, compiles it to WASM using llvm/clang++, then uses JavaScript to run those functions against an image loaded into a `<canvas>` element.
None
TIL Deploying a live Datasette demo when the tests pass — I've implemented this pattern a bunch of times now - here's the version I've settled on for my [datasette-auth0 plugin](https://github.com/simonw/datasette-auth0) repository.
Release datasette-auth0 0.1 — Datasette plugin that authenticates users using Auth0
None
TIL Simplest possible OAuth authentication with Auth0 — [Auth0](https://auth0.com/) provides an authentication API which you can use to avoid having to deal with user accounts in your own web application.
Release datasette-auth0 0.1a0 — Datasette plugin that authenticates users using Auth0
Release datasette-packages 0.1.1 — Show a list of currently installed Python packages
Release datasette-packages 0.1 — Show a list of currently installed Python packages
Sighting 3:47 PM — Gumboot Chiton, in Pillar Point Reef, CA, US
Gumboot Chiton
Gumboot Chiton
Release datasette-hashed-urls 0.4 — Optimize Datasette performance behind a caching proxy
None
TIL Extracting web page content using Readability.js and shot-scraper — [Readability.js](https://github.com/mozilla/readability) is "A standalone version of the readability library used for Firefox Reader View".
Release datasette-hashed-urls 0.3.1 — Optimize Datasette performance behind a caching proxy
None
TIL Exporting and editing a Twitter Spaces recording — I hosted [a Twitter Spaces conversation](https://twitter.com/simonw/status/1504604448202518529) the other day. The recording is only available for 30 days afterwards, and I wanted to publish it elsewhere.
Release datasette-hashed-urls 0.3 — Optimize Datasette performance behind a caching proxy
Release datasette 0.61.1 — An open source multi-tool for exploring and publishing data
Release datasette 0.61 — An open source multi-tool for exploring and publishing data
None
TIL Rewriting a repo to contain the history of just specific files — I wanted to start [a new git repository](https://github.com/simonw/graphql-scraper/tree/828a1efc4307cca6cd378c394c2d33eac2eceb52) containing just the history of two specific files from my [help-scraper repository](https://github.com/simonw/help-scraper).
None
TIL Using the GitHub Actions cache with npx and no package.json — Some of my repositories have GitHub Actions workflows that execute commands using `npx`, for example my [graphql-scraper](https://github.com/simonw/graphql-scraper) repo using `npx` to [install and run](https://github.com/simonw/help-scraper/blob/54ef9b1fa579dc2d3f68055ffdac9996fd6dae9c/.github/workflows/scrape.yml#L76-L80) the `get-graphql-schema` tool:
None
TIL Counting SQLite virtual machine operations — When SQLite executes a query, it does so by executing a sequence of virtual machine operations.
None
TIL The simplest recursive CTE — I found this really simple recursive CTE useful for ensuring I understood how to write recursive CTEs.
Release datasette-publish-vercel 0.13 — Datasette plugin for publishing data using Vercel
Release datasette 0.61a0 — An open source multi-tool for exploring and publishing data
None
TIL Async fixtures with pytest-asyncio — I wanted to use a fixture with `pytest-asyncio` that was itsef as `async def` function, so that it could execute `await` statements.
Release datasette-hashed-urls 0.2 — Optimize Datasette performance behind a caching proxy
Release datasette-publish-vercel 0.12.1 — Datasette plugin for publishing data using Vercel