Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am thomai on github.
  • I am hurrel (https://keybase.io/hurrel) on keybase.
  • I have a public key ASARwWSQyWcJGetX5aG97453qa3GPtRfq5X99PRfbA3JvQo

To claim this, I am signing this object:

@thomai
thomai / export_mailinglists.sh
Created April 30, 2016 21:23
Backup mailman configs and members
#!/bin/bash
EXPORT_FOLDER=mailman_export
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root, use \"sudo "$0"\" instead" 1>&2
exit 1
fi
# (Delete and) create export folder
@thomai
thomai / fetch_forwardings.py
Last active April 30, 2016 21:24
Fetch mail forwardings in .forward files
#!/usr/bin/env python
import os
for the_file in os.listdir('/home'):
absolute_path = '/home/%s' % the_file
if os.path.isdir(absolute_path):
forward_file_path = '%s/.forward' % absolute_path
if os.path.exists(forward_file_path):
forward_file = open(forward_file_path)
@thomai
thomai / wunderlist_exporter.py
Last active September 17, 2015 12:04
A little script to export wunderlist data to files using the wunderpy API wrapper
# Author: Thomas Maier
# Date: 2014-05-31
from wunderpy import Wunderlist
import getpass
import os
import shutil
# Folder for export files
@thomai
thomai / irda_crawler.py
Last active September 17, 2015 12:04
Crawler for remotecentral.com which parses and exports all pages containing IrDA hexcodes
#!/usr/bin/env python
from lxml import html
import requests
import codecs
import timeit
def parse(relative_path):
"Parse a page from the website remotecentral.com"
page = requests.get("http://www.remotecentral.com" + relative_path)