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 hidden or 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
@implementation UIImage (BCGetPixels) | |
-(void)bc_getPixels:(char*)pixels; | |
{ | |
CGImageRef imageRef = self.CGImage; | |
NSUInteger width = CGImageGetWidth(imageRef); | |
NSUInteger height = CGImageGetHeight(imageRef); | |
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray(); | |
NSUInteger bytesPerPixel = 1; |
This file contains hidden or 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 macruby | |
Dir["*.plist"].each { |f| | |
d = NSDictionary.dictionaryWithContentsOfFile(f) | |
cr = d["description"] | |
cr.writeToFile(f+".crash", atomically:false) | |
} | |
# Could probably use ARGF too |
This file contains hidden or 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 hidden or 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 | |
def method_missing(*stuff) | |
`#{stuff.join " "}` | |
end | |
def ll *a; ls "-la", *a end | |
puts ll dirname which "ls" |
This file contains hidden or 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 |
This file contains hidden or 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 | |
require 'net/imap' | |
require 'rubygems' | |
require 'sqlite3' | |
imap = Net::IMAP.new("imap.gmail.com", 993, true) | |
imap.login("someusername", "somepassword") | |
imap.select('INBOX') | |
total = imap.responses["EXISTS"][-1] | |
unread = imap.search(["UNSEEN"]).length |
This file contains hidden or 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
How do you store a JS function ref in a cocoa webkit plugin, that you can later call as a callback? | |
How do you properly draw on the title bar? |
This file contains hidden or 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
#ifndef _SPOTIFY_LOCAL_FILE_PLUGIN_API__H | |
#define _SPOTIFY_LOCAL_FILE_PLUGIN_API__H | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
/** | |
Spotify Local File Plugin API |