apt-get update && apt-get upgrade
apt-get install build-essential
cd /src
wget http://nodejs.org/dist/v0.10.29/node-v0.10.29.tar.gz
tar -zxvf node-v0.10.29.tar.gz
Surge Analytics | |
Free Tier | |
- number of visits | |
- device type breakdown (desktop/tablet/phone/etc) | |
- status code breakdown (200/206/404/304/etc) | |
- page visits breakdown (number of requests to most popular endpoints) | |
/** | |
* Implementation | |
*/ | |
var url = require("url") | |
var u = function(domain){ | |
var urlObj = url.parse(domain || "https://foo.com") |
There will be a time when humans will be unable to overcome our physiological limitations. When that time comes, we will give robots the ability to evolve, and they, will become our Legacy. |
var program = require("commander") | |
program | |
.version('0.0.1') | |
.usage("[project] [domain]") | |
.option("-e, --endpoint <domain>", "API endpoint of surge server (eg: surge.sh)") | |
program | |
.command("whoami") | |
.description("display who logged in as") |
Add sshkey to know hosts (from local machine)... | |
scp ~/.ssh/id_rsa.pub [email protected]:authorized_keys | |
Login to VM... | |
ssh -A [email protected] | |
mkdir .ssh; mv authorized_keys .ssh/authorized_keys |
dirs: | |
mkdir -p pids logs data bin scripts conf/ssl src | |
haproxy: dirs | |
cd src; \ | |
curl http://www.haproxy.org/download/1.5/src/haproxy-1.5.1.tar.gz -o haproxy-1.5.1.tar.gz; \ | |
tar -zxvf haproxy-1.5.1.tar.gz; \ | |
cd haproxy-1.5.1; \ | |
make USE_OPENSSL=1 TARGET=generic; \ | |
mv haproxy ../../bin/haproxy; \ |
var waterfront = require("waterfront") | |
waterfront.listen() |
harp init _src <-- creates harp app in dir called _src | |
harp server _src <-- harp starts serving _src | |
harp compile _src . <-- compile _src to the project root | |
git commit -am "first deploy" <-- commit changes | |
git push origin master <-- deploy! |
global | |
maxconn 4096 | |
pidfile /Users/sintaxi/Documents/Node/Modules/pids/haproxy.pid | |
defaults | |
mode http | |
retries 3 | |
option redispatch | |
option httpclose | |
maxconn 2000 |