blog

Categories     Timeline     RSS

Unfähigkeitsgrenze

Nach einem Jahr Homeoffice (gestern…) kommt bei mir die Frage auf: Bei wie vielen Toten müssen Ministerpräsidenten und Gesundheitsminister gehen, ohne zu lamentieren?

Unicode character selection menu

I pushed a program to git.gutmet.org/dmenu_charinput/unicodedata.go that allows you to select codepoint ranges from the unicode standard and print them out with description. This can be useful as input for dmenu if you want a general way to enter special characters.

For example, if we wanted to provide a selection menu with all egyptian hieroglyphs and emoticons, we could write the following:

unicodedata -ranges "13000..1342F 1F600..1F64F" |
 dmenu -i -l 10 |
 awk '{print $1}' |
 tr -d "\n" |
 xclip -selection clipboard

… and afterwards the selected character is in the clipboard for pasting. Better yet, use it with dmenu_charinput and interactively select first the codepoint block and then the character.

Getting rid of cgit

I replaced cgit on my git server with a more minimal web representation. I think that people are, if at all, either interested in the current content of master/HEAD or want to clone the repo anyway.

Dumping master/HEAD

#!/bin/sh

set -eu

DIR="/var/www/git-dump/$1"

files=`git ls-tree --full-tree -r --name-only HEAD`

rm -rf "$DIR"

echo "$files" | while IFS=$'\n' read -r f; do
  subdir=`dirname $f`
  fulldir="$DIR/$subdir"
  mkdir -p "$fulldir"
  fullpath="$DIR/$f"
  git show HEAD:"$f" > "$fullpath"
  if file "$fullpath" | grep -q "text"; then
    :
  else
    echo "Binary file" > "$fullpath"
  fi
done

This script is called from post-receive hooks with the repo name as argument.

Public clone

The git-daemon allows public cloning via the git protocol on port 9418. Repositories need an empty git-daemon-export-ok file. I also set –base-path to the git repo root folder, so that stuff viewed in e.g. https://git.gutmet.org/simpleserver/ can be cloned with git clone git://git.gutmet.org/simpleserver.

Nginx file type

The git dump has its own nginx server configuration. Inside I made sure to only serve files as text/plain:

server {
  types { }
  default_type text/plain;
  listen 80;
  ...
  autoindex on;
}

Austrian corona stamp

Austrian corona stamp

… in my local (German) post office, asking about corona stamps earned me a blank stare.

Motivation is overrated and so is discipline

It is Friday, the eigth of January 2021. Former US president Fuckface McPumpkin has attempted a coup that failed due to incompetence, even with police and (ex-?)mil support. Democrats have responded with the full force of looking into maybe discussing that there is perhaps something that someone could do. The plague is alive and well.

Anyway, I wanted to talk about being highly motivated and New Year’s resolutions. Do yourself a favor and forget about both. Statistically speaking, the lifetime of your resolutions is coming to a middle anyway, even if it were a normal year. If you’re immensely stubborn, you may get eight good weeks. Or ten. On rare occasions even half a year. But you will fail. You will have watched all the cheesy MotivationTube videos you can stomach and end up at DisciplineTube, gorging on the lessons of retired marines learned in their reductionist and ironically socialist bubble. Ah-HA, so it’s all about discipline, not motivation. But when you listen closely, it isn’t. “I do X every day at T” is not discipline, forcing yourself to do something through sheer will. It’s just a habit.

Maybe I’m a bit slow, but this seemed like a valuable insight to me. If you want to do something, don’t rely on either motivation or discipline. Both will run out. Instead, put yourself into a position to build a habit, so you don’t have to think about doing or not doing X. Have trouble getting out of bed in the morning? Always get up at the same time without exception, weekends included. Want to exercise more? Pick Mo-We-Fr and always work out at the same time. Never re-schedule. Always keep in mind, that any deviation is undoing the habit. Using discipline would be painful, why would you want to?

<--Previous

Later-->