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
CGPoint CGPointFlipped(CGPoint point, CGRect bounds) { | |
return CGPointMake(point.x, CGRectGetMaxY(bounds)-point.y); | |
} | |
CGRect CGRectFlipped(CGRect rect, CGRect bounds) { | |
return CGRectMake(CGRectGetMinX(rect), | |
CGRectGetMaxY(bounds)-CGRectGetMaxY(rect), | |
CGRectGetWidth(rect), | |
CGRectGetHeight(rect)); | |
} |
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
typedef id(^mapFunction)(id obj); | |
typedef id(^reduceFunction)(id obj1, id obj2); | |
@implementation NSArray (NSArray_MapReduce) | |
- (id)map:(mapFunction)mapFunction reduce:(reduceFunction)reduceFunction; | |
{ | |
dispatch_queue_t reduceQueue = dispatch_queue_create(0, 0); | |
dispatch_group_t group = dispatch_group_create(); |
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
CVS | |
.svn | |
build | |
.DS_Store | |
log/*.log | |
tmp/**/* | |
config/database.yml | |
config/amazons3.yml | |
db/*.sqlite3 | |
db/*.db |
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
- (UIImage *)optimizedWaveformMask; | |
{ | |
if (optimizedWaveformMask) return optimizedWaveformMask; | |
UIImage *originalWaveformImage = track.waveformImage; | |
if (!originalWaveformImage) return nil; | |
CGRect maskRect = CGRectZero, imageRect = CGRectZero; | |
maskRect.size = CGSizeMake(CGRectGetWidth(self.bounds) * [self contentScaleFactor], | |
CGRectGetHeight(self.bounds) * [self contentScaleFactor]); |
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
diff --git a/OHAttributedLabelTest/RootViewController.m b/OHAttributedLabelTest/RootViewController.m | |
index 13ca5ef..547d928 100644 | |
--- a/OHAttributedLabelTest/RootViewController.m | |
+++ b/OHAttributedLabelTest/RootViewController.m | |
@@ -86,6 +86,7 @@ | |
NSString *baseString = [self.wordList objectAtIndex:indexPath.row]; | |
NSMutableAttributedString *attributedString = [NSMutableAttributedString attributedStringWithString:baseString]; | |
+ [(OHAttributedLabel*)[cell viewWithTag:1337] removeAllCustomLinks]; | |
[(OHAttributedLabel*)[cell viewWithTag:1337] setAttributedText:attributedString]; |
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
Pod::Spec.new do |s| | |
s.name = 'Kiwi' | |
s.version = '1.0.0' | |
s.summary = 'A Behavior Driven Development library for iPhone and iPad development.' | |
s.homepage = 'http://kiwi-lib.info' | |
s.authors = { 'Allen Ding' => 'allen@allending.com', 'Luke Redpath' => 'luke@lukeredpath.co.uk' } | |
s.source = { :git => 'https://github.com/allending/Kiwi.git', :tag => 'v1.0.0' } | |
s.source_files = 'Kiwi' | |
s.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"$(SDKROOT)/Developer/Library/Frameworks"', | |
'OTHER_LDFLAGS' => '-ObjC -all_load -framework SenTestingKit' } |
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
NSArray *windowList = (NSArray *)CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenAboveWindow, (CGWindowID)maView.window.windowNumber); | |
BOOL isHidden = windowList.count > 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
require 'formula' | |
class Ideviceinstaller < Formula | |
url 'http://cgit.sukimashita.com/ideviceinstaller.git/snapshot/ideviceinstaller-1.0.0.tar.gz' | |
homepage 'http://www.sukimashita.com/' | |
md5 '011ab522a1dbd262e37500bdb0ff7df0' | |
depends_on 'pkg-config' => :build | |
depends_on 'libimobiledevice' | |
depends_on 'glib' |
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
// is there a way to do this with inlining "bla" ? | |
typedef void(^bla)(void); | |
bla (^finish)(NSString *) = ^(NSString *what) { | |
return ^{ | |
NSLog(@"Say %@", what); | |
}; | |
}; |
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
🐱ullrich:~/ $ gem install ocrunner [12:25:14] | |
Fetching: trollop-1.16.2.gem (100%) | |
Fetching: fssm-0.2.9.gem (100%) | |
Fetching: oniguruma-1.1.0.gem (100%) | |
Building native extensions. This could take a while... | |
ERROR: Error installing ocrunner: | |
ERROR: Failed to build gem native extension. | |
/Users/ullrich/.rbenv/versions/1.9.3-p125/bin/ruby extconf.rb | |
checking for main() in -lonig... yes |