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
@media only screen and (device-width: 768px) { | |
/* For general iPad layouts */ | |
} | |
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait) { | |
/* For portrait layouts only */ | |
} | |
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape) { | |
/* For landscape layouts only */ |
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
app.get('/', function(req, res){ | |
var ua = req.header('user-agent'); | |
if(/mobile/i.test(ua)) { | |
res.render('mobile.html'); | |
} else { | |
res.render('desktop.html'); | |
} | |
}); |
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
#replace previous command str1 to str 2 | |
^str1^str2^ | |
or | |
!!:gs/str1/str2/ | |
# execute the most recent command the contains the following string: | |
!?ncm |
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
node_modules | |
config.js |
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
- (IBAction)passValueButton:(id)sender { //An action method | |
{ | |
User *user = [[User alloc] init]; | |
user.name = "Ryan"; | |
user.age = "26"; | |
//get the instance of ViewController2 | |
ViewController2 *viewCtrl2 = [[SecondViewController alloc] | |
initWithNibName:@"ViewController2" bundle:[NSBundle mainBundle]]; | |
viewCtrl2.user = user; |
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
- (IBAction)passValueButton:(id)sender { //An action method | |
[self performSegueWithIdentifier:@"gotoView2" sender:self]; | |
} | |
#pragma mark handle segue | |
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | |
if ([[segue identifier] isEqualToString:@"gotoView2"]) { | |
User *user = [[User alloc] init]; | |
user.name = "Ryan"; | |
user.age = "26"; |
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
+(GeneralData *) sharedInstance; | |
@property (nonatomic) User *user; |
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(event) { | |
// Allow: backspace, delete, tab, escape, and enter | |
if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 || event.keyCode == 13 || | |
// Allow: Ctrl+A | |
(event.keyCode == 65 && event.ctrlKey === true) || | |
// Allow: home, end, left, right | |
(event.keyCode >= 35 && event.keyCode <= 39)) { | |
// let it happen, don't do anything | |
return; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0"> | |
<title>AutoUpdate</title> | |
<link rel="shortcut icon" href="/imgs/favicon.png" type="image/x-icon"> | |
<link rel="apple-touch-icon" href="http://dl.dropbox.com/u/15540367/Forever/ota-test.png"> | |
</head> | |
<body> |
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
<snippet> | |
<content><![CDATA[base(this, '${1:method}'${2});${0}]]></content> | |
<tabTrigger>base</tabTrigger> | |
<scope>source.js</scope> | |
<description>Base method call</description> | |
</snippet> |