Skip to content

Instantly share code, notes, and snippets.

View nickdaugherty's full-sized avatar

Nick Daugherty nickdaugherty

  • Automattic
  • Colorado, USA
View GitHub Profile
@benbalter
benbalter / clone-org.sh
Created October 23, 2012 17:43
Clone all Repos in a GitHub Organization
curl -s "https://api.github.com/orgs/project-open-data/repos?per_page=100" | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["clone_url"]} ]}'
@blakewatters
blakewatters / gist:1303723
Created October 21, 2011 12:37
Performing RestKit Mapping Operation Manually
id<RKParser> parser = [[RKParserRegistry sharedRegistry] parserForMIMEType:RKMIMETypeJSON];
NSError *error = nil;
id parsedObject = [parser objectFromString:JSON error:&error];
if (parsedObject) {
NSManagedObject *destinationObject = // init or fetch your target object
RKObjectMappingOperation *operation = [RKObjectMappingOperation mappingOperationFromObject:parsedObject toObject:destinationObject withMapping:yourObjectMapping];
BOOL success = [operation performMapping:&error];
}