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
exports.init = function () { | |
railway.tools.database = function db() { | |
var action = process.argv[3]; | |
switch (action) { | |
case 'migrate': | |
case 'update': | |
perform(action, process.exit); | |
break; | |
default: | |
console.log('Unknown action', action); |
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.use(function blackoutMiddleware(req, res) { | |
// obtain static html here: http://www.zachstronaut.com/lab/text-shadow-box/stop-sopa.html | |
// or here: https://raw.github.com/zachstronaut/stop-sopa/master/index.html | |
fs.readFile('./public/stopSOPA.html', function (err, file) { | |
res.send(file.toString(), 503); | |
}); | |
}); |
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 Module = require('module'); | |
var vm = require('vm'); | |
var path = require('path'); | |
var filename = process.cwd() + '/lib/eval.js'; | |
var mod = new Module(filename); | |
var context = { | |
module: mod, | |
__filename: filename, |
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
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
load 'config/deploy' |
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 group_name = false, EXT_EXP; | |
function it(should, test_case) { | |
check_external_exports(); | |
if (group_name) { | |
EXT_EXP[group_name][should] = test_case; | |
} else { | |
EXT_EXP[should] = test_case; | |
} | |
} |
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
#!/bin/bash | |
NODE_VERSION=0.3.1 | |
NODE_FILE=node-v$NODE_VERSION | |
MY_USER=anatoliy | |
REDIS_VERSION=2.0.3 | |
apt-get update | |
apt-get install -y build-essential git-core nginx libssl-dev pkg-config | |
wget http://nodejs.org/dist/$NODE_FILE.tar.gz |
NewerOlder