¬ just serendipity 🍀

¬ just serendipity 🍀

Thiago Perrotta

Welcome to my digital garden – a space dedicated to exploring technology and sharing what I’ve been learning. This site reflects my passion for continuous learning and open-source software, wherein I document my journey, offer insights, and dive into miscellaneous topics that reflect my interest. My goal is to maintain a corner of the Web for self-expression focused on valuable, distraction-free content. I believe in the power of the Open Web as a platform for sharing knowledge.

Latest Posts

Problem statement: Given a Terraform project full of pending changes (terraform plan), update its outputs only. I would expect to be able to use -target to do so, but that’s not possible. This flag is intended for resources only. The...
Previously. I couldn’t resist creating a pre-commit hook for this: repos: - repo: https://github.com/thiagowfx/pre-commit-hooks/ rev: v0.0.11 hooks: - id: check-bash-shebang types: - shell In action: % cd {pancake} % pre-commit run -a...
Previously. Problem statement: Given a password-protected .pdf file, remove its password. It’s indifferent whether the file gets overwritten or whether a new one is created. ghostscript can do it: gs -q -dNOPAUSE -dBATCH...
When writing portable shell scripts, should we prefer #!/bin/bash or #!/usr/bin/env bash? I tend to write #!/bin/bash by hand, but here is an argument to prefer the env version instead: thiago.perrotta@thiagoperrotta-MacBook-Pro ~ %...
Problem statement: Given LLM keys shell environment variables: ANTHROPIC_API_KEY GEMINI_API_KEY OPENAI_API_KEY Export them only when they are needed. When are they needed? If I launch any one of these binaries: llm (generic) aider...
In English-speaking North America (Canada, USA) we refer to currency in the following ways: $50 fifty dollars 50 CAD, 50 USD – when necessary to disambiguate between Canadian and US dollars $50 CAD, $50 USD also works, but it’s less...
You write a long document. Perhaps it’s an ad, or a legal contract, or a design document. Problem statement: You would like to ensure, to a certain extent, that your audience has fully read it1. I like the following trick2: insert the...
The title is Claude Code’s favorite compliment to me. I’ve been slowly incorporating Claude Code as part of my daily workflow, as you can see below: Date Input Output Total Tokens Cost (USD) 2025-10-06 336 3,439 1,968,081 $1.33...
https://github.com/frnmst/md-toc: Automatically generate and add an accurate table of contents to markdown files. Adopting it via pre-commit in a git repository is very straightforward: .pre-commit-config.yaml: repos: - repo:...
Record Club: A {new,fun,better} way to discover and share music with friends. Record Club is a social music network that makes it easy to track, rate, review and compile lists of your favorite releases with a community of other music...
Previously. I decided to add a new copy script to pancake to standardize copying command output and files to the system clipboard in both macOS and Linux. The idea was originally inspired by Evan Hahn: copy and pasta are simple wrappers...
It’s possible to do git patch -p to review diff hunks interactively, one by one. Can we accomplish something similar with git diff? If not, is there a tool that can accomplish that, in the same spirit of git patch -p, but with a...
Let me peek at your desk at work and/or at home and I’ll be able to instantly tell, up to a certain (high) degree of confidence, how organized and/or productive you are digitally. Put it another way: “a desk is worth a thousand words”....
It is a good practice to hide the bookmarks bar in Chrome in certain scenarios: when taking screenshots when sharing your screen during presentations or video calls when you need to focus and/or avoid distractions It can be done with Cmd...
Previously: When you have the spellchecker from vim turned on (:set spell), it highlights words that are not in the dictionary. It turns out vim1 can also suggest corrections to these words. :h z=: z= For the word under/after the cursor...
Search Random