Heitor's log My corner of the web. Zola 2026-03-12T00:00:00+00:00 https://heitorpb.github.io/atom.xml TIL: how to check why a Nix package is in the Nix Store 2026-03-10T00:00:00+00:00 2026-03-10T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/nix-why-depends/ Ever wondered why a package ended up in your Nix store? Here's how nix why-depends can help you find out. Betting on the Lottery with Bash and /dev/urandom 2025-12-05T00:00:00+00:00 2025-12-05T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/lottery-bash/ Trying to win the lottery with pure Linux RNG magic. Benchmarking checksum tools 2025-11-27T00:00:00+00:00 2025-11-27T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/checksum-benchmark/ There are plenty of CLI tools to calculate the checksum of files. But, which one is the fastest? Firmware updates on Linux via fwupd 2025-10-14T00:00:00+00:00 2026-03-12T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/update-devices-firmware/ How to use fwupd to update device's firmware on Linux. TIL: timeout in Bash scripts 2025-05-20T00:00:00+00:00 2025-05-20T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/timeout/ How to use the `timeout` command to terminate processes after a specified time and how to combine it with `until` for smarter shell scripting. Git aliases 2025-04-24T00:00:00+00:00 2025-04-24T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/git-aliases/ Boosting productivity with Git aliases: what they are, their benefits over shell aliases, setup, and examples. Pushing Docker images to a remote host 2025-03-28T00:00:00+00:00 2025-03-28T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/push-docker-img/ How to push and pull Docker/Podman images to a remote server, without using an Image Registry. Temporary files and directories in Python 2025-02-19T00:00:00+00:00 2025-02-19T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/pytmp/ Creating temporary files and directories in Python, using the standard library module `tempfile`. Handling tarballs in Python 2024-11-19T00:00:00+00:00 2024-11-19T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/tarballing-in-python/ Need to work with tar files in Python? Here's how to create and extract compressed tarballs effortlessly. Generating random strings in Bash 2024-09-24T00:00:00+00:00 2024-09-24T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/random-strings-bash/ How to generate random strings in Bash. Setting up Mainsail on Ender 3 V3 KE 2024-09-03T00:00:00+00:00 2024-09-03T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/ender3v3ke-mainsail/ How to setup Mainsail and webcam support on Creality Ender 3 V3 KE printer. TIL: looping over hex numbers in Bash 2024-06-13T00:00:00+00:00 2024-06-13T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/looping-over-hex-numbers-in-bash/ TIL: looping over hexadecimal numbers in Bash just takes one line. TIL: Listing PCI devices by their vendor or class 2024-06-05T00:00:00+00:00 2024-06-05T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/lspci-device-classes/ Listing PCI devices by manufacturer and/or device type/class. jq trickery 2024-05-10T00:00:00+00:00 2024-05-10T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/jq-trickery/ `jq` tricks that I learned over the years to parse JSONs. Prettify and uglify JSONs in Vim 2024-03-27T00:00:00+00:00 2024-03-27T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/prettify-uglify-jsons-in-vim/ How to turn ugly JSONs into pretty JSONs inside Vim. And vice versa. The wonders of Nix remote builders 2024-01-24T00:00:00+00:00 2024-01-24T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/wonders-of-nix-remote-builders/ The more I use NixOS the more interesting it gets. I now found out about remote builders and those are just awesome. Formatting tables in Vim/NeoVim 2023-10-31T00:00:00+00:00 2024-04-07T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/format-tables-in-vim/ How to pretty format a Markdown table using vanilla Vim or NeoVim. No plugins needed, just two steps. Deploying Nomad on NixOS 2023-10-19T00:00:00+00:00 2023-10-19T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/nomad-on-nixos/ How to get Nomad running on NixOS for local development, with Podman and Docker task drivers. Multiplexing the output of a process to multiple processes 2023-09-19T00:00:00+00:00 2023-09-19T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/multiplexing-stdout/ How to feed the output of one process to multiple other processes simultaneously, using tee and Bash's process substitution. Finding out your public IP address via curl 2023-09-01T00:00:00+00:00 2023-09-01T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/ip-rs/ How to find out your public IP address on the command line after reinventing the wheel using Rust, Axum, Nix, a docker image and Fly.io. Symbolic links in Python are easier 2023-08-14T00:00:00+00:00 2023-08-14T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/symbolic-links-in-python-are-easier/ How to create symbolic links in Python. Easier than using ln. Repairing an RGB LED controller 2023-08-03T00:00:00+00:00 2023-08-03T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/repairing-led-rgb-controller/ Fixing an RGB LED controller. Copying files to privileged locations with rsync 2023-07-16T00:00:00+00:00 2023-07-16T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/copying-files-to-privileged-locations-with-rsync/ How to copy files to remote servers that require sudo. ip route add blackhole 2023-05-25T00:00:00+00:00 2023-05-25T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/ip-route-add-blackhole/ What is a blackhole route and how to create one on Linux. My website v5: rewrite in Rust 2023-04-25T00:00:00+00:00 2023-04-25T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/rewriting-in-rust/ The history of my website - so far. I Just Finished my Master's in Physics 2021-03-14T00:00:00+00:00 2021-03-14T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/i-finished-my-masters/ Hell yeah! I made it! Juju is Fucking Amazing 2021-02-16T00:00:00+00:00 2021-02-16T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/juju-is-fucking-amazing/ How I found an Easter egg after being challenged by my boss. std::adjacent_find 2021-01-03T00:00:00+00:00 2021-01-03T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/std-adjacent-find/ Exploiting C++ std::adjacent_find predicates. My thoughts on PiHole 2020-11-10T00:00:00+00:00 2020-11-10T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/pihole-dnsmasq/ My experience with PiHole after one month. Linux Upskill Challenge 2020-10-30T00:00:00+00:00 2020-10-30T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/linuxupskill/ My notes about the Linux Upskill Challenge. Setting up Raspberry Pi 3 with PiHole 2020-10-13T00:00:00+00:00 2020-10-13T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/rasp3-pihole/ How to setup PiHole on a Raspberry Pi. Be careful with your Docker logs 2020-09-13T00:00:00+00:00 2020-09-13T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/careful-with-docker-logs/ Logs are important. But they might fill your disk. Here I show how to configure Docker daemon to rotate logs. Multiple urls for a git remote 2020-08-11T00:00:00+00:00 2020-08-11T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/git-multiple-remotes/ How to use multiple git remotes for easier repository management. Caching computation in Python 2020-06-24T00:00:00+00:00 2020-06-24T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/caching-python/ What is memoization and how to use it to cache the output of functions in Python. Convert files to UTF-8 2020-05-12T00:00:00+00:00 2020-05-12T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/utf-8-files/ How to convert file encodings in the terminal. Random numbers from /dev/urandom in Bash 2020-04-07T00:00:00+00:00 2020-04-07T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/bash-random-numbers/ How to get random integers from /dev/random in Bash. Always close your Matplotlib figures 2020-03-18T00:00:00+00:00 2020-03-18T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/close-matplotlib-figures/ Close your matplotlib figures for faster image generation. Python.format 2018-11-29T00:00:00+00:00 2018-11-29T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/python-format/ Fun with Python format(). Treasure Hunt 2018-10-20T00:00:00+00:00 2018-10-20T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/geocaching/ I hunted a treasure. Treasure hunting is actually a sport called geocaching. Hiking in Essertines - Switzerland 2018-10-16T00:00:00+00:00 2018-10-16T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/essertineshiking/ Switzerland is amazing for Hiking. Here's how one went. The Swiss Far West and GPX fun 2018-09-25T00:00:00+00:00 2018-09-25T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/swissfarwest/ GPX fun in Python. Mussum Ipsum 2018-09-06T00:00:00+00:00 2018-09-06T00:00:00+00:00 Diego Esteves Cicero Mussum https://heitorpb.github.io/bla/lorem/ Mussum Impsum. test 2018-09-05T00:00:00+00:00 2018-09-05T00:00:00+00:00 Heitor de Bittencourt https://heitorpb.github.io/bla/test/ Test description.