THIS PROJECT HAS MOVED to an actual repository at https://github.com/nevyn/SPMediaKeyTap.
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
# coding: utf-8 | |
from objc_util import * | |
import console | |
import urllib | |
import dialogs | |
WKWebView = ObjCClass('WKWebView') | |
UIViewController = ObjCClass('UIViewController') | |
UIBarButtonItem = ObjCClass('UIBarButtonItem') | |
NSURLRequest = ObjCClass('NSURLRequest') |
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
[[[TCRACSocket connectTo:@"localhost" port:1236] selectMany:^id<RACSubscribable>(id x) { | |
return [x lines]; | |
}] subscribeNext:^(id x) { | |
self.text.text = x; | |
} error:^(NSError *error) { | |
NSLog(@"Failure: %@", error); | |
exit(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
#import <Foundation/Foundation.h> | |
@interface NSObject (SPBindings) | |
-(void)sp_bind:(NSString*)binding toObject:(id)observable withKeyPath:(NSString*)observableKeyPath; | |
-(void)sp_unbind:(NSString*)binding; | |
@end |
If you have an ldmap/LinkMap file and a crash report, you can use this utility to symbolicate the crash report. It's not at all optimized... You need to replace INSERT_BUNDLE_IDENTIFIER_HERE with the identifier of your app (com.yourcompany.yourapp); it's what it uses to determine what symbols might be missing and should be looked up.
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
#import <Foundation/Foundation.h> | |
@interface SPInvocationGrabber : NSObject { | |
id _object; | |
NSInvocation *_invocation; | |
int frameCount; | |
char **frameStrings; | |
BOOL backgroundAfterForward; | |
BOOL onMainAfterForward; | |
BOOL waitUntilDone; |
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
/* | |
Say you have a largeish C++ class. You want to use it from ObjC. ObjC++ is painful; | |
C++ is painful. .mm files are bad. How about if we could just treat that C++ | |
object as an ObjC object whenever it exits C++ land? | |
Apple already solved this problem once with toll free bridging. The tricky part is | |
vtables -- with a vtable, isa isn't at offset 0 of the memory layout of the object. | |
The code below is a work in progress to work around this. | |
*/ |
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 ruby | |
# http://gist.github.com/152050 | |
# thanks http://www.ascii-art.de/ascii/uvw/wave.txt | |
class Sprite | |
attr_accessor :data, :w, :h | |
def initialize w = 80, h = 23 | |
@w = w | |
@h = h |