RSSAmplifier

Blog

Heitor's log

My corner of the web.

heitorpb.github.ioRSS feed ↗47 posts

Latest posts

TIL: Unminimizing Ubuntu Docker images

How to restore man pages and other stripped content in minimized Ubuntu Docker images.

Benchmarking OpenZFS vs EXT4 for my NAS

Checking how ZFS compares against ext4 for my NAS, with an encrypted RAID1 array.

TIL: checksumming files recursively with rclone

Calculating checksum of files accross nested directories, and verifying them, without any custom scripts.

# is not always a comment symbol in Bash

`#` starts a comment in Bash, but not always. A small quirk with a clear rule.

TIL: how to check why a Nix package is in the Nix Store

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

Trying to win the lottery with pure Linux RNG magic.

Benchmarking checksum tools

There are plenty of CLI tools to calculate the checksum of files. But, which one is the fastest?

Firmware updates on Linux via fwupd

How to use fwupd to update device's firmware on Linux.

TIL: timeout in Bash scripts

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

Boosting productivity with Git aliases: what they are, their benefits over shell aliases, setup, and examples.

Pushing Docker images to a remote host

How to push and pull Docker/Podman images to a remote server, without using an Image Registry.

Temporary files and directories in Python

Creating temporary files and directories in Python, using the standard library module `tempfile`.

Handling tarballs 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

How to generate random strings in Bash.

Setting up Mainsail on Ender 3 V3 KE

How to setup Mainsail and webcam support on Creality Ender 3 V3 KE printer.

TIL: 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

Listing PCI devices by manufacturer and/or device type/class.

jq trickery

`jq` tricks that I learned over the years to parse JSONs.

Prettify and uglify JSONs in Vim

How to turn ugly JSONs into pretty JSONs inside Vim. And vice versa.

The 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

How to pretty format a Markdown table using vanilla Vim or NeoVim. No plugins needed, just two steps.

Deploying 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

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

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

How to create symbolic links in Python. Easier than using ln.

Repairing an RGB LED controller

Fixing an RGB LED controller.

Copying files to privileged locations with rsync

How to copy files to remote servers that require sudo.

ip route add blackhole

What is a blackhole route and how to create one on Linux.

My website v5: rewrite in Rust

The history of my website - so far.

I Just Finished my Master's in Physics

Hell yeah! I made it!

Juju is Fucking Amazing

How I found an Easter egg after being challenged by my boss.

std::adjacent_find

Exploiting C++ std::adjacent_find predicates.

My thoughts on PiHole

My experience with PiHole after one month.

Linux Upskill Challenge

My notes about the Linux Upskill Challenge.

Setting up Raspberry Pi 3 with PiHole

How to setup PiHole on a Raspberry Pi.

Be careful with your 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

How to use multiple git remotes for easier repository management.

Caching computation in Python

What is memoization and how to use it to cache the output of functions in Python.

Convert files to UTF-8

How to convert file encodings in the terminal.

Random numbers from /dev/urandom in Bash

How to get random integers from /dev/random in Bash.

Always close your Matplotlib figures

Close your matplotlib figures for faster image generation.

Python.format

Fun with Python format().

Treasure Hunt

I hunted a treasure. Treasure hunting is actually a sport called geocaching.

Hiking in Essertines - Switzerland

Switzerland is amazing for Hiking. Here's how one went.

The Swiss Far West and GPX fun

GPX fun in Python.

Mussum Ipsum

Mussum Impsum.

test

Test description.