SQLite pragma_function_list()
The SQLite `pragma_function_list()` table-valued function returns a list of functions that have been registered with SQLite, including functions th...
932 words
|
5 minutes
SQLite BLOB literals
I wanted to construct a string of SQL that would return a blob value:
114 words
|
1 minute
Configuring Django SQL Dashboard for Fly PostgreSQL
I have a Fly application that uses their PostgreSQL service. I wanted to run [Django SQL Dashboard]() with a read-only user against that database.
518 words
|
3 minutes
Summing columns in remote Parquet files using DuckDB
[vivym/midjourney-messages](https://huggingface.co/datasets/vivym/midjourney-messages) on Hugging Face is a large (~8GB) dataset consisting of 55,0...
2277 words
|
11 minutes
Export a Mastodon timeline to SQLite
I've been playing around with [the Mastodon timelines API](https://docs.joinmastodon.org/methods/timelines/). It's pretty fun!
342 words
|
2 minutes
Natural Earth in SpatiaLite and Datasette
Natural Earth ([website](https://www.naturalearthdata.com/), [Wikipedia](https://en.wikipedia.org/wiki/Natural_Earth)) is a a public domain map dat...
758 words
|
4 minutes
Using tree-sitter with Python
[tree-sitter](https://tree-sitter.github.io/tree-sitter/) is a "parser generator tool and an incremental parsing library". It has a very good reput...
795 words
|
4 minutes
Using the gcloud run services list command
The `gcloud run services list` command lists your services running on Google Cloud Run:
381 words
|
2 minutes
Annotated package.json for idb-keyval
Jake Archibald [pointed to](https://twitter.com/jaffathecake/status/1491771402294370306) his `package.json` for `idb-keyval` as a "modernish exampl...
804 words
|
4 minutes
Verifying your GitHub profile on Mastodon
Mastodon has a really neat way of implementing verification, using the [rel=me microformat](https://microformats.org/wiki/rel-me).
565 words
|
3 minutes
Track timestamped changes to a SQLite table using triggers
This is more of a "today I figured out" than a TIL.
662 words
|
3 minutes
Using DuckDB in Python to access Parquet data
Did a quick experiment with [DuckDB](https://duckdb.org/) today, inspired by the [bmschmidt/hathi-binary](https://github.com/bmschmidt/hathi-binary...
291 words
|
1 minute
Format code examples in documentation with blacken-docs
I decided to enforce that all code examples in the [Datasette documentation](https://docs.datasette.io/) be formatted using [Black](https://github....
396 words
|
2 minutes
Set environment variables for all steps in a GitHub Action
From [this example](https://github.com/GoogleCloudPlatform/github-actions/blob/20c294aabd5331f9f7b8a26e6075d41c31ce5e0d/example-workflows/cloud-run...
89 words
|
1 minute
Simplest possible OAuth authentication with Auth0
[Auth0](https://auth0.com/) provides an authentication API which you can use to avoid having to deal with user accounts in your own web application.
576 words
|
3 minutes
Running Prettier against Django or Jinja templates
I really like auto-formatting tools like Black. I've been hoping to find one that works with Django and Jinja templates for years.
360 words
|
2 minutes
Allowing a container in Docker Desktop for Mac to talk to a PostgreSQL server on the host machine
I like using [Postgres.app](https://postgresapp.com/) to run PostgreSQL on my macOS laptop. I use it for a bunch of different projects.
290 words
|
1 minute
Using the GitHub Actions cache with npx and no package.json
Some of my repositories have GitHub Actions workflows that execute commands using `npx`, for example my [graphql-scraper](https://github.com/simonw...
263 words
|
1 minute
Athena error: The specified key does not exist
I was trying to run Athena queries against compressed JSON log files stored in an S3 bucket.
267 words
|
1 minute
__init_subclass__
David Beazley [on Twitter](https://twitter.com/dabeaz/status/1466731368956809219) said:
306 words
|
2 minutes
Using Fabric with an SSH public key
Inspired by [this tweet](https://twitter.com/driscollis/status/1445772718507376646) by Mike Driscoll I decided to try using Fabric to run commands ...
97 words
|
1 minute
Testing the Access-Control-Max-Age CORS header
Today I noticed that [Datasette](https://datasette.io/) wasn't serving a `Access-Control-Max-Age` header.
543 words
|
3 minutes
Passing command arguments using heredoc syntax
This trick works for both Bash and zsh.
189 words
|
1 minute
Quick and dirty mock testing with mock_calls
I needed to write a test that checked for a really complex sequence of mock calls for [s3-credentials#3](https://github.com/simonw/s3-credentials/i...
341 words
|
2 minutes