Skip to content

Instantly share code, notes, and snippets.

@prauscher
prauscher / howard-stick.sh
Created April 17, 2020 20:04
Script to create a bootable system-stick out of a borg backup. <3 EFI
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 <device> [borg repository]" >&2
echo "WARNING: <device> will receive a new partition table and be erased completely" >&2
exit 2
fi
if [ -e /dev/disk/by-partlabel/howard-esp -o -e /dev/disk/by-partlabel/howard-root ]; then
echo "Failure: Partlabels howard-esp and/or howard-root already taken." >&2
@prauscher
prauscher / extensions.ael
Last active December 7, 2016 13:34
Script to automatically call and connect you to the conference room a minute before your next phone conference starts according to your calendar
# Of course this is just the (relevant) part of my extensions.ael. Modify this to your needs and add it to the bottom of yours
context connect_remote {
loc => {
Dial(${SOURCE});
}
rmt => {
Dial(${DESTINATION},,${CALL_OPTIONS});
}
@prauscher
prauscher / bird6.conf
Created October 19, 2016 09:24
2016-10-19: rajesh-bird6 config
router id 172.22.120.2;
table prauscher;
table ext_dn42;
log syslog all;
protocol device {
scan time 10;
}
#!/usr/bin/python3
own_key = "31E64F8042984BA4E830C574966642860AECFC71"
import sys
from mailbox import mbox
import email
import subprocess
def walk_payload(outer, handle):
@prauscher
prauscher / coords.py
Last active February 4, 2018 22:31
#!/usr/bin/env python
import argparse
import zipfile
import xml.etree.ElementTree
import sys
parser = argparse.ArgumentParser(description="Convert KML file into SVG")
parser.add_argument('input', help="Filename to process (KML or KMZ supported)", nargs='?', type=argparse.FileType("rb"), default=sys.stdin)
parser.add_argument('output', help="Filename to write", nargs='?', type=argparse.FileType("w"), default=sys.stdout)
@prauscher
prauscher / dns-hydra.sh
Created April 26, 2015 16:07
dns-hydra
#!/bin/bash
# mtn uses different timestamp-format and we do not want AM/PM
export LC_ALL="de_DE.UTF8"
cd $(dirname $0)/registry
mtn sync mtn://mtn.xuu.me/?net.dn42.* 2> /dev/null
mtn sync mtn://mtn.grmml.dn42/?net.dn42.* 2> /dev/null
mtn pull mtn://mtn.nixnodes.dn42/?net.dn42.* 2>/dev/null
@prauscher
prauscher / generate-fastd.sh
Last active December 31, 2020 05:40
Script to generate peerings in dn42
#!/bin/bash
[ $# -ge 6 ] || {
echo "Usage: $0 <NICK> <MAIL> <GPG> <AS> <ENDPOINT> <IPV4> [PORT] [FASTD-PUBKEY]" >&2
exit 1
}
# You may want to change variables below and check if "/etc/bird/bird-dn42.conf"
# is included in your bird-config (same for bird6 with bird6-dn42.conf)

Keybase proof

I hereby claim:

  • I am prauscher on github.
  • I am prauscher (https://keybase.io/prauscher) on keybase.
  • I have a public key whose fingerprint is 6DFA 3F01 7E77 774C 8F78 46C1 DA84 773A B1C9 7B22

To claim this, I am signing this object: