blog

Categories     Timeline     RSS

bandcamping

I pushed a script to git.gutmet.org/snippets/bandcamping to discover albums on bandcamp and save visited/liked ones. It takes a tag as argument, downloads bandcamp’s tag search page with “surprise me” setting, greps links to albums and iteratively calls surf to visit the website.

Example:

$ bandcamping "death-metal"
https://felledblackmetal.bandcamp.com/album/the-intimate-earth-folk-black-metal
[surf opens URL, I listen to it and close surf afterwards]
Like? y
added to bandcamping_death-metal_20210401
https://triangulumignis.bandcamp.com/album/putridarium
[surf opens URL...]
Like? ^C

Update 2021-04-02:
I think I found out that I don’t like death metal after all. I guess I was spoiled by the Åkerfeldts, Heggs, Gossows, Laihos, Holmeses, Schuldiners and Tägtgrens of this world and they are the exception rather than the norm.

Suckless setup

I started playing around with dwm, dmenu, st and surf from suckless.org on the weekend. My changes and setup can be found on git.gutmet.org. Each repo contains a description of changes in ‘CHANGES’. I altered dwm pretty heavily from the vanilla version, the other tools not so much.

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.

<--Previous

Later-->