Skip to content

Instantly share code, notes, and snippets.

View fwenzel's full-sized avatar
😈

Fred Wenzel fwenzel

😈
View GitHub Profile
@fwenzel
fwenzel / Tectonicus_config.xml
Created September 10, 2011 20:34
Some useful scripts for Minecraft servers: run server, and create server map with Tectonicus.
<tectonicus version="2">
<config
mode = "cmd"
outputDir = './output'
>
<!-- general config options go here -->
</config>
@fwenzel
fwenzel / lion-virtualenv.sh
Created July 21, 2011 17:42
Recreating virtualenvs after upgrading to OS X Lion.
# Upgrade to OS X Lion, notice your virtualenvs are all hosed.
# Install Xcode 4.1 from the app store (or //fs2/IT/Apple/).
# Make sure to actually *run* the install, it's an app inside Applications. Throw it away afterwards, if you want the space back.
sudo easy_install pip
sudo pip install virtualenv virtualenvwrapper ipython
# blow the old one(s) away
rmvirtualenv playdoh
@fwenzel
fwenzel / auth.py
Created October 12, 2010 16:59
Monkey-patching stronger hash support into Django
"""
from future import django_sha256_support
Monkey-patch SHA-256 support into Django's auth system. If Django ticket #5600
ever gets fixed, this can be removed.
"""
import hashlib
import random
import os
@fwenzel
fwenzel / autol10n.sh
Created July 28, 2010 14:37
Auto-update locales kept in git from SVN.
#!/bin/bash
# Automatically pull L10n dirs from SVN, compile, then push to git.
# Runs on all project dirs named *-autol10n.
# Settings
GIT=`/usr/bin/which git`
FIND=`/usr/bin/which find`
DEVDIR=/home/fwenzel/dev
@fwenzel
fwenzel / test_geoip.py
Created July 27, 2010 10:16
Test script for Bouncer GeoIP
#!/usr/bin/env python
import httplib
import urllib
from urlparse import urlparse
BOUNCER_URL = 'http://fwenzel.khan.mozilla.org/bouncer-tuxedo/'
PRODUCT = 'Firefox-3.6.8'
TEST_IP = '' # Use an IP from the region you want to test
// ==UserScript==
// @name gmail-wavplay
// @description Adds an embedded player within Gmail messsages containing audio files in the WAV format (e.g. Vonage voicemails).
// @author Evan Grim
// @include http://mail.google.com/*
// @include https://mail.google.com/*
// ==/UserScript==
unsafeWindow.addEventListener('load', wavPlay, true);
#!/usr/bin/python
# -*- coding: utf-8 -*-
# pydftk
# Copyright 2009 W. Kyle White
# Rewrite of stapler; Copyright 2009 Philip Stark
# original stapler license is found in the file "LICENSE"
# if this file is missing, you can find a copy at
# http://stuff.codechaos.ch/stapler_license
# Features added:
// ==UserScript==
// @name expertsExchange
// @namespace smk
// @description kill the stupid hiding mechanisms
// @include http://*.experts-exchange.com/*
// ==/UserScript==
var options={
warn_noanswers: true,
googleBotUserAgent: 'Googlebot/2.1 (+http://www.google.com/bot.html)',
@fwenzel
fwenzel / slim.sh
Created March 8, 2010 15:46 — forked from jbalogh/slim.sh
Make a small AMO database.
#!/bin/sh
DATE=$(date +%Y-%m-%d)
DIR="$(pwd)/amo-slim-$DATE"
rm -rf $DIR
mkdir -p $DIR
cd $DIR
DB='remora'
from django.core.serializers import serialize
serialize('json', [list, of, objects], indent=4)