Being a good code reviewee
Posted on 2023-01-13
(Last modified on 2023-10-18)
Things I do to be a good code reviewee.
[Read More]
yamllint error: "invalid config: ignore should contain file patterns"
Posted on 2023-01-12
(Last modified on 2023-05-16)
Setting up a new repository for YAML linting today I was running in a bit of an issue with yamllint.
I was using a YAML list to specify ingores, as mentioned in the documentation:
ignore: - "*.dont-lint-me.yaml" - "/bin/" - "!/bin/*.lint-me-anyway.yaml" This however did not work with the above mentioned error message. After a lot of debugging I found that they released a new version recently which introduced this feature.
[Read More]
ArgoCD Python Client
Posted on 2023-01-01
(Last modified on 2023-05-10)
A simple Python client to interact with ArgoCD.
[Read More]
WSL2 & Keychain
Posted on 2022-12-08
The problem
If you use ssh-agent with an encrypted ssh key it does not persist when you open a new terminal window.
The solution
Use keychain
instead.
- Install
sudo apt install keychain
- Add to your shells rc file, eg.
.bashrc
or .zshrc
# Repeat this line for all keys you want to unlock and use this way
/usr/bin/keychain -q --nogui $HOME/.ssh/id_rsa
source $HOME/.keychain/wsl-sh
- Unlock your keys on shell startup and enjoy
Self-hosted notifications
Posted on 2022-11-01
(Last modified on 2025-06-07)
Running any kind of personal infrastructure sometimes requires your attention based on certain events or failure states,
no matter how much you automate tasks.
Over the years I have used E-Mail, Telegram bots and a variety of other tools for this purpose.
However all of them have the drawback that they mix with other kinds of information and are not easilly usable in scripts.
[Read More]
Git: Add only changed files
Posted on 2022-09-29
(Last modified on 2023-08-23)
Sometimes you may want to commit only the files you have changed and not any newly created files,
this can easily be achieved by this command: git commit -a
[Read More]
Post Mortems
Learning from incidents
Posted on 2022-08-22
(Last modified on 2025-06-07)
Incidents happen, and we can and should always learn from them, to be better prepared for the next time things go wrong.
A great tool to do that is the post-mortem, it is a process designed to recap the incident, learn from mistakes and improve the system as a result.
Basic principles There are some basic principles that can help achieve a good post-mortem process. They are only guidelines and I recommend adapting them to what works best in your organization.
[Read More]
GitLab: User owned projects report
Posted on 2022-08-17
(Last modified on 2024-06-19)
Export a CSV formatted report of projects in user-namespace on a GitLab instance.
This is especially useful if you think about limiting or disabling this feature.
[Read More]
Monoliths & Microservices
An opinionated overview
Posted on 2022-07-18
(Last modified on 2025-06-07)
Ever since diving into the software development world I was troubled by a duality:
On the one hand I have built and operated many services described as monolithic with relative ease, on the other hand I’m always told I, and others, should build microservices because they are better in a variety of ways.
With this post I’m going to compare both software architectures by looking at the key benefits often associated with microservices and additional considerations I think are important.
[Read More]
Simple git changelog
Posted on 2022-07-08
(Last modified on 2023-09-19)
A simple changelog system on top of git commit messages.
The main idea is to generate “release notes” from a diff in commits before a release. It can easily be run manually or as part of a merge/pull CI pipeline.
In this case it looks for commit messages starting with one of these [ADD], [REMOVE], [INFO] and just outputs those, but those patters can be adjusted to fit any existing commit schema.
[Read More]
The WSL Onion
Calling powershell.exe from PowerShell inside WSL
Posted on 2022-04-06
(Last modified on 2025-06-07)
The other day I was playing around in WSL with a colleague of mine and we did this:
[Read More]
Windows Subsystem For Linux 2: Debian+Podman
Posted on 2022-04-04
(Last modified on 2025-06-07)
The problem: Docker itself can’t be run in WSL2 as it requires the docker daemon, usually run though systemd.
The solution: Podman works just fine and can easily be installed,
although we will need to configure some things to make it work properly.
[Read More]
Going Part Time
(Re)starting my indie journey
Posted on 2022-04-03
(Last modified on 2025-06-07)
Starting on the first of March 2022 I no longer work full-time in my day job.
That sentence has been about a year in the making and makes me both happy and a bit scared about the future.
I have been doing some side-hustle and projects since I’ve been 16 building websites with my dad, so you could say it has been a long time coming.
Right now I have set myself three mid-term goals to build up something that brings me joy and financial independence.
[Read More]
Simple HTTP Status Monitor Using Curl
Posted on 2022-03-16
(Last modified on 2025-06-07)
yamllint: Ignore exisiting errors
Posted on 2022-01-14
(Last modified on 2023-05-17)
When adding yamllint to an existing project it can be hard to fix all the errors at once.
I wrote a simple script to create a rules block that simply ignores all rules that currently trigger for a file.
This works by generating a rules block ignoring paths.
[Read More]
Local User Management Polyfill
Posted on 2022-01-13
(Last modified on 2022-07-01)
Older Versions of Windows 10 and all Windows Server 2012 systems have no local user management commandlets.
This is a working polyfill to allow scripts using local user management to run on old systems.
Source code
PSGallery package
Local S3 with MinIO in Django
Posted on 2021-11-06
(Last modified on 2023-10-18)
In production I would consider it best practice to use a S3 solution for serving assets. Namely static files and user-generated media.
This describes my setup on how to do this locally too.
The main benefit for me is that there is less of a difference between environments and I can test S3 specific features in my app.
Setup I will assume a already working Django project and MacOS with [[brew]] installed, but brew specific parts are easilly replicated on different systems using their native package managers.
[Read More]
Hidden WSL Fileshare
Posted on 2021-08-30
WSL file systems get exposed as a hidden share network share:
\\wsl$\<WSL Name>\<path\to\file>
For example, my Debian home folder is at: \\wsl$\Debian\home\kamner
Windows Terminal: Open New WSL Tab In Linux Home Folder
Posted on 2021-08-30
The path you are in when opening a new WSL tab is determined by startingDirectory. This parameter needs to be a valid Windows path, which isn’t great if we want to end up in /home/kamner inside WSL.
The nice thing about WSL is that it will resolve windows paths into their equivalent WSL/linux path if possible.
For example, C:\Scripts would resolve to /mnt/c/Scripts.
Using this and the neat trick that the WSL filesystem is exposed as a a hidden fileshare (technology/windows/wsl-hidden-fileshare) we can get to where we want.
[Read More]
Resolve .local Through Nameserver With Netplan
Posted on 2021-08-13
When using netplan it is easy to force .local DNS requests to go to you nameservers instead of being only resolved locally (the default and standard).
This also works with all other strange .WHATEVER domains you may have lying around in your organization.
Snippet from netplan configuration:
nameservers:
addresses:
- X
- Y
search:
- local
- myotherstupiddomain