Skip to content

Instantly share code, notes, and snippets.

reinout /
Created Sep 20, 2016
Script to add descriptions underneath DVD photos
# -*- coding: utf-8 -*-
import codecs
import os
# Directory with the hi-res images from the DVD
SOURCE_DIR = '../hg-eqb1-a'
# Directory where you want to place the files '.' is the current dir.
# Export the .rtf with the image descriptions as plain text. The output should
import glob
import os
import zipfile
from ConfigParser import ConfigParser # TODO python 3
START = '''<?xml version="1.0"?>
"""Script to report on geoserver layer usage.
I've run it on p-web-map-d9 like this::
cd /var/log/nginx
mkdir /tmp/logs
cp access.log* /tmp/logs/
cd /tmp/logs
gunzip *.gz
cat access.log* |grep -v ^ > alles.txt
# Hopefully temporary fix for
import os
TO_OMIT = ['var', '.git', 'parts', 'bower_components', 'node_modules', 'eggs',
'bin', 'develop-eggs']
orig_os_walk = os.walk
reinout /
Created Sep 18, 2014
Keybase verification

Keybase proof

I hereby claim:

  • I am reinout on github.
  • I am reinoutvanrees ( on keybase.
  • I have a public key whose fingerprint is F529 E418 37C0 7BBB 8699 E644 E62A 0F25 646A 99EE

To claim this, I am signing this object:

from collections import defaultdict
import plistlib
# I copied files locally.
# NEW is what gets written.
# CURRENT is the current "iTunes Library.xml" file (or rather, my copy).
# OLD is an old backup with lots of good ratings.
OLD = 'itunes.xml'
CURRENT = 'itunes_2012.xml'
NEW = 'updated.xml'
from fabric.context_managers import cd
from fabric.contrib.files import exists
from fabric.decorators import hosts
from fabric.decorators import task
from fabric.operations import run
from fabric.operations import sudo
# 'python-mapnik',
reinout / default.cfg
Created Jun 7, 2012
Buildout config file to get a cache running
View default.cfg
# This file should go into ~/.buildout/default.cfg
# Also create the three directories in here.
eggs-directory = /Users/reinout/.buildout/eggs
download-cache = /Users/reinout/.buildout/downloads
extends-cache = /Users/reinout/.buildout/configs
You can’t perform that action at this time.