Simon Willison: TIL

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

Atom feed

Browse by topic: amplitude 1 · asgi 1 · auth0 2 · aws 8 · awslambda 1 · azure 1 · bash 8 · caddy 1 · cloudflare 1 · cloudrun 8 · cocktails 3 · cookiecutter 2 · datasette 10 · deno 1 · digitalocean 1 · django 16 · docker 9 · duckdb 1 · electron 6 · firefox 1 · fly 7 · gis 2 · git 4 · github 12 · github-actions 23 · google-sheets 1 · googlecloud 5 · gpt3 4 · graphql 3 · heroku 3 · homebrew 5 · html 3 · ics 1 · imagemagick 2 · javascript 14 · jinja 2 · jq 6 · json 1 · jupyter 1 · kubernetes 2 · linux 4 · macos 14 · markdown 3 · mastodon 3 · mediawiki 1 · networking 1 · nginx 1 · node 1 · npm 3 · observable-plot 2 · pixelmator 1 · pluggy 1 · postgresql 6 · presenting 1 · purpleair 1 · pypi 1 · pytest 16 · python 43 · quarto 1 · readthedocs 5 · reddit 1 · selenium 2 · service-workers 1 · shot-scraper 2 · spatialite 3 · sphinx 3 · sql 3 · sqlite 32 · svg 1 · tailscale 1 · tesseract 1 · twitter 3 · typescript 1 · vega 1 · vim 1 · vscode 2 · web-components 1 · webassembly 1 · webauthn 1 · wikipedia 1 · zeit-now 2 · zsh 2

Recent TILs

googlecloud Workaround for google-github-actions/setup-gcloud errors - 2022-12-01

I used the google-github-actions/setup-gcloud action in all of my GitHub Actions workflows that deploy applications to Cloud Run. …

docker Using pipenv and Docker - 2022-11-28

I had a Django project that used pipenv (in particular a Pipfile.lock) to manage dependencies and I wanted to build a Docker container for it. …

github-actions actions/setup-python caching for setup.py projects - 2022-11-28

I used to use a combination of actions/setup-python and actions/cache in all of my Python GitHub Actions projects in order to install Python dependencies via a cache, rather than hitting PyPI to download copies every time. …

html Lazy loading images in HTML - 2022-11-26

Most modern browsers now include support for the loading="lazy" image attribute, which causes images not to be loaded unti the user scrolls them into view. …

datasette Writing a CLI utility that is also a Datasette plugin - 2022-11-21

I'm working on dclient, a CLI tool for interacting with Datasette instances via the Datasette API. …

observable-plot Wider tooltip areas for Observable Plot - 2022-11-21

In this Observable notebook I'm plotting a line on a chart, but I want to provide tooltips showing the exact value at any point on the line. …

mastodon Verifying your GitHub profile on Mastodon - 2022-11-16

Mastodon has a really neat way of implementing verification, using the rel=me microformat. …

git How to create a tarball of a git repository using "git archive" - 2022-11-15

I figured this out in a Gist in 2016 which has attracted a bunch of comments over the years. Now I'm upgrading it to a retroactive TIL. …

html HTML datalist - 2022-11-14

A Datasette feature suggestion concerning autocomplete against a list of known values inspired me to learn how to use the HTML <datalist> element (see MDN). …

gpt3 Writing tests with Copilot - 2022-11-14

I needed to write a relatively repetitive collection of tests, for a number of different possible error states. …

json JSON Pointer - 2022-11-14

I'm looking at options for representing JSON validation errors in more JSON. The recent RFC 7807: Problem Details for HTTP APIs looks relevant here. …

gpt3 Generating OpenAPI specifications using GPT-3 - 2022-11-13

I wanted to start playing around with OpenAPI. I decided to see if I could get GPT-3 to generate the first version of a specification for me. …

mastodon Export a Mastodon timeline to SQLite - 2022-11-04

I've been playing around with the Mastodon timelines API. It's pretty fun! …

mastodon Getting Mastodon running on a custom domain - 2022-11-02

This TIL is mainly a rehash of these two articles by Jacob and Andrew: …

github GitHub Pages: The Missing Manual - 2022-10-31

GitHub Pages is an excellent free hosting platform, but the documentation is missing out on some crucial details. …

python The pdb interact command - 2022-10-31

Today Carlton told me about the interact command in the Python debugger. …

git git bisect - 2022-10-29

I extracted and enhanced this TIL from my April 8th 2020 weeknotes to make it easier to find. …

sqlite Finding the SQLite version used by Web SQL in Chrome - 2022-10-28

Google Chrome still includes support for Web SQL, the long since abandoned proposed standard for shipping a SQL engine in browser JavaScript. I was reminded of its existence today while reading about the new official sqlite3 wasm build. …

python os.remove() on Windows fails if the file is already open - 2022-10-25

I puzzled over this one for quite a while this morning. I had this test that was failing with Windows on Python 3.11: …

datasette Writing a Datasette CLI plugin that mostly duplicates an existing command - 2022-10-22

My new datasette-gunicorn plugin adds a new command to Datasette - datasette gunicorn - which mostly replicates the existing datasette serve command but with a few differences. …

python Simple load testing with Locust - 2022-10-22

I've been using Locust recently to run some load tests - most significantly these tests against SQLite running with Django and this test exercising Datasette and Gunicorn. …

django Adding a Datasette ASGI app to Django - 2022-10-20

Datasette is implemented as an ASGI application. …

gpt3 Guessing Amazon image URLs using GitHub Copilot - 2022-10-15

I was experimenting with the new Readwise export API and it gave me back the following JSON: …

shot-scraper shot-scraper for a subset of table columns - 2022-10-14

For Datasette issue #1844 I wanted to create the following screenshot: …

python Using psutil to investigate "Too many open files" - 2022-10-13

I was getting this intermittent error running my Datasette test suite: …

cocktails Pisco sour - 2022-10-08

This classic Peruvian cocktail recipe is particularly useful if you have chickens producing fresh eggs! …

aws Querying newline-delimited JSON logs using AWS Athena - 2022-10-06

I've been writing my Fly logs to S3 in newline-delimited JSON format using the recipe described in Writing Fly logs to S3. …

cocktails Tommy's Margarita - 2022-10-02

A few years ago I decided to learn how to make some classic cocktails. It is a very rewarding hobby. …

graphql GraphQL fragments - 2022-09-30

One of the scripts that builds and deploys datasette.io uses a GraphQL query to retrieve information from GitHub about the repositories used for the various Datasette tools and plugins. …

html HTML video that loads when the user clicks play - 2022-09-29

Today I figured out how to use the <video> tag to show a static thumbnail that gets replaced by the loaded video only when the user clicks play. …

Browse all 358 TILs