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
const http = require('http'); | |
const { parse } = require('querystring'); | |
const server = http.createServer((req, res) => { | |
if (req.method === 'POST') { | |
collectRequestData(req, result => { | |
console.log(result); | |
res.end(`Parsed data belonging to ${result.fname}`); | |
}); | |
} |
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
pkgin in gcc47 | |
pkgin in gmake | |
wget http://www.maier-komor.de/software/mbuffer/mbuffer-20140310.tgz | |
gtar -xzvf mbuffer-20140310.tgz | |
cd mbuffer-20140310 | |
./configure --prefix=/usr/local --disable-debug CFLAGS="-O -m64" | |
MAKE=gmake | |
gmake && gmake install |
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 exec = require('child_process').exec; | |
var child; | |
var cmdCommand = "dir"; | |
child = exec(cmdCommand, function (error, stdout, stderr) { | |
console.log('stdout:\n' + stdout); | |
console.error('stderr:\n' + stderr); | |
if (error !== null) { | |
console.error('exec error: ' + error); | |
} |
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
npm install -g lactate |
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 | |
mkdir /root/.ssh | |
touch /root/.ssh/authorized_keys | |
echo <public key> >> /root/.ssh/authorized_keys |
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
# Install necessary packages | |
pkgin up | |
pkgin -y install \ | |
bash \ | |
coreutils \ | |
curl \ | |
gcc47 \ | |
# gcc47-runtime \ | |
gmake \ | |
icu \ |