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 | |
require 'net/http' | |
require 'openssl' | |
# Track public available information of a twitter user like follower, follower | |
# and tweet count by scraping the user profile page. | |
# Config | |
# ------ | |
twitter_username = ENV['TWITTER_USERNAME'] || 'foobugs' |
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
- (void)bindLifetimeToObject:(id)object | |
{ | |
objc_setAssociatedObject(object, (__bridge void *)self, self, OBJC_ASSOCIATION_RETAIN_NONATOMIC); | |
} | |
- (void)releaseLifetimeFromObject:(id)object | |
{ | |
objc_setAssociatedObject(object, (__bridge void *)self, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC); | |
} |
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
- (void)viewWillAppear:(BOOL)animated | |
{ | |
[UIView animateWithDuration:animated ? 0.25f : 0.0f animations:^ | |
{ | |
// Some manipulation | |
} completion:^ | |
{ | |
// Some completion action | |
}] | |
} |
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
//! raw builder | |
TMTween(self.view).animate(@"frame.origin.x", ^(TMTween *tween) { | |
tween.from = tween.view.left; | |
tween.to = 110; | |
tween.duration = 1.5; | |
tween.options = PMTweenOptionNone; | |
tween.easing = easing; | |
}).animate(@"backgroundColor.blue", ^(TMTween *tween) { | |
tween.from = 0.3f; | |
tween.to = 1.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
@implementation KZPropertyMapper (MyAppBoxing) | |
+ (NSDate *)boxValueAsDateSince1970:(id)value __used | |
{ | |
if (value == nil) { | |
return nil; | |
} | |
AssertTrueOrReturnNil([value isKindOfClass:NSNumber.class]); | |
return [NSDate dateWithTimeIntervalSince1970:[value floatValue]]; | |
} |
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
when_modified((@[self.counterLabel, self.textView]), ^(id weakSelf) { | |
[weakSelf updateCharacterLimit]; | |
}); |
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
IDEBundleInjection.c: Error 3587 loading bundle '/Users/merowing/Library/Developer/Xcode/DerivedData/GeekFitness-gtvztnsddwdauobsjnmkmeurgqks/Build/Products/Debug-iphonesimulator/GeekFitnessTests.xctest': The bundle “GeekFitnessTests” couldn’t be loaded because it is damaged or missing necessary resources. | |
DevToolsBundleInjection environment: | |
XCInjectDiagnostics: (null) | |
XCInjectBundleInto: /Users/merowing/Library/Developer/Xcode/DerivedData/GeekFitness-gtvztnsddwdauobsjnmkmeurgqks/Build/Products/Debug-iphonesimulator/GeekFitness.app/GeekFitness | |
XCInjectBundle: /Users/merowing/Library/Developer/Xcode/DerivedData/GeekFitness-gtvztnsddwdauobsjnmkmeurgqks/Build/Products/Debug-iphonesimulator/GeekFitnessTests.xctest | |
TestBundleLocation: /Users/merowing/Library/Developer/Xcode/DerivedData/GeekFitness-gtvztnsddwdauobsjnmkmeurgqks/Build/Products/Debug-iphonesimulator/GeekFitnessTests.xctest | |
TMPDIR: /Users/merowing/Library/Developer/CoreSimulator/Devices/39DF8175-6F30-4946-9B23-8B27018F1CE4/data/Containers/Data/Applica |
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
CGContextRef bitmapContext = CGBitmapContextCreate(NULL, | |
rect.size.width, | |
rect.size.height, | |
CGImageGetBitsPerComponent(imageRef), | |
CGImageGetBytesPerRow(imageRef), | |
CGImageGetColorSpace(imageRef), | |
kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Little); |
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
- (void)dealloc { | |
[percentGender release]; | |
[percentHisto release]; | |
[percentPS release]; | |
[percentSmoke release]; | |
[percentGender dealloc]; | |
[percentHisto dealloc]; | |
[percentPS dealloc]; | |
[percentSmoke dealloc]; | |
percentGender = nil; |
OlderNewer