Hack things together

A little scripting never hurt anybody

Sometimes you have to do a specific task and you are fully capable of doing it manually, however those tasks are also great to flex your muscles and hack something together.

They can be an excellent tool to sharpen your skills with the tools you use regularly, and improve your quick prototyping skills.

In addition, with a couple of iterations, again sharpening an important skill, you could afterwards create a more general purpose tool from a hacky script.

[Read More]

Enable system extensions on Apple silicon Mac

Think before you enable this, it could be a security risk

  • Shutdown Mac
  • Press and hold the power button until the Recovery Mode menu appears
  • Select Options, then click Continue
  • From the Utilities menu select Startup Security Utility
  • Select your startup disk and click Security Policy
    • Choose Reduced Security
    • Check the option Allow user management of kernel extensions from identified developers

What to do with your own server

Tools, tips & tricks

What to do with your own server
Now that we have talked about the benefits of running your own server and how to run your own server let’s take a look at some things you could run on your own personal server and some things you should better not. Host a code-server code-server is an open-source application that allows you to run VSCode on your server and access it from any browser. It’s perfect for taking notes or journaling from anywhere, as you can access it from any device with a browser. [Read More]

How to run your own server

There are many ways to run your own server, from setting up a Raspberry Pi on your desk to renting a physical server at a provider.

In this post, we will focus on setting up a virtual server with DigitalOcean, which is one of the easiest ways to get started.

[Read More]

Benefits of running your own server

Benefits of running your own server

In the world of technology, we are moving further and further away from operating directly on servers, but there are still significant benefits to be gained from running a personal server.

I have been running some kind of personal server for many years now and I strongly believe anyone working in technology can benefit greatly from doing so. Here’s why:

[Read More]

1Password CLI Cheatsheet

The 1Password CLI op works either in connection with a client app, like on the Mac, or standalone, useful on a server.

# Login
eval $(op signin)

# Get favorites
op item list --vault "Private" --favorite

# Get a specific item
op item get <ID>

# !! Important: Sign out at the end
op signout

Some helper functions

Helpers to more easily work with the op cli.

1login() {
    eval $(op signin)
}

alias 1signout="op signout"

1search() {
    term=$1
    if [ -n "$2" ]
    then
      vault="$2"
    else
      vault="Private"
    fi
    echo "Searching for '$term' in vaut '$vault'"
    op item list --vault "$vault" --long | grep "$term" --ignore-case
}

1get() {
    op item get $*
}

yamllint error: "invalid config: ignore should contain file patterns"

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]

WSL2 & Keychain

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.

  1. Install
    sudo apt install keychain
    
  2. 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
    
  3. Unlock your keys on shell startup and enjoy
wsl  linux  ssh 

Self-hosted notifications

Self-hosted notifications

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

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]
git 

Post Mortems

Learning from incidents

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]

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]

Simple git changelog

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]