Skip to content

Instantly share code, notes, and snippets.

View capncodewash's full-sized avatar

Graeme West capncodewash

  • Glasgow
View GitHub Profile
@juanje
juanje / gist:2558286
Created April 30, 2012 13:17
Simple Vagrantfile for testign Django with Chef-solo
Vagrant::Config.run do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "base"
# Assing IP to the VM
config.vm.network :hostonly, "10.0.33.10"
# Share directory between the host and the VM
config.vm.share_folder "git","/opt/git","/home/anarey/git/djandoapps"
@myobie
myobie / mountain-lion-brew-setup.markdown
Created February 18, 2012 20:14
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

@dex4er
dex4er / xsd-merge.xslt
Created November 21, 2011 23:04
XSLT tools for XSD and WSDL schemas
<?xml version="1.0"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsl:output version="1.0" encoding="utf-8" indent="yes" name="xml" />
<xsl:template match="/">
<xsl:apply-templates />
@smgoller
smgoller / gist:1171102
Created August 25, 2011 16:36 — forked from mhinze/gist:123732
git svn workflow
# adapted from http://notes.jimlindley.com/2008/3/25/git-svn-that-works-for-me
# initial setup
git svn clone <svn_repo>
# begin the workflow
git svn fetch -r HEAD --ignore-paths="Package.zip" # aliased to 'git up', my Package.zip is very large.
git svn rebase -l # we just updated, no need to go back to the svn repo
# 99% of daily workflow
@SEJeff
SEJeff / settings_logging.py
Created July 8, 2011 22:19
How to enable debug logging for django_auth_ldap
############################## django-auth-ldap ##############################
if DEBUG:
import logging, logging.handlers
logfile = "/tmp/django-ldap-debug.log"
my_logger = logging.getLogger('django_auth_ldap')
my_logger.setLevel(logging.DEBUG)
handler = logging.handlers.RotatingFileHandler(
logfile, maxBytes=1024 * 500, backupCount=5)
RewriteEngine On
RewriteMap fedora-map prg:/wgbh/http/openvault/map.fedora.py
RewriteCond %{REQUEST_URI} Proxy #map just URIs with Proxy in them..
RewriteRule ^/fedora/get/([a-zA-Z0-9/:\-\.]+)$ ${fedora-map:$1} [QSA] # send along the query string.. hopefully the regex is about right.. ought to check it someday.