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
@implementation NSArray (AutoreleasePoolDraining) | |
-(void)enumerateObjectsDrainingEveryIterations:(NSUInteger)iterationsBetweenDrains usingBlock:(void (^)(id object, NSUInteger index, BOOL *stop))block | |
{ | |
NSUInteger total = 0; | |
NSUInteger count = self.count; | |
NSUInteger numberOfChunks = (count / MAX(1,iterationsBetweenDrains) + 1); | |
BOOL stop = NO; | |
for ( NSUInteger chunk = 0; chunk < numberOfChunks; chunk++ ) { | |
@autoreleasepool { |
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 NSString (MCHTMLToPlainTextConversion) | |
-(NSString *)stringByConvertingHTMLToPlainText; | |
@end |
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
@implementation NSURL (MCExtensions) | |
-(NSString *)UTI | |
{ | |
FSRef fileRef; | |
Boolean isDirectory; | |
NSString *utiString = nil; | |
if ( !self.isFileURL ) return nil; |
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 | |
#--------- | |
# Script to change the prefix of a framework | |
#--------- | |
import os | |
import re | |
import string |
NewerOlder