Building a Secure DNS Sinkhole with CoreDNS and Smallstep Certificates
2024-07-25
A comprehensive guide to building a secure DNS sinkhole using CoreDNS and Smallstep certificates, providing DNS-level blocking and serving custom HTTPS block pages.
259 words
|
1 minute
Installing tools written in Go
2024-07-24
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 ...
202 words
|
1 minute
Searching all columns of a table in Datasette
2024-07-23
I came up with this trick today, when I wanted to run a `LIKE` search against every column in a table.
1466 words
|
7 minutes
The location of the pip cache directory
2024-07-22
`pip` uses a cache to avoid downloading packages again:
106 words
|
1 minute
Scraping Reddit and writing data to the Datasette write API
2024-07-22
Today I built a system for monitoring Reddit for new posts that link to various domains that I own.
795 words
|
4 minutes
Running Python code in a subprocess with a time limit
2024-07-21
I figured out how to run a subprocess with a time limit for [datasette-ripgrep](https://github.com/simonw/datasette-ripgrep), using the `asyncio.cr...
373 words
|
2 minutes
The Wikipedia page stats API
2024-07-21
Via https://alexgarcia.xyz/dataflow/examples/wiki-pageviews/ I found this API for retrieving daily pageview stats from Wikipedia for any article:
83 words
|
1 minute
Implementing Automated API Status Monitoring for Tomcat Applications
2024-07-20
A comprehensive guide to implementing automated API status monitoring for Tomcat applications using Bash scripting, with detailed explanations of script components, error handling, and best practices.
919 words
|
5 minutes
Start a server in a subprocess during a pytest session
2024-07-19
I wanted to start an actual server process, run it for the duration of my pytest session and shut it down at the end.
292 words
|
1 minute
Deploying a redbean app to Fly
2024-07-19
[redbean](https://redbean.dev/) is a fascinating project - it provides a web server in a self-contained executable which you can add assets (or dyn...
331 words
|
2 minutes
Tommy's Margarita
2024-07-19
A few years ago I decided to learn how to make some classic cocktails. It is a very rewarding hobby.
506 words
|
3 minutes
Writing pytest tests against tools written with argparse
2024-07-18
I usually build command-line tools using [Click](https://click.palletsprojects.com/) (and my [click-app](https://github.com/simonw/click-app) cooki...
253 words
|
1 minute
Checking if something is callable or async callable in Python
2024-07-18
I wanted a mechanism to check if a given Python object was "callable" - could be called like a function - or "async callable" - could be called usi...
242 words
|
1 minute
Asserting a dictionary is a subset of another dictionary
2024-07-18
My [lazy approach to writing unit tests](https://simonwillison.net/2020/Feb/11/cheating-at-unit-tests-pytest-black/) means that sometimes I want to...
126 words
|
1 minute
Generating URLs to a Gmail compose window
2024-07-16
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 ta...
501 words
|
3 minutes
JavaScript date objects
2024-07-16
A few notes on JavaScript `Date` object, based on trying to do some basic things with them in Observable notebooks.
449 words
|
2 minutes
Trying out Quarto on macOS
2024-07-15
I decided to try out [Quarto](https://quarto.org/), the new notebook/markdown/publishing system built on Pandoc.
240 words
|
1 minute
How to read Hacker News threads with most recent comments first
2024-07-15
[Hacker News](https://news.ycombinator.com/) displays comments in a tree. This can be frustrating if you want to keep track of a particular convers...
1516 words
|
8 minutes
Setting Up Google Authenticator for SSH and Sudo Access on Linux
2024-07-15
A comprehensive guide to implementing Google Authenticator two-factor authentication for SSH and sudo access on Linux systems, including troubleshooting and best practices.
1052 words
|
5 minutes
Managing Private Forks of Public Repositories - Best Practices and Solutions
2024-07-15
A comprehensive guide to managing private forks of public repositories, including maintaining upstream synchronization, handling visibility changes, and implementing best practices for enterprise environments.
1008 words
|
5 minutes
json_extract() path syntax in SQLite
2024-07-13
Several of the [SQLite JSON functions](), such as `json_extract()` and `json_array_length()`, take a path argument. This uses custom syntax along t...
392 words
|
2 minutes
Installing packages from Debian unstable in a Docker image based on stable
2024-07-12
For [Datasette #1249](https://github.com/simonw/datasette/issues/1249) I wanted to build a Docker image from the `python:3.9.2-slim-buster` base im...
320 words
|
2 minutes
Session-scoped temporary directories in pytest
2024-07-11
I habitually use the `tmpdir` fixture in pytest to get a temporary directory that will be cleaned up after each test, but that doesn't work with `s...
124 words
|
1 minute
Reviewing your history of public GitHub repositories using ClickHouse
2024-07-11
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 ...
664 words
|
3 minutes