Posts

  • Code Formatting Overhaul: A Git Mid-Project Guide

    Ever found yourself knee-deep in a project, only to realize that no formatter was set up for it? Fear not! In this blog post, I’ll guide you through the steps to introduce a formatter to an ongoing project.

  • Backing up a ZFS pool to a Raspberry Pi with syncoid

    How to quickly make a ZFS replication server from a Raspberry Pi using syncoid. We show how syncoid can simplify zfs send and receive to a Raspberry Pi running Ubuntu.

  • Automatically do pass git push after every commit

    Sometimes, it is interesting to automatically push after every commit. In this blogpost, I’ll show you how to accomplish this with a post-commit hook in git. We’ll also look at git -C and two interesting environment variables: GIT_DIR and GIT_WORK_TREE . We will use my favourite password manager, password-store, as context for the examples.

  • Declarative NixOS containers

    Everything you need to know about declarative containers in NixOS with a simple example to demonstrate logging in, mounting volumes and forwarding ports.

  • A reMarkable self healing reverse shell

    You might have seen the self healing reverse SSH setup with systemd that helps you get easy SSH access to devices that are behind complicated NAT systems (or in the hands on non-technical people you support). This can also come in quite handy when you have a reMarkable tablet. Since you can SSH into it with root access, we can also map our SSH port onto another server. The systemd unit is shown below:

  • Better hunk headers for markdown in git

    When you make many changes throughout a file, git will group them in, so called, “hunks”. Typically, the changes of a single hunk will all occur within a single function. For C-like files git is intelligent enough to add a line at the top of the hunk (after @@...@@) that shows you the name of the function. It finds out the name of the function with a regex defined for the type of the edited file. There are many predefined regexes (even for LaTeX) in git. Unfortunately there is no predefined regex for markdown files.

  • Reading markdown like a man

    A command line tool to read Markdown files in the Linux manual reader.

  • Pony capabilities

  • Dining ponies

    In this blog post we implement a version of dining philosophers problem in Pony. Wikipedia states the problem as follows:

  • mysqlimport form pipe

    Loading data form a pipe into a MySQL database can be done with ... | mysql db -e "LOAD DATA LOCAL INFILE '/dev/stdin' INTO TABLE tbl"

  • Getting rid of your display mananger

    Use startx to start your window manager rather than using a display manager like gdm, lightdm or …

  • Creating your own git mergetool

    Create your own git mergetool for encrypted files or your own binary formats.

  • Using SVG fragments

    There is a way to make image.svg#1 and image.svg#2 point to a variant of the same image.

  • Why we are happy with θ(n log(n)) sorting.

    A proof that sorting based on pair-wise comparison can not be done in less than θ(n log(n)) time in the general case.

  • An algorithm for generating a dungeon

    Basic idea

  • Providing access to a command line app trough HTTP with node.JS

    I often create little bash/C/obscure other language/… programs that I like to share, However,these programs are often not made to be hooked up to the Internet. So I use this script to create a quick web interface for my program and put it up on some cheap server.

  • Map a sub domain to localhost:port with httpd

    This post will show you how to link a sub domain to an application running on your server at a certain port.

subscribe via RSS