Update yum
$ yum update
Install Sudo
$ yum install sudo
NSTask * list = [[NSTask alloc] init]; | |
[list setLaunchPath:@"/bin/ls"]; | |
[list setCurrentDirectoryPath:@"/"]; | |
NSPipe * out = [NSPipe pipe]; | |
[list setStandardOutput:out]; | |
[list launch]; | |
[list waitUntilExit]; | |
[list release]; |
layout proc { |controller| controller.request.xhr? ? nil : 'application' } |
XCode project codes without CocoaPods | |
find . \( -iname \*.m -o -iname \*.mm -o -iname \*.c -o -iname \*.cc -o -iname \*.h \) \-not -path "./Pods/*" -exec wc -l '{}' \+ | |
Sinatra project codes | |
find . \( -iname \*.rb -o -iname \*.rake \) -exec wc -l '{}' \+ |
@implementation ArrayDataSource | |
- (id)itemAtIndexPath:(NSIndexPath*)indexPath { | |
return items[(NSUInteger)indexPath.row]; | |
} | |
- (NSInteger)tableView:(UITableView*)tableView | |
numberOfRowsInSection:(NSInteger)section { | |
return items.count; | |
} |
Install Package
$ sudo yum install postgresql-devel
Setting PostgresSQL
Initilize Database
$ sudo /etc/init.d/postgresql initdb
KEYS * type
FLUSHDB and FLUSHALL FLUSHDB deletes all keys in the current databases FLUSHALL deletes all keys in all databases clear redis database
redis-cli KEYS soulmate-* | xargs redis-cli DEL
// Get the storyboard named secondStoryBoard from the main bundle: | |
UIStoryboard *secondStoryBoard = [UIStoryboard storyboardWithName:@"secondStoryBoard" bundle:nil]; | |
// Load the initial view controller from the storyboard. | |
// Set this by selecting 'Is Initial View Controller' on the appropriate view controller in the storyboard. | |
UIViewController *theInitialViewController = [secondStoryBoard instantiateInitialViewController]; | |
// | |
// **OR** | |
// | |
// Load the view controller with the identifier string myTabBar |