This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static NSInteger NSJSONReadingFuckNSNulls = (1UL << 3); | |
@implementation NSJSONSerialization (FuckNulls) | |
+ (void)load { | |
Method originalMethod = class_getClassMethod(self, @selector(JSONObjectWithData:options:error:)); | |
IMP swizzledImplementation = imp_implementationWithBlock([^id (id _self, NSData *_data, NSJSONReadingOptions _opt, NSError **_error){ | |
NSInputStream *stream = [NSInputStream inputStreamWithData:_data]; | |
[stream open]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@synthesize firstName = _firstName; | |
@synthesize txtFirstName = _txtFirstName; | |
[RACAbleSelf(self.firstName) subscribeNext:^(id x) { [self firstNameChanged:x]; }]; | |
[self rac_bind:RAC_KEYPATH_SELF(self.firstName) to:self.txtFirstName.rac_textSubscribable]; | |
- (void) firstNameChanged:(id)firstName { | |
NSLog(@"changed: %@", firstName); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (NSString *)makeNewUUIDString { | |
CFUUIDRef uuid = CFUUIDCreate(NULL); | |
CFStringRef string = CFUUIDCreateString(NULL, uuid); | |
CFRelease(uuid); | |
return (__bridge_transfer NSString *)(string); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
===================================== | |
PEP 20 (The Zen of Python) by example | |
===================================== | |
Usage: %prog | |
:Author: Hunter Blanks, hblanks@artifex.org / hblanks@monetate.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Cédric Luthi on 2012-02-24. | |
// Copyright (c) 2012 Cédric Luthi. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
@interface NSData (Base64) | |
+ (id) dataWithBase64Encoding_xcd:(NSString *)base64String; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Copy the delivered ipa into a directory to work in. | |
- export PlistBuddy="/usr/libexec/PlistBuddy" to get the PlistBuddy tool to your shell. If it is not added, all references to PlistBuddy | |
will need to be written as the full path. | |
- Take the delivered App.ipa and unzip it using the unzip command. This should produce a Payload directory containing the app and its | |
resources. | |
- Enter the command "codesign -d --entitlements :enterprise.plist Payload/PathToApp.app/" This pulls the entitlements out of the app, and | |
prints them to a plist, without a leading "blob" of data. Pay particular attention to the colon before the enterprise.plist file name. |
NewerOlder