spec
|--- apis #do not put into controllers folder.
|--- your_api_test_spec.rb
|--- controllers
|--- models
|--- factories
|--- views
#UI Caveats
http://stackoverflow.com/questions/19927542/ios7-backgroundimage-for-uisearchbar
//clear the transparent background when search bar promot
[self.searchDisplayController.searchBar setBackgroundImage:[self imageWithColor:[UIColor yourColor]]
forBarPosition:0
barMetrics:UIBarMetricsDefault];
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
curl -H "Content-Type: application/json" --data @your-json-file-name.json http://localhost:XXXX/api-end-point |
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)preparePulltoRefresh{ | |
UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init]; | |
refreshControl.tintColor = [UIColor whiteColor]; | |
[refreshControl addTarget:self action:@selector(reloadMeetings) forControlEvents:UIControlEventValueChanged]; | |
//creating view for extending background color | |
CGRect frame = self.tableView.bounds; | |
frame.origin.y = -frame.size.height; | |
UIView *refreshBackgroundView = [[UIView alloc]initWithFrame:frame]; | |
refreshBackgroundView.backgroundColor = UIColorFromRGB(0xXXXXXX); |
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 'helpers/Utils.js'; | |
@import 'libraries/View.js'; | |
var onRun = function(context) { | |
utils.init(context); | |
dialog.showSuccessExportMessage(); | |
var app = [NSApplication sharedApplication]; | |
[app displayDialog:"Anything selected <img src='http://www.thinkandbuild.it/wp-includes/images/smilies/icon_sad.gif'/> " withTitle:"Exportabler"]; |
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
NSData *passData = [keychain objectForKey:(id)kSecValueData]; | |
NSString *pass = [[NSString alloc] initWithBytes:[passData bytes] length:[passData length] encoding:NSUTF8StringEncoding]; |
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
function set_ruby2_with_gemset(){ | |
local result=${PWD##*/} | |
local result=${result// /_} | |
local result=$(echo $result | tr '[A-Z]' '[a-z]') | |
echo "prepare ruby 2.0 with gemset "$result | |
rvm --create ruby-2.0.0-p247@$result | |
} | |
function use_ruby2_with_gemset(){ | |
local result=${PWD##*/} |
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
function set_ruby2_with_gemset(){ | |
local result=${PWD##*/} | |
local result=${result// /_} | |
local result=$(echo $result | tr '[A-Z]' '[a-z]') | |
echo "prepare ruby 2.0 with gemset "$result | |
rvm --create ruby-2.0.0-p247@$result | |
} | |
function use_ruby2_with_gemset(){ |
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
//Rails time to NSdate | |
NSDateFormatter *df = [[NSDateFormatter alloc] init]; | |
[df setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZ"]; | |
NSDate *date = [df dateFromString:@"2013-04-07T21:19:14Z"]; | |
//NSDate to String | |
NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; | |
[formatter setDateFormat:@"MM/dd/yyyy HH:mm a"]; |
NewerOlder