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
cd ~/Dropbox | |
mkdir -p git/proj1 | |
cd git/proj1 | |
git init --bare |
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
[0,7,5,10,4,15,2,13,4,16,4,10,1].map(function(a){return this[a];},typeof("")+typeof(0)+NaN+"d.").join("") |
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
// will use a fade transition for the next push or pop on the view controllers stack | |
-(void) setNavigationTransition | |
{ | |
CATransition* transition = [CATransition animation]; | |
transition.duration = 0.5; | |
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; | |
transition.type = kCATransitionFade; | |
[self.navigationController.view.layer addAnimation:transition forKey:nil]; | |
} |
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
yes "this is the song that doesn't end it goes on and on my friend, some people started singing and they continue singing just because" |
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
#pragma mark UITableViewDelegate | |
- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
[tableView deselectRowAtIndexPath:indexPath animated:YES]; | |
} | |
#pragma mark - | |
#pragma mark UITableViewDataSource |
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
// Binary find in a sorted array | |
// val can either be a value or a function that returns | |
// 1 == found, -1 for obj is less than val, 1 for obj is greater than val | |
_.bfind = function(array, val) { | |
if (!array.length) { | |
return null; | |
} | |
var iterator = _.isFunction(val) ? val : function(obj) { | |
return obj == val ? 0 : (obj < val ? -1 : 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
mysqldump -uroot -p 1_default data --single-transaction --where='id > (select max(id)-1000000 from data)' > 1_default_data.sql |
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
ssh #MACHINE NAME HERE# "ssh -oStrictHostKeyChecking=no -T [email protected]" |
NewerOlder