Writing a CLI utility that is also a Datasette plugin
I'm working on [dclient](https://github.com/simonw/dclient), a CLI tool for interacting with Datasette instances via the Datasette API.
307 words
|
2 minutes
Show the timezone for datetimes in the Django admin
Django supports storing dates in a database as UTC but displaying them in some other timezone - which is good. But... by default datetimes are show...
387 words
|
2 minutes
CIS Benchmark-Aligned Partitioning Scheme for Rocky Linux 9.5
A comprehensive guide to creating a secure, CIS Benchmark-compliant partitioning scheme for Rocky Linux 9.5 installations with 400 GiB of storage.
663 words
|
3 minutes
Formatting thousands in Jinja
2024-04-24
Here's how to format a number in Jinja with commas for thousands, without needing any custom filters or template functions:
64 words
|
1 minute
Skipping a GitHub Actions step without failing
I wanted to have a GitHub Action step run that might fail, but if it failed the rest of the steps should still execute and the overall run should b...
140 words
|
1 minute
Analyzing Google Cloud spend with Datasette
Google Cloud provide extremely finely grained billing, but you need to access it through BigQuery which I find quite inconvenient.
317 words
|
2 minutes
Using Tesseract.js to OCR every image on a page
Pasting this code into a DevTools console should load [Tesseract.js](https://github.com/naptha/tesseract.js) from a CDN, loop through every image l...
170 words
|
1 minute
Migrating a GitHub wiki from one repository to another
I figured out how to migrate a [GitHub wiki](https://docs.github.com/en/communities/documenting-your-project-with-wikis/about-wikis) (public or pri...
123 words
|
1 minute
How to almost get facet counts in the Django admin
For a tantalizing moment today I thought I'd found a recipe for adding facet counts to the Django admin.
658 words
|
3 minutes
Using pytest-django with a reusable Django application
I published a reusable Django application today: **[django-http-debug](https://github.com/simonw/django-http-debug)**, which lets you define mock H...
744 words
|
4 minutes
Downloading MapZen elevation tiles
[Via Tony Hirst](https://twitter.com/psychemedia/status/1357280624319553537) I found out about [MapZen's elevation tiles](https://www.mapzen.com/bl...
69 words
|
1 minute
Running jupyterlab via uv tool install
I tried to get [jupyterlab](https://jupyter.org/install) working via `uv tool install` today and ran into some sharp edges.
231 words
|
1 minute
Installing different PostgreSQL server versions in GitHub Actions
The GitHub Actions `ubuntu-latest` default runner currently includes an installation of PostgreSQL 13. The server is not running by default but you...
224 words
|
1 minute
Flattening nested JSON objects with jq
I wanted to take a nested set of JSON objects and import them into a SQLite database using `sqlite-utils insert` - but I wanted to "flatten" some o...
390 words
|
2 minutes
Serving a JavaScript project built using Vite from GitHub Pages
I figured out how to serve a JavaScript project built using [Vite](https://vitejs.dev/) using GitHub Pages and a custom build script that runs usin...
654 words
|
3 minutes
Loading radio.garden into SQLite using jq
http://radio.garden/ is an amazing website which displays a 3D globe covered in radio stations and lets you listen to any of them.
306 words
|
2 minutes
Configuring Dependabot for a Python project
GitHub's Dependabot can automatically file PRs with bumps to dependencies when new versions of them are available.
142 words
|
1 minute
Reusing an existing Click tool with register_commands
The [register_commands](https://docs.datasette.io/en/stable/plugin_hooks.html#register-commands-cli) plugin hook lets you add extra sub-commands to...
160 words
|
1 minute
Running tests against multiple versions of a Python dependency in GitHub Actions
My [datasette-export-notebook](https://github.com/simonw/datasette-export-notebook) plugin worked fine in the stable release of Datasette, currentl...
310 words
|
2 minutes
Upgrading Python Homebrew packages using pip
[VisiData 2.0](https://www.visidata.org/) came out today. I previously installed VisiData using Homebrew, but the VisiData tap has not yet been upd...
110 words
|
1 minute
nullglob in bash
I ran into a tricky problem while working [on this issue](https://github.com/simonw/datasette-publish-fly/issues/17): the following line was behavi...
320 words
|
2 minutes
Reporting bugs in GitHub to GitHub
I found out today (via [this post](https://github.com/github-community/community/discussions/19988)) about a dedicated interface for reporting bugs...
55 words
|
1 minute
2024 Security Blacklist and Threat Intelligence
Comprehensive security blacklist and threat intelligence for 2024, covering malicious IPs, domains, and security indicators.
244 words
|
1 minute
Expressive Code Example
How code blocks look in Markdown using Expressive Code.
945 words
|
5 minutes