Simple Self Organization

Simple Self Organization

This is a guide to a simple self organization/task management system I built for myself over the years.

From time to time I showed it to someone and they got some benefits from it, most adapted it to better fit their needs down the line, which is exactly what you should do with any kind of personal task management in my opinion.

[Read More]

HTMX

Go check out their website, it’s incredibly good at explaining itself.

To me, a backend heavy developer, HTMX is the frontend framework I like to use because:

  • It does not feel like a JavaScript framework at all, but more like an extension of the HTTP/HTML model
  • It allows me to write interfaces that feel responsive and modern to users while still doing all the heavy lifting in my backend with the tools I’m used to
  • It works with my mental model, which is heavily based on the request-response cycle

Handling signals with Python

When building a Python script that is long running or has to manage some state on termination it is helpful to handle a couple of signals: SIGINT: The signal sent when pressing Ctrl+C SIGTERM and SIGQUIT: Meant to terminate the process, sent by kill and process managers like systemd or supervisord Handling them is possible with Pythons signals library: import signals class SignalHandler: stop = False def __init__(self): # Ctrl+C signal. [Read More]
python 

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