Farshid's Weblog

Posts tagged "til"

# Title Date Author
320
Castle vs. Moat
319
Circuit breakers needs durable state
318
Critical lessons from implementing a highly complex workflow system
317
Installing lxml for Python on an M1/M2 Mac
316
Recursively fetching metadata for all files in a Google Drive folder
315
Open a debugging shell in GitHub Actions with tmate
314
Running a Python ASGI app on Vercel
313
SQLite BLOB literals
312
Understanding option names in Click
311
Programmatically comparing Python version strings
310
Publishing to a public Google Cloud bucket with gsutil
309
Password hashing in Python with pbkdf2
308
Subqueries in select expressions in SQLite - also window functions
307
Using lsof on macOS
306
Logging users out of Auth0
305
Serving a custom vector web map using PMTiles and maplibre-gl
304
Using fs_usage to see what files a process is using
303
Using heroku pg:pull to restore a backup to a macOS laptop
302
Protocols in Python
301
Installing Selenium for Python on macOS with ChromeDriver
300
Packaging a Python CLI tool for Homebrew
299
struct endianness in Python
298
Using tree-sitter with Python
297
Identifying column combination patterns in a SQLite table
296
Using macOS stickies to display a workshop link on the screen
295
Reformatting text with Copilot
294
Snapshot testing with Syrupy
293
Testing a Click app with streaming input
292
Running Varnish on Fly
291
Open external links in an Electron app using the system browser
290
Ignoring errors in a section of a Bash script
289
Mocking a Textract LimitExceededException with boto
288
Upgrading a Heroku PostgreSQL database with pg:copy
287
Using llama-cpp-python grammars to generate JSON
286
Redirecting a whole domain with Cloudflare
285
Using io.BufferedReader to peek against a non-peekable stream
284
Using custom Sphinx templates on Read the Docs
283
Publishing a simple client-side JavaScript package to npm with GitHub Actions
282
Streaming output of an indented JSON array
281
Testing against Python 3.11 preview using GitHub Actions
280
Rate limiting by IP using Cloudflare's rate limiting rules
279
Training nanoGPT entirely on content from my blog
278
Whisky sour
277
Minifying JavaScript with npx uglify-js
276
Replicating SQLite with rqlite
275
Running self-hosted QuickJS in a browser
274
Simple load testing with Locust
273
Running tests against multiple versions of a Python dependency in GitHub Actions
272
Lazy loading images in HTML
271
Using boto3 from the command line
270
Manipulating query strings with URLSearchParams
269
macOS Catalina sort-of includes Python 3
268
Serving a JavaScript project built using Vite from GitHub Pages
267
Using the gcloud run services list command
266
Paginating through the GitHub GraphQL API with Python
265
Pausing traffic and retrying in Caddy
264
Syntax highlighting Python console examples with GFM
263
impaste: pasting images to piped commands on macOS
262
Trying out Quarto on macOS
261
Turning on Jinja autoescaping when using Template() directly
260
Running Python code in a Pyodide sandbox via Deno
259
Run Python code in a WebAssembly sandbox
258
Trying out the facebook/musicgen-small sound generation model
257
Trying out the facebook/musicgen-small sound generation model
256
Using the Fly Docker registry
255
Syncing slide images and audio in iMovie
254
Using cog to update --help in a Markdown README file
253
Using sphinx.ext.extlinks for issue links
252
Wider tooltip areas for Observable Plot
251
Trying out SQLite extensions on macOS
250
Outputting JSON with reduced floating point precision
249
Publishing a Docker container for Microsoft Edit to the GitHub Container Registry
248
Wildcard DNS and SSL on Fly
247
Running OCR against a PDF file with AWS Textract
246
Using DuckDB in Python to access Parquet data
245
Using VCR and pytest with pytest-recording
244
Installing flash-attn without compiling it
243
Using GPT-3 to figure out jq recipes
242
Using pprint() to print dictionaries while preserving their key order
241
Session-scoped temporary directories in pytest
240
SQLite pragma_function_list()
239
Vega-Lite bar charts in the same order as the data
238
Introspecting Python function parameters
237
Recovering data from AWS Lightsail using EC2
236
Testing things in Fedora using Docker
235
Querying the GitHub archive with the ClickHouse playground
234
Running multiple servers in a single Bash script
233
Signing and notarizing an Electron app for distribution using GitHub Actions
232
Using build-arg variables with Cloud Run deployments
231
Treating warnings as errors in pytest
230
Using jq in an Observable notebook
229
SQLite triggers
228
Storing and serving related documents with openai-to-sqlite and embeddings
227
mlc-chat - RedPajama-INCITE-Chat-3B on macOS
226
Upgrade Postgres.app on macOS
225
Using Jest without a package.json
224
Looping over comma-separated values in Bash
223
Pisco sour
222
Search and replace with regular expressions in VS Code
221
migrations.RunSQL.noop for reversible SQL migrations
220
Running gdb against a Python process in a running Docker container
219
Using the tesseract CLI tool
218
kubectl proxy
217
Removing a git commit and force pushing to remove it from history
216
Reading thermometer temperatures over time from a video
215
Testing cookiecutter templates with pytest
214
Importing CSV data into SQLite with .import
213
Increasing the time limit for a Google Cloud Scheduler task
212
Using C_INCLUDE_PATH to install Python packages
211
Using psutil to investigate "Too many open files"
210
Lag window function in SQLite
209
One-liner for running queries against CSV files with SQLite
208
Running Docker on an M1 Mac
207
Tracing every executed Python statement
206
Using nginx to proxy to a Unix domain socket
205
Writing JavaScript that responds to media queries
204
Mocking Stripe signature checks in a pytest fixture
203
Using git-filter-repo to set commit dates to author dates
202
Using the sqlite3 Python module in Pyodide - Python WebAssembly
201
Intercepting fetch in a service worker
200
Installing tools written in Go
199
Rewriting a repo to contain the history of just specific files
198
Upgrading a pipx application to an alpha version
197
Using SQL with GDAL
196
Running pytest against a specific Python version with uv run
195
Streaming indented output of a JSON array
194
Reusing an existing Click tool with register_commands
193
Running a gpt-oss eval suite against LM Studio on a Mac
192
Saving an in-memory SQLite database to a file in Python
191
Using awk to add a prefix
190
Skipping CSV rows with odd numbers of quotes using ripgrep
189
Start, test, then stop a localhost web server in a Bash script
188
Loading radio.garden into SQLite using jq
187
Switching between gcloud accounts
186
Writing Fly logs to S3
185
__init_subclass__
184
Social media cards generated with shot-scraper
183
The simplest recursive CTE
182
Making HTTP calls using IPv6
181
Updating stable docs in ReadTheDocs without pushing a release
180
Working around the size limit for nodeValue in the DOM
179
KNN queries with SpatiaLite
178
Pointing a custom subdomain at Read the Docs
177
The location of the pip cache directory
176
Upgrading Homebrew and avoiding the failed to verify attestation error
175
Using recursive CTEs to explore hierarchical Twitter threads
174
pytest coverage with context
173
Transferring a GitHub issue from a private to a public repository
172
SQLite VACUUM: database or disk is full
171
Running jupyterlab via uv tool install
170
Installing different PostgreSQL server versions in GitHub Actions
169
Publishing a Web Component to npm
168
Implementing a "copy to clipboard" button
167
Quickly testing code in a different Python version using pyenv
166
Limited JSON API for Google searches using Programmable Search Engine
165
Start a server in a subprocess during a pytest session
164
Using async/await in JavaScript in Selenium
163
Using OpenAI functions and their Python library for data extraction
162
Using Prettier to check JavaScript code style in GitHub Actions
161
Installing packages from Debian unstable in a Docker image based on stable
160
Redirecting all paths on a Vercel instance
159
Testing different Python versions with uv with-editable and uv-test
158
Migrating a GitHub wiki from one repository to another
157
Processing a stream of chunks of JSON with ijson
156
Upgrading packages with npm
155
Registering the same Pluggy hook multiple times in a single file
154
Running cog automatically against GitHub pull requests
153
Safely outputting JSON
152
Livestreaming a community election event on YouTube
151
Registering temporary pluggy plugins inside tests
150
Summarizing Hacker News discussion themes with Claude and LLM
149
Trick Apple Photos into letting you access your video files
148
Useful Markdown extensions in Python
147
Named Entity Resolution with dslim/distilbert-NER
146
Setting cache-control: max-age=31536000 with a Cloudflare Transform Rule
145
The pdb interact command
144
Using ChatGPT to write AppleScript
143
Restricting SSH connections to devices within a Tailscale network
142
Using grep to write tests in CI
141
Sort by number of JSON intersections
140
Running pip install -e .[test] in zsh on macOS Catalina
139
Seeing files opened by a process using opensnoop
138
Using Tesseract.js to OCR every image on a page
137
Mocking subprocess with pytest-subprocess
136
Using the undocumented Fly GraphQL API
135
sips: Scriptable image processing system
134
Piping echo to a file owned by root using sudo and tee
133
Publish releases to PyPI from GitHub Actions without a password or token
132
SQLite aggregate filter clauses
131
Turning an array of arrays into objects with jq
130
JSON Pointer
129
Listen to a web page in Mobile Safari
128
Running different steps on a schedule
127
Summing columns in remote Parquet files using DuckDB
126
TOML in Python
125
Running pip install '.[docs]' on ReadTheDocs
124
Show files opened by pytest tests
123
Simplest possible OAuth authentication with Auth0
122
Set a GIF to loop using ImageMagick
121
Piping from rg to llm to answer questions about code
120
SQLite can use more than one index for a query
119
Loading lit from Skypack
118
Using iconv to convert the text encoding of a file
117
SQLite timestamps with floating point seconds
116
Promoting the stable version of the documentation using rel=canonical
115
Querying for GitHub issues open for less than 60 seconds
114
Using S3 triggers to maintain a list of files in DynamoDB
113
The most basic possible Hugo site
112
Listing files uploaded to Cloud Build
111
Show the SQL schema for a PostgreSQL database
110
Using the ChatGPT streaming API from Python
109
JavaScript date objects
108
Python packages with pyproject.toml and nothing else
107
Tailing Google Cloud Run request logs and importing them into SQLite
106
Trying out Python packages with ipython and uvx
105
os.remove() on Windows fails if the file is already open
104
Verifying your GitHub profile on Mastodon
103
Querying for items stored in UTC that were created on a Thursday in PST
102
Running Dolly 2.0 on Paperspace
101
Trying out free-threaded Python on macOS
100
WebAuthn browser support
99
Run pytest against a specific Python version using Docker
98
Skipping a GitHub Actions step without failing
97
Transcribing MP3s with whisper-cpp on macOS
96
Using a Tailscale exit node with GitHub Actions
95
Using unnest() to use a comma-separated string as the input to an IN query
94
Workaround for google-github-actions/setup-gcloud errors
93
The SQLite now argument is stable within the same query
92
Using namedtuple for pytest parameterized tests
91
Packaging a Python app as a standalone binary with PyInstaller
90
Providing a "subscribe in Google Calendar" link for an ics feed
89
The Wikipedia page stats API
88
Read the Docs Search API
87
Reporting bugs in GitHub to GitHub
86
Splitting on commas in SQLite
85
Using curl to run GraphQL queries from the command line
84
Installing Python on macOS with the official Python installer
83
Testing the Access-Control-Max-Age CORS header
82
Writing an Azure Function that serves all traffic to a subdomain
81
Only run GitHub Action on push to master / main
80
Quick and dirty mock testing with mock_calls
79
Running Ethernet over existing coaxial cable
78
Using Playwright MCP with Claude Code
77
Scroll page to form if there are errors
76
Styling an HTML dialog modal to take the full height of the viewport
75
Writing pytest tests against tools written with argparse
74
Running PyPy on macOS using Homebrew
73
Scraping the Sky News Westminster Accounts, a Flourish application
72
Understanding the CSS auto-resizing textarea trick
71
Track timestamped changes to a SQLite table using triggers
70
Rewriting a Git repo to remove secrets from the history
69
Search across all loaded resources in Firefox
68
Using Fabric with an SSH public key
67
Scroll to text fragments
66
Planning parallel downloads with TopologicalSorter
65
literalinclude with markers for showing code in documentation
64
Understanding Kristofer Joseph's Single File Web Component
63
Searching for repositories by topic using the GitHub GraphQL API
62
List all columns in a SQLite database
61
Null case comparisons in SQLite
60
Storing files in an S3 bucket between GitHub Actions runs
59
Local wildcard DNS on macOS with dnsmasq
58
Using json_extract_path in PostgreSQL
57
Upgrading Python Homebrew packages using pip
56
Using the GitHub Actions cache with npx and no package.json
55
Returning related rows in a single SQL query using JSON
54
Mouse support in vim
53
Pixel editing a favicon with Pixelmator
52
Logging OpenAI API requests and responses using HTTPX
51
Testing Electron apps with Playwright and GitHub Actions
50
shot-scraper for a subset of table columns
49
Opt-in integration tests with pytest --integration
48
Using ChatGPT Browse to name a Python package
47
Rendering Markdown with the GitHub Markdown API
46
Redirecting a domain using Cloudflare Pages
45
Trying out cr-sqlite on macOS
44
Setting up a custom subdomain for a GitHub Pages site
43
Scraping Reddit via their JSON API
42
Optimizing PNGs in GitHub Actions using Oxipng
41
Using LD_PRELOAD to run any version of SQLite with Python
40
Passing command arguments using heredoc syntax
39
Loading SQLite extensions in Python on macOS
38
Using packages from JSR with esbuild
37
Interpreting photo orientation and locations in EXIF data
36
Relinquishing control in Python asyncio
35
Shrinking PNG files with pngquant and oxipng
34
Using the Chrome DevTools console as a REPL for an Electron app
33
Using pysqlite3 on macOS
32
Ignoring a line in both flake8 and mypy
31
Using pipenv and Docker
30
Programatically accessing Heroku PostgreSQL from GitHub Actions
29
Testing HTML tables with Playwright Python
28
Use setup.py to install platform-specific dependencies
27
Running nanoGPT on a MacBook M2 to generate terrible Shakespeare
26
Running tests against PostgreSQL in a service container
25
Tommy's Margarita
24
nullglob in bash
23
Language-specific indentation settings in VS Code
22
Writing tests with Copilot
21
Running prompts against images, PDFs, audio and video with Google Gemini
20
Linking from /latest/ to /stable/ on Read The Docs
19
Running a MySQL server using Homebrew
18
Using expect() to wait for a selector to match multiple items
17
Running Python code in a subprocess with a time limit
16
Tracking SQLite table history using a JSON audit log
15
Very basic tsc usage
14
Ordered group_concat() in SQLite
13
Querying newline-delimited JSON logs using AWS Athena
12
Set environment variables for all steps in a GitHub Action
11
Using uv to develop Python command-line applications
10
Using pytest and Playwright to test a JavaScript web application
9
Preventing double form submissions with JavaScript
8
Writing tests for the ASGI lifespan protocol with HTTPX
7
Running LLaMA 7B and 13B on a 64GB M2 MacBook Pro with llama.cpp
6
Reviewing your history of public GitHub repositories using ClickHouse
5
Updating a Markdown table of contents with a GitHub Action
4
Running OpenAI's large context models using llm
3
Unix timestamp in milliseconds in SQLite
2
Use labels on Cloud Run services for a billing breakdown
1
Talking to a PostgreSQL service container from inside a Docker container