Monoliths & Microservices

An opinionated overview

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]

The WSL Onion

Calling powershell.exe from PowerShell inside WSL

The other day I was playing around in WSL with a colleague of mine and we did this: # We start out in WSL Debian and enter PowerShell Core marco@box:~$ pwsh PowerShell 7.2.2 Copyright (c) Microsoft Corporation. Type 'help' to get help. # Then we get the major version of the active PowerShell session PS /home/marco> ($PSVersionTable.PSVersion).Major 7 # Then we call powershell.exe and get a completely different version! PS /home/marco> (powershell. [Read More]

Windows Subsystem For Linux 2: Debian+Podman

The problem: Docker itself can’t be run in WSL2 as it requires the docker daemon, usually run though sysemd. The solution: Podman works just fine and can easilly be installed, allthough we will need to configure some things to make it work properly. Install Podman The official installation instructions are a great place to find out how to install on your distro. On my Debian 11 (bullseye) system I used apt: sudo apt install podman [Read More]

Going Part Time

(Re)starting my indie journey

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

Using some output redirection and the --write-out parameter we can produce a script that simply outputs the status code of a curl request. This script can then be used as the basis for a simple monitoring of a URL. #! /bin/bash # Description: Returns the HTTP response code obtained by curl on the URL using the specified HTTP method # Usage: GET # Usage: POST # Author: marco@kamner. [Read More]

GitLab Merge Request from the CLI

Speed up your work with git by automatically creating Merge Requests for your git push

The Problem You want to push a branch to GitLab and automatically create a Merge Request (MR) for it. There are effectively three scenarios this can cover: Create a MR in draft state with a custom title Create a MR Create a MR and automatically merge if CI/CD pipeline succeeds Manually this is quite the process: Push branch to origin Copy link to create a MR Open the link, change fields to represent wanted state and submit The Solution GitLab offers push options1 that allow us to instruct it to do more than just plain git push. [Read More]

The Null-Coalescing Operator

A closer look at the null-coalescing operator and how it can help us in writing smarter, more concise scripts.

Today we take a closer look at the null-coalescing operator and how it can help us in writing smarter, more concise scripts. PS> $userDate ?? (Get-Date -Format "yyyy-MM-dd") 2021-02-14 PS> $userDate = Get-Date -Year 2020 -Format "yyyy-MM-dd" PS> $userDate ?? (Get-Date -Format "yyyy-MM-dd") 2020-02-14 How it works We can write some simple code to visualize what the null-coalescing operator is doing function nullCoalescingOperator ($leftValue, $rightValue) { if ($null -eq $leftValue) { return $rightValue } else { return $leftValue } } Usually we will want to assign the resulting value to a variable. [Read More]


My first ever product

As part of my goal to write a book I began looking at how to build a following and where to sell the book once it’s finished. On this journey I found Gumroad, a great place to sell digital products. Given my idea to sell a comprehensive library of code snippets besides the actual book I took a look at existing integrations between it and, my preferred git host. [Read More]

Delete Your Old VMware Snapshots

For the love of Pete, please delete your old snapshots regularly! Old snapshots have caused incidents and even outages more than once in my career and it is really easy to preemptively look for them and get them removed before anything happens. Why To put it plainly, they can cause issues - like 03:00 in the morning pager alert issues and additionally eat up storage space like crazy. Degraded performance of the VM having the snapshot Degraded performance to full outages for other VMs on the same data store due to rapidly increasing snapshot sizes VMware recommends a series of steps to reduce risk when using snapshots: [Read More]