How to undo a pushed commit
Oops⊠I just accidentally pushed a git commit containing code with a secret in plain text to a remote repo! Though itâs a private repository, I want to clean this mess up for security best practice. So, letâs fix it! Here are the last two commits. The secret resides in one of the files from the âadd argocd infra to gitâ commit. $ git log -2 commit fe7b0510edc4fb160a16421352ba598e3f62703e (HEAD -> main, origin/main, origin/HEAD) Author: kenno <kenno@example.com> Date: Sat Dec 20 00:59:36 2025 +1100 add argocd infra to git commit c5a75ae14cf3528db1fea7677e2bdb54167037cd Author: kenno <kenno@example.com> Date: Thu Dec 18 14:38:17 2025 +1100 add basic auth middleware to longhorn httproute Since the commit had already been pushed to a remote repository, simply âundoingâ the commit locally is not enough; it is required to overwrite the remote history. ...
Podman Quadlet Volume Ownership
This is a short note that serves as a self-reminder on how podman can automatically change the ownership of a source volume to match the default UID and GID within the container. TL;DR: Use the :U suffix on the volume definition. The following is an example of the issue I had and how to apply the fix. First, letâs list the current ownership of the directory to be used as the source volume for the container. ...
How I Resized My Linux Boot Partition
I recently ran into a classic problem on my long-running Fedora installation: my /boot partition was full. Back when I set up the system (around Fedora 20), 400MiB was more than enough. Now, with modern kernels, it can barely hold two versions, let alone the default three that Fedora manages. This meant I couldnât run system updates. The challenge was that my disk was partitioned with /dev/sda1 for /boot and /dev/sda2 as a single large LVM physical volume for my /root and /home filesystems. This setup prevents a simple resize of /dev/sda1. ...
Find what package provides a file with pacman
While running an Ansible playbook on one of my servers from an Arch device, I encountered the following error: TASK [Gathering Facts] ***************************************************************************************************************************************************** [ERROR]: Task failed: Failed to connect to the host via ssh: ssh_askpass: exec(/usr/lib/ssh/ssh-askpass): No such file or directory Host key verification failed. It looks like the /usr/lib/ssh/ssh-askpass file doesnât exit. To find out what package the missing file comes from, we can use pacman -F or pacman --files. ...
Set number of ReplicaSets to keep for k8s Deployment
By default, the Deployment in Kubernetes retains 10 ReplicaSets [1]. This number can be configured by setting the .spec.revisionHistoryLimit to a desired number. The following is an example on how to retain just 3 old ReplicaSets in my âân8nââ Deployment. â k get replicasets -n n8n NAME DESIRED CURRENT READY AGE n8n-57c89d6b7d 0 0 0 91d n8n-5f9fb9c459 0 0 0 80d n8n-666b9476f 0 0 0 80d n8n-66cd6bd8c6 1 1 1 74d n8n-6888cc89bd 0 0 0 91d n8n-7466c456f8 0 0 0 91d n8n-74dfd6cb8c 0 0 0 80d n8n-f8f8f6d7b 0 0 0 237d Let set .spec.revisionHistoryLimit to 3: ...