Farshid's Weblog

Posts tagged “TIL”

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