Adding a CORS policy to an S3 bucket
Amazon S3 buckets that are configured to work as public websites can support CORS, allowing assets such as JavaScript modules to be loaded by JavaS...
511 words
|
3 minutes
Ensure labels exist in a GitHub repository
I wanted to ensure that when [this template repository](https://github.com/simonw/action-transcription) was used to create a new repo that repo wou...
151 words
|
1 minute
Registering new Datasette plugin hooks by defining them in other plugins
I'm experimenting with a Datasette plugin that itself adds new plugin hooks which other plugins can then interact with.
137 words
|
1 minute
Combining substr and instr to extract text
Derek Willis has [a Datasette instance full of political campaign emails](https://political-emails.herokuapp.com/) running on Heroku.
410 words
|
2 minutes
One-liner for running queries against CSV files with SQLite
I figured out how to run a SQL query directly against a CSV file using the `sqlite3` command-line utility:
405 words
|
2 minutes
Calculating the AQI based on the Purple Air API for a sensor
[Purple Air](https://www.purpleair.com/) sensors have an API at `https://www.purpleair.com/map.json?show=SENSOR-ID-HERE`, which returns JSON that l...
342 words
|
2 minutes
Using pprint() to print dictionaries while preserving their key order
While parsing a CSV file using `csv.DictReader` today I noticed the following surprising result:
176 words
|
1 minute
Configuring auto-update for an Electron app
This is _almost_ really simple. I used [electron/update-electron-app](https://github.com/electron/update-electron-app) for it, the instructions for...
355 words
|
2 minutes