Simon Willison’s Weblog

Subscribe

September 2020

87 posts: 8 entries, 10 links, 5 quotes, 64 beats

Sept. 1, 2020

TIL Start a server in a subprocess during a pytest session — I wanted to start an actual server process, run it for the duration of my pytest session and shut it down at the end.
Release dogsheep-beta 0.1a — Build a search index across content from multiple SQLite database tables and run faceted searches against it using Datasette
Release dogsheep-beta 0.1a2 — Build a search index across content from multiple SQLite database tables and run faceted searches against it using Datasette
Release dogsheep-beta 0.1 — Build a search index across content from multiple SQLite database tables and run faceted searches against it using Datasette

Simply put, if you’re in a position of power at work, you’re unlikely to see workplace harassment in front of you. That’s because harassment and bullying are attempts to exert power over people with less of it. People who behave improperly don’t tend to do so with people they perceive as having power already.

Sarah Milstein

# 3:10 pm / management

Release dogsheep-beta 0.2 — Build a search index across content from multiple SQLite database tables and run faceted searches against it using Datasette

Sept. 2, 2020

TIL Looping over comma-separated values in Bash — Given a file (or a process) that produces comma separated values, here's how to split those into separate variables and use them in a bash script.
TIL Using the gcloud run services list command — The `gcloud run services list` command lists your services running on Google Cloud Run:
Release dogsheep-beta 0.3 — Build a search index across content from multiple SQLite database tables and run faceted searches against it using Datasette

The “await me maybe” pattern for Python asyncio

I’ve identified a pattern for handling potentially-asynchronous callback functions in Python which I’m calling the “await me maybe” pattern. It works by letting you return a value, a callable function that returns a value OR an awaitable function that returns that value.

[... 787 words]

Sept. 3, 2020

Render Markdown tool (via) I wrote a quick JavaScript tool for rendering Markdown via the GitHub Markdown API—which includes all of their clever extensions like tables and syntax highlighting—and then stripping out some extraneous HTML to give me back the format I like using for my blog posts.

# 12:08 am / github, javascript, projects, markdown

Release dogsheep-beta 0.4a0 — Build a search index across content from multiple SQLite database tables and run faceted searches against it using Datasette
TIL Debugging a Click application using pdb — This tip is for when you are working on a Python command-line application that runs using that program's name, as opposed to typing `python my_script.py`. I usually need this when I'm working on applications built using [Click](https://click.palletsprojects.com/), e.g. projects I start using my [click-app](https://github.com/simonw/click-app) cookiecutter template.
Release dogsheep-beta 0.4a1 — Build a search index across content from multiple SQLite database tables and run faceted searches against it using Datasette
Release dogsheep-beta 0.4 — Build a search index across content from multiple SQLite database tables and run faceted searches against it using Datasette
Release dogsheep-beta 0.4.1 — Build a search index across content from multiple SQLite database tables and run faceted searches against it using Datasette

Weeknotes: airtable-export, generating screenshots in GitHub Actions, Dogsheep!

This week I figured out how to populate Datasette from Airtable, wrote code to generate social media preview card page screenshots using Puppeteer, and made a big breakthrough with my Dogsheep project.

[... 1,461 words]

Sept. 4, 2020

Release dogsheep-beta 0.5 — Build a search index across content from multiple SQLite database tables and run faceted searches against it using Datasette

Sept. 5, 2020

Release dogsheep-beta 0.6 — Build a search index across content from multiple SQLite database tables and run faceted searches against it using Datasette
Release datasette-block-robots 0.2 — Datasette plugin that blocks robots and crawlers using robots.txt

Sept. 6, 2020

Release datasette-block-robots 0.3 — Datasette plugin that blocks robots and crawlers using robots.txt
Release datasette-backup 0.1a — Plugin adding backup options to Datasette
Release sqlite-dump 0.1a — An improved version of .iterdump() for sqlite3
TIL Very basic tsc usage — I guess I [have to learn TypeScript](https://twitter.com/simonw/status/1302517496767938561) now.

Sept. 7, 2020

Release sqlite-dump 0.1 — An improved version of .iterdump() for sqlite3
Release sqlite-dump 0.1.1 — An improved version of .iterdump() for sqlite3
Release datasette-backup 0.1 — Plugin adding backup options to Datasette
TIL Display EC2 instance costs per month — The [EC2 pricing page](https://aws.amazon.com/ec2/pricing/on-demand/) shows cost per hour, which is pretty much useless. I want cost per month. The following JavaScript, pasted into the browser developer console, modifies the page to show cost-per-month instead.
Release sqlite-utils 2.17 — Python CLI utility and library for manipulating SQLite databases
TIL Basic strace to see what a process is doing — I had a long-running process and I wanted to check that it was at least doing _something_.

2020 » September

MTWTFSS
 123456
78910111213
14151617181920
21222324252627
282930