¬ 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

https://maurycyz.com/misc/ads/: Internet ads are horrible: They waste your time, and the advertising industry makes the internet a worse place. Payouts are so small that the only way to survive is to turn your site into an ad filled...
Paul Nijjar: “I Hope” Means ‘I Do Not Want to Get Involved’ When somebody says “I hope you are well,” what they mean is “I don’t wish you harm, and also I don’t want to get involved with your drama.” That’s how I use the phrase “I hope...
New script: radio: Stream internet radio stations using available media players. Available Stations: % radio --list Available stations: defcon DEF CON Radio - Music for hacking lofi Lo-fi hip hop beats trance HBR1 Trance salsa Latina...
To set up Bluetooth pairing: turn the mouse on hold the switch button for 3 seconds. The light will begin blinking momentarily, which is when the mouse is ready to pair up with the computer go on bluetooth settings of your OS and connect...
Added a new just recipe to open the latest (=most recent) blog post in $EDITOR. Very handy to make quick edits! % GIT_PAGER=cat git show HEAD commit 9fac587c257da57a9abb37e4ea1d7b2502ba51d2 (HEAD -> master, origin/master, origin/HEAD)...
Lately I’ve been running a lot of terraform apply in PROD. Goodness, this is so stressful. Even when your brain knows that the plan is safe to apply, your heart completely ignores all rationality anyway.
Given /Users/thiago.perrotta/Corp/gitops/apps/overlays/hoth. Assume I am in /Users/thiago.perrotta/Corp/gitops (a git repo). Problem statement: Copy the full path of apps/overlays/hoth. Option #1: cd apps/overlays/hoth && pwd, then copy...
Use flock to manage file/directory locks from shell scripts. File Shell #1: lockfile=lock flock "$lockfile" vim foo vim will open. Shell #2: lockfile=lock flock "$lockfile" vim foo vim will block, waiting until the lock is released. Once...
terraformer: CLI tool to generate terraform files from existing infrastructure (reverse Terraform). Infrastructure to Code In other words: “reverse terraform”. I was quite excited to add this project to my tool belt, as it can save a lot...
Problem statement: Make Google’s Gemini read CLAUDE.md and/or AGENTS.md. By default, it reads only GEMINI.md. Update ~/.gemini/settings.json to either: { "contextFileName": "AGENTS.md" } or { "contextFileName": "CLAUDE.md" } My config: {...
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...
Search Random