Running Docker on an M1 Mac
*TLDR: Use `platform: linux/amd64` in `docker-compose.yml` and your containers will probably work!*
907 words
|
5 minutes
Returning related rows in a single SQL query using JSON
When building database-backed applications you'll often find yourself wanting to return a row from the database along with its related rows.
641 words
|
3 minutes
Installing lxml for Python on an M1/M2 Mac
I ran into this error while trying to run `pip install lxml` on an M2 Mac, inside a virtual environment I had intitially created using `pipenv shell`:
222 words
|
1 minute
Writing tests for the ASGI lifespan protocol with HTTPX
Uvicorn silently ignores exceptions that occur during startup against the ASGI lifespan protocol - see [starlette/issues/486](https://github.com/en...
160 words
|
1 minute
Creating a dynamic line chart with SVG
I helped build the tide chart visualizations for [Rocky Beaches](https://www.rockybeaches.com/).
885 words
|
4 minutes
Listen to a web page in Mobile Safari
I found a better way to listen to a whole web page through text-to-speech on Mobile Safari today.
170 words
|
1 minute
Complete Guide to Uninstalling Linkding from CoreOS
A comprehensive step-by-step guide for completely removing Linkding bookmark manager from CoreOS systems, including services, containers, data, and configuration files.
984 words
|
5 minutes
os.remove() on Windows fails if the file is already open
I puzzled over this one for [quite a while](https://github.com/simonw/sqlite-utils/issues/503) this morning. I had this test that was failing with ...
228 words
|
1 minute
Usable horizontal scrollbars in the Django admin for mouse users
I got a complaint from a Windows-with-mouse user of a Django admin project I'm working on: they couldn't see the right hand columns in a table with...
321 words
|
2 minutes
CLI tools hidden in the Python standard library
Seth Michael Larson [pointed out](https://twitter.com/sethmlarson/status/1674141676325990400) that the Python `gzip` module can be used as a CLI to...
1742 words
|
9 minutes
Defining setup.py dependencies using a URL
For [sqlite-utils issue 464](https://github.com/simonw/sqlite-utils/issues/464) I implemented a fix to a tiny bug in a dependency in [my own fork](...
218 words
|
1 minute
Managing Packages in Fedora CoreOS - A Comprehensive DNF and rpm-ostree Guide
A detailed guide on package management in Fedora CoreOS using DNF and rpm-ostree, covering system updates, layered packages, troubleshooting, and best practices for container-optimized environments.
1222 words
|
6 minutes
Emulating a big-endian s390x with QEMU
I got [a bug report](https://github.com/simonw/sqlite-fts4/issues/6) concerning my [sqlite-fts4](https://github.com/simonw/sqlite-fts4) project run...
434 words
|
2 minutes
Preventing double form submissions with JavaScript
I needed this for [VIAL issue 722](https://github.com/CAVaccineInventory/vial/issues/722). I decided to disable form submissions for two seconds af...
108 words
|
1 minute
HTML video that loads when the user clicks play
2024-05-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.
115 words
|
1 minute
Loading Twitter Birdwatch into SQLite for analysis with Datasette
[Twitter Birdwatch](https://twitter.github.io/birdwatch/) is "a collaborative way to add helpful context to Tweets and keep people better informed".
1480 words
|
7 minutes
Converting Airtable JSON for use with sqlite-utils using jq
The Airtable API outputs JSON that looks like this:
380 words
|
2 minutes
Personalized Zsh Theme for a Professional Workspace
A detailed guide on creating a personalized Zsh theme for a professional and efficient workspace, designed by Anubhav Gain.
351 words
|
2 minutes
Syntax highlighted code examples in Datasette
I wanted to add syntax highlighting to the new tutorial [Data analysis with SQLite and Python](https://datasette.io/tutorials/data-analysis).
349 words
|
2 minutes
Customizing my zsh prompt
I got fed up of the default macOS `zsh` prompt:
55 words
|
1 minute
Trying out free-threaded Python on macOS
Inspired by [py-free-threading.github.io](https://py-free-threading.github.io/) I decided to try out a beta of Python 3.13 with the new free-thread...
987 words
|
5 minutes
Annotated code for a demo of WebSocket chat in Deno Deploy
Deno Deploy is a hosted Deno service that promises [a multi-tenant JavaScript engine running in 25 data centers across the world](https://deno.com/...
649 words
|
3 minutes
literalinclude with markers for showing code in documentation
I [wanted to include](https://github.com/simonw/datasette/issues/1830) some example Python tests in the Datasette documentation - but since they we...
315 words
|
2 minutes
Django Admin action for exporting selected rows as CSV
I wanted to add an action option to the Django Admin for exporting the currently selected set of rows (or every row in the table) as a CSV file.
407 words
|
2 minutes