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
@-webkit-keyframes bgcolor { 0% { background-color: #ffccf2; } | |
50% { background-color: #ccffcc; } | |
100% { background-color: #ccffff; } } | |
@-moz-keyframes bgcolor { 0% { background-color: #ffccf2; } | |
50% { background-color: #ccffcc; } | |
100% { background-color: #ccffff; } } | |
@-ms-keyframes bgcolor { 0% { background-color: #ffccf2; } | |
50% { background-color: #ccffcc; } |
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
{ | |
apps : [{ | |
"name" : "api", | |
"script" : "./app1/api.js", | |
"instances" : "4" | |
},{ | |
"name" : "dev-api", | |
"script" : "./app2/child.js", | |
"instances" : "1" | |
}], |
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
# nginx | |
description "nginx http daemon" | |
author "George Shammas <[email protected]>" | |
start on (filesystem and net-device-up IFACE=lo) | |
stop on runlevel [!2345] | |
env DAEMON=/usr/bin/nginx | |
env PID=/usr/local/nginx/logs/nginx.pid |
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 nobody; | |
worker_processes auto; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; |
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 grunt = require('grunt'); | |
var gruntfile = require('./Gruntfile.js')(grunt); | |
var tasks = grunt.task._tasks; | |
var tasks_array = []; | |
for (var task in tasks) { | |
if (tasks.hasOwnProperty(task)) { | |
console.log(tasks[task].name); |
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.all('*', function (req, res, next) { | |
res.header("Access-Control-Allow-Origin", req.headers.origin); | |
res.header("Access-Control-Allow-Credentials", true); | |
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS'); | |
res.header("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, Authorization, Content-Length"); | |
if (req.method == 'OPTIONS') { | |
return res.send(200); | |
} |
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
Object.defineProperty(global, '__stack', { | |
get: function(){ | |
var orig = Error.prepareStackTrace; | |
Error.prepareStackTrace = function(_, stack){ return stack; }; | |
var err = new Error; | |
Error.captureStackTrace(err, arguments.callee); | |
var stack = err.stack; | |
Error.prepareStackTrace = orig; | |
return stack; | |
} |
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 Proxy = require('./proxy.js'); | |
var HttpWrap = module.exports = function(http) { | |
Proxy.wrap(http.Server.prototype, ['on', 'addListener'], function(addListener) { | |
return function(event, listener) { | |
if (!(event === 'request' && typeof listener === 'function')) return addListener.apply(this, arguments); | |
return addListener.call(this, event, function(request, response) { | |
var self = this; |
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
Entering in node wrap logic (cluster_mode) for script /root/pm2/examples/kill-not-so-fast.js | |
Debug port must be in range 1024 to 65535. | |
Usage: node [options] [ -e script | script.js ] [arguments] | |
node debug script.js [arguments] | |
Options: | |
-v, --version print node's version | |
-e, --eval script evaluate script | |
-p, --print evaluate script and print result | |
-i, --interactive always enter the REPL even if stdin |
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
git clone https://github.com/Unitech/PM2.git | |
cd PM2 | |
npm install | |
npm test |