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 hyperquest = require('hyperquest'); | |
var result; | |
module.exports = function downloadUtf8FileIntoString(url, cb) { | |
if (!url) return cb(Error('url is required')); | |
result = ''; | |
hyperquest(url) | |
.pipe(function (chunk, enc, tCb) { | |
result += chunk.toString('utf8'); // binary to utf8 | |
tCb(); | |
}) |
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
#Requests from outside | |
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3080 | |
iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 3443 | |
#Requests from localhost | |
iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 3080 | |
iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 443 -j REDIRECT --to-ports 3443 |
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 spawn = require('child_process').spawn; | |
spawn('node', ['app.js'], {stdio: 'inherit', cwd: 'gaviota-api/'}); | |
spawn('node', ['app.js'], {stdio: 'inherit', cwd: 'gaviota-proxy/'}); | |
spawn('node', ['app.js'], {stdio: 'inherit', cwd: 'gaviota-api-async/'}); | |
spawn('node', ['app.js'], {stdio: 'inherit', cwd: 'mf-public-web/'}); | |
spawn('grunt.cmd', ['server:fastcss'], {stdio: 'inherit', cwd: 'TrainerWeb/'}); | |
spawn('sass.bat', ['--compass', '--watch', 'styles/main.scss:styles/main.css'], {stdio: 'inherit', cwd: 'TrainerWeb/app/Trainer/'}); |