Skip to content

Instantly share code, notes, and snippets.

View lbrndnr's full-sized avatar

Laurin Brandner lbrndnr

View GitHub Profile
@lbrndnr
lbrndnr / gist:1239394
Created September 24, 2011 14:38 — forked from steipete/gist:1239338
PSIsCrappyDevice
BOOL PSIsCrappyDevice() {
static BOOL isCrappyDevice = YES;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
NSString *platform = [[NSString alloc] initWithCString:machine];