Use setup.py to install platform-specific dependencies
2024-06-28
For [photos-to-sqlite](https://github.com/dogsheep/photos-to-sqlite) I needed to install `osxphotos` as a dependency, but only if the platform is m...
64 words
|
1 minute
Managing Podman Containers with Systemd - Traditional Methods vs. Quadlet
2024-06-28
A comprehensive guide to integrating Podman containers with systemd, comparing the traditional service file approach with the modern Quadlet method, with detailed examples and best practices.
1644 words
|
8 minutes
Implementing a "copy to clipboard" button
2024-06-28
I had to figure this out while building [datasette-copyable](https://github.com/simonw/datasette-copyable/) - demo [here](https://covid-19.datasett...
194 words
|
1 minute
SQLite aggregate filter clauses
2024-06-26
SQLite supports aggregate filter clauses (as of [3.30.0, released 2019-10-04](https://www.sqlite.org/changes.html#version_3_30_0)), as described in...
180 words
|
1 minute
Converting no-decimal-point latitudes and longitudes using jq
2024-06-25
I had some data with weird co-ordinates in it:
236 words
|
1 minute
Comparing database rows before and after with SQLite JSON functions
2024-06-25
Here's a trick I've been using to compare the rows in a table before and after I perform an operation against it. It works well for a few hundred (...
250 words
|
1 minute
Testing cookiecutter templates with pytest
2024-06-25
I added some unit tests to my [datasette-plugin](https://github.com/simonw/datasette-plugin) cookiecutter template today, since the latest features...
167 words
|
1 minute
Paginating through the GitHub GraphQL API with Python
2024-06-25
(See also [Building a self-updating profile README for GitHub](https://simonwillison.net/2020/Jul/10/self-updating-profile-readme/) on my blog)
343 words
|
2 minutes
Managing Multiple GitHub Accounts on a Single Machine - A Comprehensive Guide
2024-06-25
A step-by-step guide to effectively setting up and managing multiple GitHub accounts on a single machine using SSH keys, custom hosts, and repository-specific configurations.
1376 words
|
7 minutes
Using jq in an Observable notebook
2024-06-24
I use the `jq` language quite a lot these days, mainly because I can get ChatGPT to write little JSON transformation programs for me very quickly.
208 words
|
1 minute
Ignoring a line in both flake8 and mypy
2024-06-23
I [needed to tell](https://github.com/simonw/sqlite-utils/pull/347#issuecomment-982133970) both `flake8` and `mypy` to ignore the same line of code.
68 words
|
1 minute
How to create a tarball of a git repository using "git archive"
2024-06-23
I figured this out in [a Gist in 2016](https://gist.github.com/simonw/a44af92b4b255981161eacc304417368) which has attracted a bunch of comments ove...
189 words
|
1 minute
Figuring out if a text value in SQLite is a valid integer or float
2024-06-23
Given a table with a `TEXT` column in SQLite I want to figure out if every value in that table is actually the text representation of an integer or...
328 words
|
2 minutes
Fixing broken text encodings with sqlite-transform and ftfy
2024-06-23
I was working with a database table that included values that were clearly in the wrong character encoding - values like this:
115 words
|
1 minute
Editing an iPhone home screen using macOS
2024-06-23
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 let...
224 words
|
1 minute
Histogram with tooltips in Observable Plot
2024-06-22
Given an array of datetime objects, I wanted to plot a histogram. But I wanted to automatically pick a bucket size for that histogram that resulted...
418 words
|
2 minutes
Publishing to a public Google Cloud bucket with gsutil
2024-06-22
I decided to publish static CSV files to accompany my https://cdc-vaccination-history.datasette.io/ project, using a Google Cloud bucket (see [cdc-...
142 words
|
1 minute
Deploying CoreDNS and StepCA on CoreOS using Podman Quadlet
2024-06-22
A comprehensive guide to deploying and managing CoreDNS and StepCA on Fedora CoreOS using Podman Quadlet for systemd integration, providing robust DNS and certificate management services.
1829 words
|
9 minutes
Subqueries in select expressions in SQLite - also window functions
2024-06-21
I figured out a single SQL query for the following today. Given a table of GitHub repositories, for each repository return:
1778 words
|
9 minutes
Conditionally creating directories in cookiecutter
2024-06-21
I wanted my [datasette-plugin](https://github.com/simonw/datasette-plugin) cookiecutter template to create empty `static` and `templates` directori...
103 words
|
1 minute
Tailing Google Cloud Run request logs and importing them into SQLite
2024-06-21
The `gcloud` CLI tool has [the alpha ability to tail log files](https://cloud.google.com/logging/docs/reference/tools/gcloud-logging#live-tailing) ...
849 words
|
4 minutes
Programmatically comparing Python version strings
2024-06-21
I found myself wanting to compare the version numbers `0.63.1`, `1.0` and the `1.0a13` in Python code, in order to mark a `pytest` test as skipped ...
191 words
|
1 minute
Lazy loading images in HTML
2024-06-21
[Most modern browsers](https://caniuse.com/loading-lazy-attr) now include support for the `loading="lazy"` image attribute, which causes images not...
150 words
|
1 minute
Using custom Sphinx templates on Read the Docs
2024-06-21
I wanted to make a small customization to one of my documentation templates on Read the Docs.
254 words
|
1 minute