Marco Kamner

Welcome to my digital space!

I think of myself as a (platform engineer|indie hacker|technology pragmatist) and love to share my thoughts and insights on these topics.

Latest Blog Posts

Static Site Generator Fulltext Search

Site-wide search using pagefind

Posts | 2025-10-26 (updated 2025-10-27) | 3 min read
#hugo #pagefind #search
Series: Tech Behind the Blog

I recently rebuilt my blog from scratch, see the previous post in this series.

One thing I wanted to add was site-wide search without any external dependencies. Since I have previous experience with a tool called pagefind, which is perfect for this use case, I implemented it with that.

Read more…

Remaking My Blog From Scratch

2025 Edition

Posts | 2025-10-26 | 10 min read
#development #gitlab #hugo
Series: Tech Behind the Blog

I’ve been blogging in one form or another for 5 years now.

All blogs and other online publishing adventures had one thing in common: I barely knew what I was doing, using components I never learned properly.

I wanted to change that! And with the benefit of hindsight I will now take you on this adventure with me.

Read more…

Hugo Environment Variable Magic

Notes | 2025-10-22 (updated 2025-10-25) | 1 min read
#hugo #ssg

You can overwrite hugo configuration values with environment variables!

Read more…

Hacking Comments Into JSON

Notes | 2025-09-19 (updated 2025-10-25) | 1 min read
#json

JSON does not natively support comments, which is OK, but sometimes a comment could really help.

If the application loading the JSON does not care about additional keys we can simply add a key with our favorite comment indicator like // or #.

{
  "//": "This setting enables not just A, but somehow also B",
  "enable_feature_a": true
}

While this works consider using a different file format better suited for configuration.

Read more…

Finding PID Everywhere

the proc virtual filesystem

Notes | 2025-09-19 (updated 2025-10-25) | 1 min read
#container #linux #sysadmin

Usually at least one of those is present on any system

But sometimes the usual suspects are not available, especially in minimal containers.

But there is another, more low level, way that works: /proc

This is a virtual filesystem provided by the kernel about running processes.

So to mirror something like this:

$ ps aux |grep sleep
    5 root      0:00 sleep 1000
   21 root      0:00 sleep 10000000
   36 root      0:00 grep sleep

We could do:

Read more…

Replace item in list with Kustomize

Notes | 2025-09-16 (updated 2025-10-25) | 1 min read
#k8s #kustomize

Kubernetes resources have quite a lot of lists in them and replacing an item in such lists is quite easy using kustomize patches with op: replace.

Replacing a specific list item safely however is not as obvious as the order of items could change, leading to a technically valid but practically incorrect manifest.

Read more…

Easy Backlink Check

Notes | 2025-09-08 (updated 2025-10-25) | 1 min read
#seo

There are loads of better ways to do this using Google Search Console / Bing Webmaster Tools / ahrefs and similar tools.

Arguably these might be a bit too much for a small side project or a curious quick check, so this is how I do it. The same syntax works for both Google and Bing.

Read more…

Oh Shit, Git!?!

Notes | 2025-07-02 (updated 2025-10-25) | 1 min read
#git

Git is hard: screwing up is easy, and figuring out how to fix your mistakes is fucking impossible. Git documentation has this chicken and egg problem where you can’t search for how to get yourself out of a mess, unless you already know the name of the thing you need to know about in order to fix your problem.

Oh Shit, Git!?! is a collection of these situations, in plain English, and how to resolve them.

Caddy: Custom Domains for SaaS

Notes | 2025-07-02 (updated 2025-10-25) | 2 min read
#caddy

Building custom domains for your SaaS is not always easy, especially when certificates get involved.

With Caddy it becomes very easy!

Read more…

Guest Appearance: Nginx Community Chats

Posts | 2025-06-12 (updated 2025-10-24) | 1 min read
#guest-apperance #nginx

I had the pleasure of joining Dave McAllister, Senior Open Source Technologist for NGINX, on the NGINX Community Chats to talk about tech playground.

Read more…

Colorize pattern on CLI

Notes | 2025-05-07 (updated 2025-10-25) | 1 min read
#bash #grep #productivity

Colorize a pattern in the given input using a neat regex and colorization hack in grep ($ matching all lines but not being able to be highlighted).

color () {
  # Color highlight the pattern in the incoming stream, writing to stdout
  # This effectively matches our PATTERN andy any "$" (line end)
  # But only our PATTERN can be highlighted, line end characters aren't actually there to be highlighted
  local PATTERN=$1

  if [ -z "$1" ]; then
    echo "Usage: color <pattern>"
    echo "Description: Greps input with --color=always -E 'PATTERN|\$' "
    echo "Example: echo \"hello world\" | color \"world\""
    return 1

  fi
  grep --color=always "$PATTERN\|\$"
}

kubeswitch: The kubectl for operators

Notes | 2025-04-17 (updated 2025-10-25) | 1 min read
#k8s #tools

kubeswitch (lazy: switch) is the single pane of glass for all of your kubeconfig files. Caters to operators of large scale Kubernetes installations. Designed as a drop-in replacement for kubectx.

I’m using it for all my cluster-switching needs.

pip install from git repository

Notes | 2025-04-14 (updated 2025-10-25) | 1 min read
#git #pip #python

Install a pip package from a git repo, using a specified git reference:

Read more…

DrawKit

Notes | 2025-04-13 (updated 2025-10-25) | 1 min read
#tools

Hand-drawn 2D & 3D illustrations, icons and animations.

Incredibly high quality illustrations.

I use them in a bunch of places, especially on landing pages and in presentations that just need that little “extra” thing.

Troubleshooting Intermittent DNS Resolution Issues

Notes | 2025-02-28 (updated 2025-10-25) | 1 min read
#bash #dns #troubleshooting

DNS is something so fundamental to most of our systems functioning that it’s often overlooked in initial troubleshooting, it’s also incredibly hard to troubleshoot if it’s only intermittently failing.

Read more…

GitLab Copy & Paste: Added Backticks

Notes | 2025-02-26 (updated 2025-10-25) | 1 min read
#gitlab

Read more…

Running Multiple Server Processes From One Script

Notes | 2025-02-23 (updated 2025-10-25) | 1 min read
#bash #microservices #scripting

Doing local development on a bunch of interconnected services I often want to start multiple long running server processes.

This is the basic script I use for that.

Read more…

kubectx & kubens

Notes | 2025-02-17 (updated 2025-10-25) | 1 min read
#k8s #tools

When working with multiple Kubernetes clusters and namespaces switching context can be a chore.

For this I enjoy using kubectx and kubens.

They can be installed using kubectl krew.

kubectl krew install ctx
kubectl krew install ns
I’ve since switched to [[kubeswitch]], which works much nicer for me.

Simple Redirect View for Django

Notes | 2025-01-02 (updated 2025-10-25) | 1 min read
#django #python

I often find myself replacing an existing MVP based on static html with a Django app, or just needing to preserve some old URL scheme.

This is the code I use to do that:

from django.shortcuts import redirect

def redirect_view(request, redirectable, permanent=True):
  return redirect(redirectable)

Which can then be used like this:

from django.urls import path
from . import views

urlpatterns = [
    path("old-url/", views.redirect_view, {"redirectable": "new_view"}),
    path("some-thing/", views.redirect_view, {"redirectable": "some_thing_new", permanent=False}),
]

Cleanup After Script Exit

Notes | 2024-09-03 (updated 2025-10-25) | 1 min read
#bash #linux #scripting

Many of my scripts work with temporary files, usually relative to the scripts directory1, while at the same time using set -e to exit as soon as something fails.

In this scenario the script leaves behind these temporary files by default, which is not desirable.

We can however do a proper cleanup using the trap concept.

Read more…

More Posts