Skip to content

Instantly share code, notes, and snippets.

@linjunpop
linjunpop / Objective-C-for-Rubyist.md
Last active November 28, 2018 12:18
Objective-C for Rubyist.

Objective-C for Rubyist

Basic Syntax

Message

[you say:@"Hello."];
@machty
machty / new-router-examples.md
Last active April 16, 2020 22:03
How to do cool stuff with the new Router API
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active October 16, 2024 20:10
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@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];
}