Skip to content

Instantly share code, notes, and snippets.

View sintaxi's full-sized avatar
🔥
GSD

Brock Whitten sintaxi

🔥
GSD
View GitHub Profile
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")
@sintaxi
sintaxi / debian.md
Last active August 29, 2015 14:04
Debian configuration

basics

apt-get update && apt-get upgrade
apt-get install build-essential

install node & npm

cd /src
wget http://nodejs.org/dist/v0.10.29/node-v0.10.29.tar.gz

tar -zxvf node-v0.10.29.tar.gz

Add sshkey to know hosts (from local machine)...
scp ~/.ssh/id_rsa.pub root@server-address.com:authorized_keys
Login to VM...
ssh -A root@server-address.com
mkdir .ssh; mv authorized_keys .ssh/authorized_keys
@sintaxi
sintaxi / Makefile
Last active December 3, 2015 18:23
poor mans package manager
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; \
@sintaxi
sintaxi / broker.js
Created April 3, 2014 20:29
push pull with waterfront.
var waterfront = require("waterfront")
waterfront.listen()
@sintaxi
sintaxi / gist:9543597
Last active August 29, 2015 13:57
deploying harp to github pages.
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