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 7 · awslambda 1 · azure 1 · bash 8 · caddy 1 · cloudflare 1 · cloudrun 8 · cocktails 1 · cookiecutter 2 · datasette 8 · deno 1 · digitalocean 1 · django 15 · docker 8 · duckdb 1 · electron 6 · firefox 1 · fly 7 · gis 2 · git 2 · github 11 · github-actions 22 · google-sheets 1 · googlecloud 4 · gpt3 1 · graphql 2 · heroku 3 · homebrew 5 · ics 1 · imagemagick 2 · javascript 14 · jinja 2 · jq 6 · jupyter 1 · kubernetes 2 · linux 4 · macos 14 · markdown 3 · mediawiki 1 · networking 1 · nginx 1 · node 1 · npm 3 · observable-plot 1 · pixelmator 1 · pluggy 1 · postgresql 6 · presenting 1 · purpleair 1 · pypi 1 · pytest 16 · python 39 · quarto 1 · readthedocs 5 · reddit 1 · selenium 2 · service-workers 1 · shot-scraper 1 · spatialite 3 · sphinx 3 · sql 3 · sqlite 31 · 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

aws Athena error: The specified key does not exist - 2022-09-27

I was trying to run Athena queries against compressed JSON log files stored in an S3 bucket. …

github-actions Ensure labels exist in a GitHub repository - 2022-09-25

I wanted to ensure that when this template repository was used to create a new repo that repo would have a specific set of labels. …

cocktails Whisky sour - 2022-09-25

I picked up the recipe for this one from this video by @notjustabartender on TikTok. …

awslambda Deploying Python web apps as AWS Lambda functions - 2022-09-18

I've been wanting to figure out how to do this for years. Today I finally put all of the pieces together for it. …

duckdb Using DuckDB in Python to access Parquet data - 2022-09-16

Did a quick experiment with DuckDB today, inspired by the bmschmidt/hathi-binary repo. …

sqlite Returning related rows in a single SQL query using JSON - 2022-09-16

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

python Running PyPy on macOS using Homebrew - 2022-09-14

Towards Inserting One Billion Rows in SQLite Under A Minute includes this snippet: …

macos Browse files (including SQLite databases) on your iPhone with ifuse - 2022-09-13

I spotted an intriguing note in the release notes for osxphotos 0.51.7: …

macos Driving an external display from a Mac laptop - 2022-09-10

For a friend's wedding I needed to run a Google Photos slideshow on some large televisions. …

github Clone, edit and push files that live in a Gist - 2022-09-08

GitHub Gists are full Git repositories, and can be cloned and pushed to. …

docker Run pytest against a specific Python version using Docker - 2022-09-05

For datasette issue #1802 I needed to run my pytest test suite using a specific version of Python 3.7. …

twitter Loading Twitter Birdwatch into SQLite for analysis with Datasette - 2022-09-03

Twitter Birdwatch is "a collaborative way to add helpful context to Tweets and keep people better informed". …

fly How to scp files to and from Fly - 2022-09-02

I have a Fly instance with a 20GB volume, and I wanted to copy files to and from the instance from my computer using scp. …

sqlite SQLite VACUUM: database or disk is full - 2022-08-29

I was trying to run VACUUM against a large SQLite database file (~7GB) using sqlite-utils vacuum data.db and I got this error: …

sqlite Seeing which functions are unique to a specific SQLite / Datasette instance - 2022-08-23

In reading Scraping JSON, HTML, and ZIP Files with Pure SQLite by Alex Garcia I got curious to see a full list of functions he had registered in his sqlite-extension-examples.fly.dev Datasette instance that weren't available in a regular Datasette. …

quarto Trying out Quarto on macOS - 2022-08-18

I decided to try out Quarto, the new notebook/markdown/publishing system built on Pandoc. …

sqlite Sort by number of JSON intersections - 2022-08-17

This post on Reddit asked how to run a query that takes a list of items (in this case ingredients) as the input and returns all rows with at least one of those items in a JSON list, ordered by the most matches. …

googlecloud Analyzing Google Cloud spend with Datasette - 2022-08-16

Google Cloud provide extremely finely grained billing, but you need to access it through BigQuery which I find quite inconvenient. …

python Defining setup.py dependencies using a URL - 2022-08-13

For sqlite-utils issue 464 I implemented a fix to a tiny bug in a dependency in my own fork on GitHub. …

javascript Creating a tiled zoomable image with OpenSeadragon and vips - 2022-08-12

The San Francisco Microscopical Society has some extremely high resolution scanned images - one of them is a 1.67GB PNG file with a 25,088 × 17,283 pixel resolution. …

gpt3 Using GPT-3 to figure out jq recipes - 2022-08-10

I like jq, but I always have to think pretty hard about how to construct the right syntax for it. …

pytest Mocking a Textract LimitExceededException with boto - 2022-08-07

For s3-ocr issue #21 I needed to write a test that simulates what happens when Amazon Textract returns a "LimitExceededException". When using boto this error presents itself as an exception: …

sqlite Trying out SQLite extensions on macOS - 2022-08-03

Alex Garcia has been building some really cool new custom extensions for SQLite, working in C and Go. So far he's released two: …

aws Using boto3 from the command line - 2022-08-02

I found a useful pattern today for automating more complex AWS processes as pastable command line snippets, using Boto3. …

sqlite Related content with SQLite FTS and a Datasette template function - 2022-07-31

Today I added "related TILs" to this TIL website - so each TIL now shows five related TILs at the bottom of the page. …

docker Emulating a big-endian s390x with QEMU - 2022-07-29

I got a bug report concerning my sqlite-fts4 project running on PPC64 and s390x architectures. …

github Migrating a GitHub wiki from one repository to another - 2022-07-28

I figured out how to migrate a GitHub wiki (public or private) from one repository to another while preserving all history. …

python struct endianness in Python - 2022-07-28

TIL the Python standard library struct module defaults to interpreting binary strings using the endianness of your machine. …

docker Testing things in Fedora using Docker - 2022-07-27

I got a report of a bug with my s3-ocr tool running on Fedora. …

fly Deploying a redbean app to Fly - 2022-07-24

redbean is a fascinating project - it provides a web server in a self-contained executable which you can add assets (or dynamic Lua code) to just by zipping them into the same binary package. …

Browse all 328 TILs