Skip to content

Instantly share code, notes, and snippets.

View stefanbirkner's full-sized avatar

Stefan Birkner stefanbirkner

View GitHub Profile
stefanbirkner /
Created April 2, 2021 15:23
Removes old revisions of snaps
# Removes old revisions of snaps
set -eu
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
stefanbirkner /
Created July 20, 2019 20:10
Create a checksum file in each directory
#!/usr/bin/env bash
readonly FOLDER=$1
create_checksum_file ()
local folder=$1
local file="$folder/md5_sums"
echo "Create checksum file $file"
stefanbirkner /
Last active February 8, 2019 20:53
Vim Cheat Sheet
stefanbirkner / object2yaml.js
Created December 19, 2017 16:24
JavaScript - Object2YAML
function concat(firstText, secondText) {
return firstText + secondText;
function escape(key) {
if (key.match(/^[A-Za-z0-9\-\_]+$/))
return key
return `"${key}"`
stefanbirkner / to_visit.geojson
Last active August 29, 2015 14:25
Locations to visit
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import Color exposing (..)
import Graphics.Collage exposing (..)
import Graphics.Element exposing (..)
import Mouse
import Window
type alias Box = (Int,Int)
type alias Editor = { boxes: List Box }
main : Signal Element
stefanbirkner /
Created January 8, 2015 07:30
My cURL Cheat Sheet.

Show timing information

curl -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total}

stefanbirkner /
Last active August 29, 2015 14:08
goto talk

#Rule and Runners




  • Code Duplication
  • Before/After
stefanbirkner /
Created October 19, 2014 17:29
Readme of semantic wrapper.

Semantic Wrapper

Generates classes that wrap other classes. Such wrapper classes can be used for named parameters in order to write better code.


The Semantic Wrapper Maven plugin is available from Maven Central.

stefanbirkner /
Created October 2, 2014 06:07
Create API documentation with Sphinx
sudo apt-get install python-sphinx
sphinx-apidoc -o dist <module>
sphinx-build -b html source build