Skip to content

Instantly share code, notes, and snippets.

View kluivers's full-sized avatar

Joris Kluivers kluivers

View GitHub Profile
@kluivers
kluivers / build.xml
Created February 28, 2012 12:34
Transform OCUnit output to html using ANT
<target name="test" depends="build"
description="Builds the project, runs the unit tests, generates a report">
<exec executable="xcodebuild" dir="zip-framework" failonerror="false" outputproperty="xcodebuild.out">
<arg line="-target Test -configuration release build" />
</exec>
<mkdir dir="reports" />
<mkdir dir="reports/raw" />
<exec executable="OCUnitReport" errorproperty="report-error.out" inputstring="${xcodebuild.out}" searchpath="true" resolveexecutable="true">
@kluivers
kluivers / singleton.m
Created February 27, 2012 16:21
A singleton implementation in Objective-C
+ (id) sharedInstance {
static dispatch_once_t predicate = 0;
__strong static id shared = nil;
dispatch_once(&predicate, ^{
shared = [[self alloc] init];
});
return shared;
}
@kluivers
kluivers / .gitignore
Created February 27, 2012 11:48
.gitignore for Xcode projects
# .gitignore in use by Joris Kluivers
#
# Latest version:
# https://gist.github.com/gists/1923197
*.DS_Store
# Xcode
*.pbxuser
*.mode1v3