Skip to content

Instantly share code, notes, and snippets.

View numist's full-sized avatar

Scott Perry numist

View GitHub Profile
@numist
numist / Poser.m
Created October 17, 2013 17:43 — forked from erisdev/Poser.m
#import <objc/runtime.h>
#import <stdlib.h>
// declare some of the Objective-C runtime's private parts where we can see them
typedef struct _NXMapTable NXMapTable;
extern NXMapTable *gdb_objc_realized_classes;
extern void *NXMapInsert(NXMapTable *table, const void *key, const void *value);
@implementation NSObject (Poser)
@numist
numist / gist:9218846
Created February 25, 2014 22:03 — forked from kyleve/gist:8213806
/**
Provides the ability to verify key paths at compile time.
If "keyPath" does not exist, a compile-time error will be generated.
Example:
// Verifies "isFinished" exists on "operation".
NSString *key = SQKeyPath(operation, isFinished);
// Verifies "isFinished" exists on self.