Skip to content

Instantly share code, notes, and snippets.

View michiwend's full-sized avatar

Michael Wendland michiwend

View GitHub Profile
@michiwend
michiwend / avvtest
Created March 6, 2014 23:42
avv departure test
#!/usr/bin/env python2
from lxml import etree
import urllib
api_base = 'http://efa.avv-augsburg.de/avv/'
request = 'XML_DM_REQUEST'
params = {
@michiwend
michiwend / smartcard.sh
Created February 22, 2015 20:05
Gemalto smartcard with GnuPG under Arch Linux
#!/usr/bin/sh
# more info:
# https://wiki.archlinux.org/index.php/GnuPG#Smartcards
SHELL_CONF=~/.bashrc
su -C "pacman -S pcsclite libusb-compat"
su -C "systemctl enable pcscd.service"
@michiwend
michiwend / unbrick_ftdi.sh
Created March 9, 2015 19:02
unbrick counterfeit ftdi chip
#!/usr/bin/sh
cd /tmp
wget http://rtr.ca/ft232r/ft232r_prog-1.24.tar.gz
tar -xf ft232r_prog-1.24.tar.gz
cd ft232r_prog-1.24
make
sudo ./ft232r_prog --old-pid 0 --new-pid 0x6001
@michiwend
michiwend / limited_wait_group.go
Created May 31, 2015 17:13
Limited wait group in Go (Golang)
type LimitedWaitGroup struct {
limit int
count int
countChan chan int
}
func NewLimitedWaitGroup(limit int) *LimitedWaitGroup {
wg := LimitedWaitGroup{limit: limit}
wg.countChan = make(chan int)
return &wg