su -
yum install openssl-devel gcc-c++
cd /usr/local/src
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
error: Error running command deploy | |
error: Nodejitsu Error (500): Internal Server Error | |
error: npm http GET https://registry.npmjs.org/express | |
npm http GET https://registry.npmjs.org/jade | |
npm http GET https://registry.npmjs.org/mongodb | |
npm http GET https://registry.npmjs.org/passport | |
npm http GET https://registry.npmjs.org/passport-google-oauth | |
npm http GET https://registry.npmjs.org/connect-flash/0.1.0 | |
npm http GET https://registry.npmjs.org/connect-mongo | |
npm http GET https://registry.npmjs.org/xoauth2 |
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
> [email protected] install /root/tmp/tmp-25208tcl53wg/build/package/node_modules/mail | |
parser/node_modules/iconv | |
> node-gyp rebuild | |
make: Entering directory `/root/tmp/tmp-25208tcl53wg/build/package/node_modules/ | |
mailparser/node_modules/iconv/build' | |
CC(target) Release/obj.target/iconv/deps/libiconv/libcharset/lib/localcharset. | |
o | |
CC(target) Release/obj.target/iconv/deps/libiconv/lib/iconv.o | |
CXX(target) Release/obj.target/iconv/src/binding.o |
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.directive('datetime', ['$timeout', function($timeout) { | |
'use strict'; | |
var DATE_REGEXP_MAP = { | |
'/' : '[\\/]', | |
'-' : '[-]', | |
'.' : '[.]', | |
dd: '(0?[1-9]|[1-2][0-9]|3[0-1])\\b', | |
MM: '(0?[1-9]|1[0-2])\\b', | |
yyyy: '(\\d{4})\\b', |
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
//adapted from https://github.com/mgcrea/angular-strap/blob/master/src/directives/datepicker.js | |
app.directive('datetime', ['$timeout', function($timeout) { | |
'use strict'; | |
var DATE_REGEXP_MAP = { | |
'/' : '[\\/]', | |
'-' : '[-]', | |
'.' : '[.]', | |
dd: '(0?[1-9]|[1-2][0-9]|3[0-1])\\b', | |
MM: '(0?[1-9]|1[0-2])\\b', |
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
//in main app.js | |
var auth = require('./lib/auth'); | |
//... | |
app.use(auth.checkPermissions()); | |
//in lib/auth.js | |
exports.checkPermissions = function() { | |
return function checkPermissions(err, req, res, next) { | |
//sometimes this simply never kicks in, |
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
/* | |
To return an array of all prime numbers below 1000: | |
primeRange(1000); | |
*/ | |
function primeRange(max) | |
{ | |
var max_sqrt = Math.sqrt(max), | |
range = [], | |
current = 0; |
NewerOlder