TILs
Filters: Sorted by date
575 results
«« first
« previous
page 3 / 20
next »
last »»
TIL
Running Prettier against Django or Jinja templates
— I really like auto-formatting tools like Black. I've been hoping to find one that works with Django and Jinja templates for years.
TIL
Upgrade Postgres.app on macOS
— I've been using [Postgres.app](https://postgresapp.com/) to run PostgreSQL on my Mac for years. I like that it's easy to install, gives me a task tray icon to control it and means I don't have to run a full Docker environment just to hack on projects like [my blog](https://github.com/simonw/simonwillisonblog).
TIL
Cloudflare redirect rules with dynamic expressions
— I wanted to ensure `https://niche-museums.com/` would redirect to `https://www.niche-museums.com/` - including any path - using Cloudflare.
TIL
Listen to a web page in Mobile Safari
— I found a better way to listen to a whole web page through text-to-speech on Mobile Safari today.
TIL
How I studied for my Ham radio general exam
— I scraped a pass on my Ham radio general exam today, on the second attempt (you can retake on the same day for an extra $15, thankfully).
TIL
Transcribing MP3s with whisper-cpp on macOS
— I asked [on Twitter](https://twitter.com/simonw/status/1783520794754318600) for tips about running Whisper transcriptions in the CLI on my Mac. Werner Robitza [pointed me](https://twitter.com/slhck/status/1783556354487034146) to Homebrew's [whisper-cpp](https://formulae.brew.sh/formula/whisper-cpp) formula, and when I complained that it didn't have quite enough documentation for me to know how to use it [Werner got a PR accepted](https://github.com/Homebrew/homebrew-core/pull/170148) adding…
TIL
A script to capture frames from a QuickTime video
— I was putting together some notes for a talk I gave, and I wanted an efficient way to create screenshots of specific moments in a video of that talk.
TIL
impaste: pasting images to piped commands on macOS
— I wanted the ability to paste the image on my clipboard into a command in the macOS terminal.
TIL
Installing tools written in Go
— Today I learned how to install tools from GitHub that are written in Go, using [github.com/icholy/semgrepx](https://github.com/icholy/semgrepx) as an example:
TIL
Google Chrome --headless mode
— In the README for [monolith](https://github.com/Y2Z/monolith) (a new Rust CLI tool for archiving HTML pages along with their images and assets) I spotted this tip for using Chrome in headless mode to execute JavaScript and output the resulting DOM:
TIL
Reviewing your history of public GitHub repositories using ClickHouse
— There's a story going around at the moment that people have found code from their private GitHub repositories in the AI training data known as The Stack, using this search tool: https://huggingface.co/spaces/bigcode/in-the-stack
TIL
Running self-hosted QuickJS in a browser
— I want to try using [QuickJS](https://bellard.org/quickjs/) compiled to WebAssembly in a browser as a way of executing untrusted user-provided JavaScript in a sandbox.
TIL
Programmatically comparing Python version strings
— I found myself wanting to compare the version numbers `0.63.1`, `1.0` and the `1.0a13` in Python code, in order to mark a `pytest` test as skipped if the installed version of Datasette was pre-1.0.
TIL
Redirecting a whole domain with Cloudflare
— I had to run this site on `til.simonwillison.org` for 24 hours due to a domain registration mistake I made.
TIL
Generating URLs to a Gmail compose window
— I wanted to send out a small batch of follow-up emails for workshop attendees today, and I realized that since I have their emails in a database table I might be able to semi-automate the process.
TIL
Using packages from JSR with esbuild
— [JSR](https://jsr.io/) is a brand new package repository for "modern JavaScript and TypeScript", [launched on March 1st](https://deno.com/blog/jsr_open_beta) by the Deno team as a new alternative to [npm](https://www.npmjs.com/)
TIL
Tracking SQLite table history using a JSON audit log
— I continue to collect ways of tracking the history of a table of data stored in SQLite - see [sqlite-history](https://simonwillison.net/2023/Apr/15/sqlite-history/) for previous experiments.
TIL
Running a scheduled function on Val Town to import Atom feeds into Datasette Cloud
— [Val Town](https://www.val.town/) is a neat service for hosting short server-side JavaScript programs online - reminiscent of a combination of Glitch and Observable Notebooks.
TIL
Getting Python MD5 to work with FIPS systems
— [This issue](https://github.com/simonw/datasette/issues/2270) by Parand Darugar pointed out that Datasette doesn't currently run on Linux systems with FIPS enabled, due to the way it uses MD5 hashes.
TIL
Running Ethernet over existing coaxial cable
— I recently noticed that the router in our garage was providing around 900 Mbps if I plugged my laptop directly into it via an Ethernet cable, but that speed fell to around 80Mbps (less than 1/10th that speed) elsewhere in our house.
TIL
Piping from rg to llm to answer questions about code
— Here's a trick I've used a couple of times in the past few days.
TIL
Creating GitHub repository labels with an Actions workflow
— Newly created GitHub repositories come with a default set of labels. I have several labels I like to add on top of these. The most important is **research**, which I use for issues that are tracking my notes on a research topic relevant to the repository.
TIL
Exploring ColBERT with RAGatouille
— I've been trying to get my head around [ColBERT](https://github.com/stanford-futuredata/ColBERT).
TIL
Logging OpenAI API requests and responses using HTTPX
— My [LLM](https://llm.datasette.io/) tool has a feature where you can set a `LLM_OPENAI_SHOW_RESPONSES` environment variable to see full debug level details of any HTTP requests it makes to the OpenAI APIs.
TIL
Publish releases to PyPI from GitHub Actions without a password or token
— I published a package to [PyPI](https://pypi.org) today using their [Trusted Publishers](https://docs.pypi.org/trusted-publishers/) mechanism for the first time.
TIL
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:
TIL
Using expect() to wait for a selector to match multiple items
— In the Playwright tests for [datasette-cluster-map](https://github.com/simonw/datasette-cluster-map) I wanted to assert that two markers had been displayed on a Leaflet map.
TIL
literalinclude with markers for showing code in documentation
— I [wanted to include](https://github.com/simonw/datasette/issues/1830) some example Python tests in the Datasette documentation - but since they were tests, I also wanted to execute them as part of my test suite to make sure they worked correctly.
TIL
Writing Playwright tests for a Datasette Plugin
— I really like [Playwright](https://playwright.dev/) for writing automated tests for web applications using a headless browser. It's pretty easy to install and run, and it works well in GitHub Actions.
«« first
« previous
page 3 / 20
next »
last »»