This file contains hidden or 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
| apply-stash = "!bash -c 'git stash list | grep $0 && git stash apply `git stash list | grep $0 | cut -d : -f 1`'" |
This file contains hidden or 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 NSURLConnection (Timeout) | |
| + (dispatch_queue_t)timeoutLockQueue { | |
| static dispatch_queue_t queue; | |
| static dispatch_once_t onceToken; | |
| dispatch_once(&onceToken, ^{ | |
| queue = dispatch_queue_create("timeout lock queue", DISPATCH_QUEUE_SERIAL); | |
| }); | |
| return queue; | |
| } |
This file contains hidden or 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
| // http://cocoawithlove.com/2009/10/ugly-side-of-blocks-explicit.html has a nice breakdown of the syntax--it helps to think of the ^ as similar to a pointer dereference symbol * | |
| // block typedef: | |
| typedef void(^Block)(); | |
| typedef void(^ConditionalBlock)(BOOL); | |
| typedef NSString*(^BlockThatReturnsString)(); | |
| typedef NSString*(^ConditionalBlockThatReturnsString)(BOOL); | |
| // block property with typedef: |
This file contains hidden or 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)contentUpdated { | |
| CGFloat outsidePadding = 10; | |
| CGFloat paddingBetweenElements = 5; | |
| CGFloat maxHeadlineHeight = 200; | |
| self.thumbnail.frame = (CGRect){(CGPoint){outsidePadding, outsidePadding}, self.thumbnail.image.size}; | |
| CGFloat headlineWidth = WIDTH(self) - (RIGHT(self.thumbnail) + paddingBetweenElements + outsidePadding); | |
| CGFloat headlineHeight = [self.headline.text sizeWithFont:self.headline.font | |
| constrainedToSize:CGSizeMake(headlineWidth, maxHeadlineHeight)].height; |
This file contains hidden or 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
| #warning Don't commit me | |
| NSString *logPath = @"/tmp/myapp.log"; | |
| freopen([logPath fileSystemRepresentation], "a", stderr); |
This file contains hidden or 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
| git-search-diffs() { | |
| if [ -z "$2" ] | |
| then | |
| echo "Use git-search-diffs to search for commits where the diff includes the search term" | |
| echo "Usage: git-search-diffs <path> <search term>" | |
| return | |
| fi | |
| git log -p $1 | egrep -i "^commit|^[-+].*$2" | egrep -B1 ^[+-] | |
| } |
This file contains hidden or 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
| // | |
| // HudlHlsAvPlayerCache.m | |
| // Hudl | |
| // | |
| // Created by Brian Clymer on 3/6/15. | |
| // Copyright (c) 2015 Agile Sports Technologies, Inc. All rights reserved. | |
| // | |
| #import "HudlHlsAvPlayerCache.h" |
This file contains hidden or 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
| { | |
| "id": 21640, | |
| "leagueScoresWidget": { | |
| "games": [] | |
| }, | |
| "live_update": true, | |
| "metadata_type": "permanent", | |
| "name": "nfl_ts", | |
| "native_next_game_widget": null, | |
| "published_at": "2016-04-22T05:22:15Z", |
This file contains hidden or 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
| { | |
| "items": [ | |
| { | |
| "color1": "911919", | |
| "color2": "202020", | |
| "commentary": { | |
| "description": "", | |
| "title": "" | |
| }, | |
| "featured": false, |
OlderNewer