Home

From Zero to Encyrpted Secrets in 2 Minutes with SOPS and GPG

You probably heard about mozilla/sops, but even if the readme is amazingly detailed, a from-scratch example is always nice to have. sops, in a nutshell, bridges the gap between various key management services (PGP, AWS KMS, GCP KMS, Azure Key Vault) and you. This post will attempt to get you on your feet as fast as possible, in 3 simple steps: ...

Read more

Fixing Fedora black screen on boot (AMDGPU)

Having your OS hang on you with a black screen, is not the best start of a day. The main suspects are usually a failing mount in /etc/fstab, the GPU driver, a kernel upgrade or all three. In my case, the kernel was upgraded and it wasn’t booting. Starting the previous one did work however. To quickly weed out the GPU, you can try booting with n...

Read more

Checkout a specific git commit in a Jenkins job

As a good number of Jenkins related articles, this one is also fueled by past frustration. Trying to do the simplest of things often sets you off on a wild ride of trial and error (mostly error). At which point your Google results are painted purple. One such thing is checking out a specific git commit during a Jenkins job. On the surface it’s a...

Read more

How to generate a MongoDB ObjectId from a date in Bash

A little known fact about MongoDB object IDs is that they encode the documents creation date. This means that you don’t have to create an index on a dedicated date field, because the _id field is automatically indexed. Let’s generate an ObjectId with nothing else than a command line, sprinkled with some black magic: # 1. get the date 3 months a...

Read more

Casually removing root files

You’re walking at $HOME, minding your own business. $ whoami > user $ pwd > /home/user But something is bothering your feet. It’s like if a little rock has fallen into your shoe. You take it off, to see what’s going on. $ ls -lah ./left-shoe ---------- 1 root root 4 May 30 13:20 little-rock That’s odd. It’s there, but it doesn’t see...

Read more