Simon Willison: TIL

Things I've learned, collected in simonw/til. You may also enjoy my blog.

Atom feed

Browse by topic: ab 1 · amplitude 1 · asgi 1 · auth0 2 · aws 8 · awslambda 1 · azure 1 · bash 11 · caddy 1 · clickhouse 1 · cloudflare 2 · cloudrun 8 · cocktails 3 · cookiecutter 2 · cooking 1 · cosmopolitan 1 · css 2 · datasette 18 · deno 3 · digitalocean 1 · discord 1 · django 17 · docker 9 · duckdb 3 · electron 6 · exif 1 · firefox 1 · fly 10 · gis 4 · git 6 · github 15 · github-actions 27 · google 1 · google-sheets 1 · googlecloud 6 · gpt3 11 · graphql 3 · hacker-news 1 · heroku 3 · homebrew 6 · html 4 · http 1 · httpx 1 · ics 1 · imagemagick 2 · javascript 15 · jinja 3 · jq 8 · json 3 · jupyter 1 · kubernetes 2 · linux 4 · llms 14 · machinelearning 1 · macos 21 · markdown 3 · mastodon 4 · mediawiki 1 · midjourney 1 · misc 2 · networking 2 · nginx 1 · node 1 · npm 3 · observable 1 · observable-plot 2 · overture-maps 1 · pixelmator 1 · playwright 1 · pluggy 1 · postgresql 6 · presenting 1 · purpleair 1 · pyodide 1 · pypi 2 · pytest 19 · python 58 · quarto 1 · readthedocs 7 · reddit 1 · selenium 2 · service-workers 1 · shot-scraper 5 · spatialite 4 · sphinx 4 · sql 5 · sqlite 50 · svg 1 · tailscale 1 · tesseract 1 · twitter 3 · typescript 1 · valtown 1 · vega 1 · vim 1 · vscode 2 · web-components 1 · webassembly 2 · webauthn 1 · wikipedia 1 · yaml 1 · zeit-now 2 · zsh 2

Recent TILs

valtown Running a scheduled function on Val Town to import Atom feeds into Datasette Cloud - 2024-02-20

Val Town is a neat service for hosting short server-side JavaScript programs online - reminiscent of a combination of Glitch and Observable Notebooks. …

python Getting Python MD5 to work with FIPS systems - 2024-02-13

This issue by Parand Darugar pointed out that Datasette doesn't currently run on Linux systems with FIPS enabled, due to the way it uses MD5 hashes. …

networking Running Ethernet over existing coaxial cable - 2024-02-12

I recently noticed that the router in our garage was providing around 900 Mbps if I plugged my laptop directly into it via an Ethernet cable, but that speed fell to around 80Mbps (less than 1/10th that speed) elsewhere in our house. …

llms Piping from rg to llm to answer questions about code - 2024-02-11

Here's a trick I've used a couple of times in the past few days. …

github-actions Creating GitHub repository labels with an Actions workflow - 2024-02-09

Newly created GitHub repositories come with a default set of labels. I have several labels I like to add on top of these. The most important is research, which I use for issues that are tracking my notes on a research topic relevant to the repository. …

llms Exploring ColBERT with RAGatouille - 2024-01-27

I've been trying to get my head around ColBERT. …

httpx Logging OpenAI API requests and responses using HTTPX - 2024-01-26

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

pypi Publish releases to PyPI from GitHub Actions without a password or token - 2024-01-14

I published a package to PyPI today using their Trusted Publishers mechanism for the first time. …

python Using pprint() to print dictionaries while preserving their key order - 2024-01-14

While parsing a CSV file using csv.DictReader today I noticed the following surprising result: …

playwright Using expect() to wait for a selector to match multiple items - 2024-01-13

In the Playwright tests for datasette-cluster-map I wanted to assert that two markers had been displayed on a Leaflet map. …

sphinx literalinclude with markers for showing code in documentation - 2024-01-10

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. …

datasette Writing Playwright tests for a Datasette Plugin - 2024-01-08

I really like Playwright for writing automated tests for web applications using a headless browser. It's pretty easy to install and run, and it works well in GitHub Actions. …

cloudflare How to get Cloudflare to cache HTML - 2024-01-08

To my surprise, if you setup a Cloudflare caching proxy in front of a website it won't cache HTML pages by default, even if they are served with cache-control: headers. …

fly Running Varnish on Fly - 2024-01-08

The goal: run Varnish in a Fly container as a caching proxy in front of another Fly application. …

github-actions GitHub Actions, Issues and Pages to build a daily planner - 2024-01-01

I'm trying a new thing: a private daily planner, where each day I note down my goals for the day and make notes on my progress towards them as the day progresses. …

sqlite Running Steampipe extensions in sqlite-utils and Datasette - 2023-12-20

Steampipe build software that lets you query different APIs directly from SQL databases. …

macos Editing an iPhone home screen using macOS - 2023-12-11

My iPhone has a weird bug: I can no longer re-arrange the app icons on the home screen (or in the dock) by dragging them around on my phone. It lets me get into edit mode (where the icons wiggle) and drag them around, but when I release they go back to where they came from. …

macos Grabbing a transcript of a short snippet of a YouTube video with MacWhisper - 2023-11-30

I grabbed a quote from a transcript of a snippet of a YouTube video today for my blog. …

pyodide Cryptography in Pyodide - 2023-11-26

Today I was evaluating if the Python cryptography package was a sensible depedency for one of my projects. …

readthedocs Running pip install '.[docs]' on ReadTheDocs - 2023-11-24

I decided to use ReadTheDocs for my in-development datasette-enrichments project. …

misc Cloning my voice with ElevenLabs - 2023-11-15

Charlie Holtz published an astonishing demo today, where he hooked together GPT-Vision and a text-to-speech model trained on his own voice to produce a video of Sir David Attenborough narrating his life as observed through his webcam. …

duckdb Summing columns in remote Parquet files using DuckDB - 2023-11-14

vivym/midjourney-messages on Hugging Face is a large (~8GB) dataset consisting of 55,082,563 Midjourney images - each one with the prompt and a URL to the image hosted on Discord. …

css A simple two column CSS grid - 2023-10-26

For my blog entry today Now add a walrus: Prompt engineering in DALL-E 3 I wanted to display little grids of 2x2 images along with their captions. …

gis Serving a custom vector web map using PMTiles and maplibre-gl - 2023-10-23

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 single static file containing vector tile data which is designed to be hosted on static hosting but can then serve vector tiles to clients using HTTP range requests. …

github-actions Serving a JavaScript project built using Vite from GitHub Pages - 2023-10-23

I figured out how to serve a JavaScript project built using Vite using GitHub Pages and a custom build script that runs using GitHub Actions. …

fly Deploying the CLIP embedding model on Fly - 2023-10-18

Inspired by Drew Breunig's Faucet Finder I decided I wanted to deploy an API somewhere that could calculate CLIP embeddings for me. …

css Understanding the CSS auto-resizing textarea trick - 2023-09-30

Chris Coyier wrote about the new form-sizing: normal property, which can get a <textarea> to automatically expand to fit its content - but currently only in Google Chrome Canary. Chris also linked to his own favourite trick for doing that, using some CSS grid trickery (original idea by Stephen Shaw). …

pytest Snapshot testing with Syrupy - 2023-09-26

I'm a big fan of snapshot testing - writing tests where you compare the output of some function to a previously saved version, and can re-generate that version from scratch any time something changes. …

sqlite Geospatial SQL queries in SQLite using TG, sqlite-tg and datasette-sqlite-tg - 2023-09-25

TG is an exciting new project in the world of open source geospatial libraries. It's a single C file (an amalgamation, similar to that provided by SQLite) which implements the subset of geospatial operations that I most frequently find myself needing: …

machinelearning Trying out the facebook/musicgen-small sound generation model - 2023-09-23

Facebook's musicgen is a model that generates snippets of audio from a text description - it's effectively a Stable Diffusion for music. …

Browse all 497 TILs