View gist:30ec69478ea59b3e3fc3
Analysis of sampling Python (pid 75717) every 1 millisecond
Process: Python [75717]
Path: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Load Address: 0x10b733000
Identifier: Python
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: Python [75715]
Date/Time: 2015-04-15 09:08:02.400 +0200
View NSObject+LogDealloc.h
#import <Foundation/Foundation.h>
@interface NSObject (LogDealloc)
- (void)logOnDealloc;
@end
View UIView+Recursion.h
#import <UIKit/UIKit.h>
@interface UIView (Recursion)
/**
Return YES from the block to recurse into the subview.
Set stop to YES to return the subview.
*/
- (UIView*)findViewRecursively:(BOOL(^)(UIView* subview, BOOL* stop))recurse;
View NSArray+FirstObject.h
//
// NSArray+FirstObject.h
//
#import <Foundation/Foundation.h>
@interface NSArray (FirstObject)
- (id)firstObject;
View CGRect+Additions.h
static __inline__ CGRect CGRectFromCGSize( CGSize size ) {
return CGRectMake( 0, 0, size.width, size.height );
};
static __inline__ CGRect CGRectMakeWithCenterAndSize( CGPoint center, CGSize size ) {
return CGRectMake( center.x - size.width * 0.5, center.y - size.height * 0.5, size.width, size.height );
};
static __inline__ CGRect CGRectMakeWithOriginAndSize( CGPoint origin, CGSize size ) {
return CGRectMake( origin.x, origin.y, size.width, size.height );
View ViewController.m
UIImage* image = [UIImage imageNamed:@"resources/images/my-image.png"];
View ViewController.m
UIImage* image = GetImageWithID( kImageResourcesImagesMyImage );
View Resources.h
static NSString* __AppResources[] = {
@"resources/images/my-image.png",
@"resources/images/my-image2.png",
@"resources/images/subfolder/my-image.png",
@"resources/test.pdf",
nil
};
static const NSUInteger kImageResourcesImagesMyImage = 0;
static const NSUInteger kImageResourcesImagesMyImage2 = 1;
View gist:2846024
header_subpath = "Resources.h"
resource_categories = {
".pdf" => "File",
".png" => "Image",
".jpg" => "Image"
}
def wikify(phrase)
phrase = phrase.tr( "-", " " ).tr( "_", " " ).tr( "/", " " )
View gist:2837806
UIImageDrawBlock draw = ^( CGContextRef ctx, CGRect rect ) {
[[UIColor redColor] setFill];
[[UIBezierPath bezierPathWithRect:rect] fill];
};
UIImage* texture = [UIImage imageWithSize:CGSizeMake( 100, 100 ) opaque:NO scale:1.0 draw:draw];