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
// USER API | |
server.get('/:version/user/:userId', route, finished); | |
server.post('/:version/user', route, finished); | |
server.put('/:version/user/:userId', route, finished); | |
function route(req, res, next) | |
{ | |
var routeString = getRoutePathString(req.url); | |
var target; |
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
// app identifier를 찾아서 검색한다 | |
$.map($("div.card"), function(n, i) { | |
if($(n).attr("data-docid").indexOf("APP.IDENTIFIER") != -1) | |
{ | |
console.log(i, $(n).attr("data-docid")); | |
} | |
}); |
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
$ openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns_development_cert.p12 | |
$ openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns_development_key.p12 |
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
var str = "0000008"; | |
console.log("print : " + parseInt(str)); // print : 0 {or} print : 8 | |
console.log("print : " + parseInt(str, 10)); // print : 8 |
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
String.format = String.prototype.format = function() { | |
var i=0; | |
var string = (typeof(this) == "function" && !(i++)) ? arguments[0] : this; | |
for (; i < arguments.length; i++) | |
string = string.replace(/\{\d+?\}/, arguments[i]); | |
return string; | |
} |
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
table = [[UITableView alloc] initWithFrame:frame style:UITableViewStyleGrouped]; | |
// UITableView setBackgroundColor method is deprecated! | |
// use setBackgroundView! | |
[table setBackgroundView:nil]; | |
[table setBackgroundColor:[UIColor clearColor]]; |
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 /System/Library/Frameworks/JavaVM.framework/Versions | |
$ sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5 | |
$ sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0 |
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
Meteor.startup(function() { | |
// check twitter authorize | |
var config = Accounts.loginServiceConfiguration.findOne({service: "twitter"}); | |
if(!config) { | |
Accounts.loginServiceConfiguration.insert({ | |
service: "twitter", | |
consumerKey: "YOUR_APP_CONSUMER_KEY", | |
secret: "YOUR_APP_CONSUMER_SECRET" | |
}); | |
}; |
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
JSON.Parse(targetString.replace(/\n/g, "\\n")); |
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
var stringForCheck = "hello", patternRegExp = /[0-9][a-z]/; | |
var isCorrect = (new RegExp(stringForRegExp)).test(stringForCheck); |
NewerOlder