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 *)jsonStringFromObject:(id)object { | |
if ([object isKindOfClass:[NSDictionary class]]) { | |
NSMutableString *string = [NSMutableString string]; | |
[string appendString:@"{"]; | |
NSEnumerator *enumerator = [[object allKeys] objectEnumerator]; | |
NSString *key = [enumerator nextObject]; | |
do { | |
id obj = object[key]; | |
[string appendFormat:@"\"%@\" : %@", key, [self jsonStringFromObject:obj]]; |
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
+ (NSDictionary *)JSONKeyPathsByPropertyKey { | |
return [[super JSONKeyPathsByPropertyKey] mtl_dictionaryByAddingEntriesFromDictionary: | |
@{ | |
@"caption" : @"caption", | |
@"player" : @"player", | |
@"plays" : @"plays", | |
@"albumArtURL" : @"album_art", | |
@"artist" : @"artist", | |
@"album" : @"album", | |
@"trackName" : @"track_name", |
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
@interface Jawn () | |
@property (strong) NSMutableDIctionary *internalAttributes | |
@end | |
@interface Jawn | |
@dynamic attributes; | |
- (NSDictionary *)attributes { | |
return [NSDictionary dictionaryWithDictioanry:self.internalAttributes]; |
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
class var sharedManager: BSMBrightnessManager { | |
struct Singleton { | |
static let instance = BSMBrightnessManager() | |
} | |
return Singleton.instance | |
} |
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
#/bin/bash | |
install() { | |
if [ -f "$SQLITEDBPATH" ]; then | |
cp -n "$SQLITEDBPATH" "$SQLITEDBPATH.charlesbackup" | |
sqlite3 "$SQLITEDBPATH" <<EOF | |
INSERT INTO "tsettings" VALUES(X'189B6E28D1635F3A8325E1E002180DBA2C02C241',X'3123302106035504030C1A436861726C65732050726F78792053534C2050726F7879696E6731243022060355040B0C1B687474703A2F2F636861726C657370726F78792E636F6D2F73736C3111300F060355040A0C08584B3732204C74643111300F06035504070C084175636B6C616E643111300F06035504080C084175636B6C616E64310B3009060355040613024E5A',X'3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D38223F3E0A3C21444F435459504520706C697374205055424C494320222D2F2F4170706C652F2F44544420504C49535420312E302F2F454E222022687474703A2F2F7777772E6170706C652E636F6D2F445444732F50726F70657274794C6973742D312E302E647464223E0A3C706C6973742076657273696F6E3D22312E30223E0A3C61727261792F3E0A3C2F706C6973743E0A',X'3082045E30820346A003020102020101300D06092A864886F70D01010505003081913123302106035504030C1A436861726C65732050726F78792053534C2050726F7879696E67312430 |
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
<= 10 photos XOR | |
==1 video XOR | |
==1 link XOR | |
==1 text XOR |
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
__XPC_DYLD_FRAMEWORK_PATH=/Users/brian/Library/Developer/Xcode/DerivedData/Tumblr-agosignkmwzrqrdtfvnhsucfynjz/Build/Products/Debug | |
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.2YSgPURACv/Listeners | |
DYLD_PRINT_LIBRARIES=true | |
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.VS6AAu6qEF/Render | |
__XPC_DYLD_LIBRARY_PATH=/Users/brian/Library/Developer/Xcode/DerivedData/Tumblr-agosignkmwzrqrdtfvnhsucfynjz/Build/Products/Debug | |
__XCODE_BUILT_PRODUCTS_DIR_PATHS=/Users/brian/Library/Developer/Xcode/DerivedData/Tumblr-agosignkmwzrqrdtfvnhsucfynjz/Build/Products/Debug | |
DYLD_FRAMEWORK_PATH=/Users/brian/Library/Developer/Xcode/DerivedData/Tumblr-agosignkmwzrqrdtfvnhsucfynjz/Build/Products/Debug | |
XPC_FLAGS=0x0 | |
DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/PlugIns/DebuggerUI.ideplugin/Contents/Resources/libViewDebuggerSupport.dylib | |
SHELL=/bin/zsh |
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
# Expects a full output from the leaks instrument. | |
# This script will skip the first line and calculate | |
# the total size of your leak session | |
path = ARGV[0] | |
lines = File.open(File.expand_path(path)).read | |
total_size_in_bytes = 0 |
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
char -[_PFManagedObjectReferenceQueue _queueForDealloc:](void * self, void * _cmd, void * arg2) { | |
ebx = *_OBJC_IVAR_$__PFManagedObjectReferenceQueue._spinLock; | |
ebx = ebx + self; | |
OSSpinLockLock(ebx); | |
edx = self; | |
eax = *_OBJC_IVAR_$__PFManagedObjectReferenceQueue._context; | |
var_10 = 0x1; | |
if (*(edx + eax) != 0x0) { | |
eax = edx->_queue; | |
if (eax == 0x0) { |
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
func logURLPath(urlString: NSString) { | |
urlString.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding).map { urlString in | |
NSURL(string: urlString).map { path in | |
println("Opening URL: \(path)") | |
} | |
} | |
} |
OlderNewer