Skip to content

Instantly share code, notes, and snippets.

View kevinpet's full-sized avatar

Kevin Peterson kevinpet

View GitHub Profile
@kevinpet
kevinpet / Nullery.java
Created April 11, 2012 16:57 — forked from anonymous/Nullery.java
Nullery: self-aware nulls for testing
public class Nullery {
private static MockObjectNamingScheme namingScheme = new CamelCaseNamingScheme();
private static Imposteriser imposteriser = ClassImposteriser.INSTANCE;
public static <T> T nulled(Class<T> typeToNull) {
return nulled(typeToNull, namingScheme.defaultNameFor(typeToNull));
}
public static <T> T nulled(Class<T> typeToMock, final String name) {
@kevinpet
kevinpet / emacs.rb
Created September 25, 2011 16:34 — forked from rust/emacs.rb
Homebrew Emacs for OSX Lion with native full-screen
require 'formula'
class Emacs < Formula
url 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.3a.tar.bz2'
md5 'f2cf8dc6f28f8ae59bc695b4ddda339c'
homepage 'http://www.gnu.org/software/emacs/'
if ARGV.include? "--use-git-head"
head 'git://repo.or.cz/emacs.git'
else