Simon Willison’s Weblog

Subscribe
Atom feed

Elsewhere

Filters: Sorted by date

TIL Null case comparisons in SQLite — I wanted to say "output this transformed value if it's not null, otherwise nothing". The recipe I figured out was:
TIL Using macOS stickies to display a workshop link on the screen — When giving a workshop it's often useful to have a URL to the workshop materials visible on screen at all times. I use a bit.ly link for these.
TIL Running different steps on a schedule — Say you have a workflow that runs hourly, but once a day you want the workflow to run slightly differently - without duplicating the entire workflow.
TIL Lag window function in SQLite — Here's [how to use a lag window…
TIL Running a Python ASGI app on Vercel — Vercel really wants you to deploy static assets with [serverless functions](https://vercel.com/docs/serverless-functions/introduction) tucked away in a separate folder. They suggest creating modules like `api/index.py` which will be served up automatically as API backends to your client-side JavaScript.
TIL Commit a file if it changed — This recipe runs a Python script to update a README, then commits it back to the parent repo but only if it has changed:
TIL Convert a datetime object to UTC without using pytz — I wanted to convert a datetime object (from GitPython) to UTC without adding the `pytz` dependency.
TIL 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/.github/workflows/cloud-run.yml) I learned that you can set environment variables such that they will be available in ALL jobs once at the top of a workflow:
TIL Dump out all GitHub Actions context — Useful for seeing what's available for `if: ` conditions (see [context and expression syntax](https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions)).
TIL Only run GitHub Action on push to master / main — Spotted in [this Cloud Run example](https://github.com/GoogleCloudPlatform/github-actions/blob/20c294aabd5331f9f7b8a26e6075d41c31ce5e0d/example-workflows/cloud-run/.github/workflows/cloud-run.yml):
Release datasette-publish-vercel 0.4.1a — Datasette plugin for publishing data using Vercel
Release github-to-sqlite 1.1 — Save data from GitHub to a SQLite database
Release twitter-to-sqlite 0.21 — Save data from Twitter to a SQLite database
Release github-to-sqlite 1.0.1 — Save data from GitHub to a SQLite database
Release sqlite-utils 2.6 — Python CLI utility and library for manipulating SQLite databases
Release datasette-auth-existing-cookies 0.7 — Datasette plugin that authenticates users based on existing domain cookies
Release paginate-json 0.3 — Command-line tool for fetching JSON from paginated APIs
Release datasette-clone 0.4.1 — Create a local copy of database files from a Datasette instance
Release datasette-clone 0.4 — Create a local copy of database files from a Datasette instance
Release datasette-mask-columns 0.2 — Datasette plugin that masks specified database columns
Release datasette-mask-columns 0.1 — Datasette plugin that masks specified database columns
Release datasette-clone 0.3 — Create a local copy of database files from a Datasette instance
Release datasette-clone 0.2 — Create a local copy of database files from a Datasette instance
Release datasette-clone 0.1 — Create a local copy of database files from a Datasette instance
Release sqlite-utils 2.5 — Python CLI utility and library for manipulating SQLite databases
Release datasette-auth-github 0.12 — Datasette plugin that authenticates users against GitHub
Release datasette-jq 0.2.1 — Datasette plugin that adds a custom SQL function for executing jq expressions against JSON values
Release datasette-publish-vercel 0.4a — Datasette plugin for publishing data using Vercel
Release datasette-publish-vercel 0.3a — Datasette plugin for publishing data using Vercel
Release datasette-cluster-map 0.9.1 — Datasette plugin that shows a map for any data with latitude/longitude columns

Beats

Years

Tags