Skip to content

Instantly share code, notes, and snippets.

@igrigorik
igrigorik / prolog-family.rb
Created December 11, 2010 23:38
Fun with ruby-prolog
# gem install ruby-prolog
# https://github.com/preston/ruby-prolog/
# Prolog code:
#
# mother_child(trude, sally).
#
# father_child(tom, sally).
# father_child(tom, erica).
# father_child(mike, tom).
@mzjn
mzjn / pygmenter94.py
Created December 22, 2011 17:10
Jython implementation of the DocBook XSLT 2 'highlight' extension for Saxon 9.4 or later
from os.path import exists
from array import array
from java.io import StringReader, File
from javax.xml.transform.sax import SAXSource
from javax.xml.transform.stream import StreamSource
from org.xml.sax import InputSource
from net.sf.saxon.s9api import (QName, Processor, Serializer, ItemType, OccurrenceIndicator,
XdmAtomicValue, ExtensionFunction, SequenceType)
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@ngauthier
ngauthier / README.md
Created November 27, 2012 16:05
Rdio on Linux