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 | |
class DispatchGroup { | |
private var blocks: [dispatch_block_t] = [] | |
private let dispatch_queue = dispatch_queue_create("com.dispatch_group.foo", DISPATCH_QUEUE_CONCURRENT) | |
private let dispatch_group = dispatch_group_create() | |
func andThen(block: dispatch_block_t) -> Group { | |
blocks += [block] | |
return self |
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
### Keybase proof | |
I hereby claim: | |
* I am gfontenot on github. | |
* I am gfontenot (https://keybase.io/gfontenot) on keybase. | |
* I have a public key whose fingerprint is FC96 877D E91A C0B4 381D D33A 0BF4 A6C7 2DA8 F9CE | |
To claim this, I am signing this object: |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
- (NSMapTable *)stringMap | |
{ | |
NSMapTable _map = [[NSMapTable alloc] init] | |
[_map setObject:@"some string" forKey:@(MyLoginAction0)]; | |
[_map setObject:@"some other string" forKey:@(MyLoginAction1)]; | |
[_map setObject:@"some final string" forKey:@(MyLoginAction3)]; | |
return _map | |
} | |
textLabel.text = [self stringMap][@(self.postLoginAction)] |
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
2013-10-02 19:48:30.386 collection[8782:70b] Cell center.y: 1610.000000 | |
2013-10-02 19:48:30.386 collection[8782:70b] ScrollView center.y: 284.000000 | |
2013-10-02 19:48:30.387 collection[8782:70b] fucking math: 1326.000000 | |
2013-10-02 19:48:30.387 collection[8782:70b] Cell center.y: 1280.000000 | |
2013-10-02 19:48:30.387 collection[8782:70b] ScrollView center.y: 284.000000 | |
2013-10-02 19:48:30.388 collection[8782:70b] fucking math: 996.000000 | |
2013-10-02 19:48:30.388 collection[8782:70b] Cell center.y: 1500.000000 | |
2013-10-02 19:48:30.388 collection[8782:70b] ScrollView center.y: 284.000000 | |
2013-10-02 19:48:30.388 collection[8782:70b] fucking math: 1216.000000 | |
2013-10-02 19:48:30.389 collection[8782:70b] Cell center.y: 1170.000000 |
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
SpecBegin(TTUser) | |
describe(@"TTUser", ^{ | |
__block TTUser *user; | |
__block NSDictionary *userDict; | |
before(^{ | |
userDict = @{ @"name" : @"Hormell Ansley", @"email" : @"[email protected]", @"id" : @1 }; | |
}); | |
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
code/game/AI_RocketTrooper.cpp:133: {//Hmm, have to get around this bastard | |
code/game/AI_Sniper.cpp:789: {//Hmm, have to get around this bastard... FIXME: this NPCInfo->enemyLastSeenTime builds up when ducked seems to make them want to run when they uncrouch | |
code/game/AI_Stormtrooper.cpp:2419: {//Hmm, have to get around this bastard | |
code/game/AnimalNPC.cpp:263: // FIXME! Why do you keep repeating over and over!!?!?!? Bastard! | |
code/game/AnimalNPC.c:607: // FIXME! Why do you keep repeating over and over!!?!?!? Bastard! | |
code/game/g_vehicles.c:1400: { //if we've still got people in us, just kill the bastards | |
code/game/WalkerNPC.c:369: // FIXME! Why do you keep repeating over and over!!?!?!? Bastard! | |
codemp/cgame/cg_main.c:3662: { //we'll just stricmp this bastard, since there aren't all that many cgame-only things, and they all have special handling | |
codemp/game/AnimalNPC.c:501: // FIXME! Why do you keep repeating over and over!!?!?!? Bastard! | |
codemp/game/g_vehicles.c:1213: { //if we've still g |
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 = "OctoKit" | |
s.version = "0.1.1" | |
s.summary = "GitHub API client for Objective-C." | |
s.homepage = "https://github.com/octokit/octokit.objc" | |
s.license = 'MIT' | |
s.author = { "GitHub" => "[email protected]" } | |
s.source = { :git => "[email protected]:octokit/octokit.objc.git", :tag => s.version } |
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
CGColorRef darkColor = [[UIColor colorWithRed:0.0 | |
green:0.0 | |
blue:0.0 | |
alpha: inverse ? (SHADOW_INVERSE_HEIGHT / SHADOW_HEIGHT) * 0.5 : 0.5 | |
] CGColor]; | |
CGColorRef lightColor = [[self.backgroundColor colorWithAlphaComponent:0.0] CGColor]; | |
newShadow.colors = [NSArray arrayWithObjects:(__bridge id)(inverse ? lightColor : darkColor), | |
(__bridge id)(inverse ? darkColor : lightColor), |
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
- (BOOL)writeToURL:(NSURL *)absoluteURL ofType:(NSString *)typeName error:(NSError **)outError | |
{ | |
BOOL status = NO; | |
CGImageDestinationRef dest = nil; | |
/* Create a new CFStringRef containing a uniform type identifier (UTI) that is the equivalent | |
of the passed file extension. */ | |
CFStringRef utiRef = UTTypeCreatePreferredIdentifierForTag( | |
kUTTagClassFilenameExtension, | |
(CFStringRef) typeName, |