Skip to content

Instantly share code, notes, and snippets.


Brock Whitten sintaxi

View GitHub Profile
sintaxi / gist:9543597
Last active Aug 29, 2015
deploying harp to github pages.
View gist:9543597
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!
sintaxi / broker.js
Created Apr 3, 2014
push pull with waterfront.
View broker.js
var waterfront = require("waterfront")
View gist:36daae63a28dbdaea70d
Add sshkey to know hosts (from local machine)...
scp ~/.ssh/
Login to VM...
ssh -A
mkdir .ssh; mv authorized_keys .ssh/authorized_keys
sintaxi /
Last active Aug 29, 2015
Debian configuration


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

install node & npm

cd /src
tar -zxvf node-v0.10.29.tar.gz
View gist:bb844ab953beecdb681d
var program = require("commander")
.usage("[project] [domain]")
.option("-e, --endpoint <domain>", "API endpoint of surge server (eg:")
.description("display who logged in as")
View gist:b02a176a8ea0eea6d11c
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.
View domain-helper.js
* Implementation
var url = require("url")
var u = function(domain){
var urlObj = url.parse(domain || "")
View gist:bcec8a3f28533a139b3c
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)
sintaxi / surge.js
Last active Aug 29, 2015
surge library interface
View surge.js
var surge = require("surge")
var readableStream = surge.createReadableStream("path/to/project")
surge.publish(readableStream, { domain: "", email: "", password: "bigsecret" }, function(errors, deployment){
if (errors) return "invalid arguments. cant deploy."
deployment.on("error", function(err){
console.log("Oops! something went wrong")
sintaxi / gist:26924fc02788fa6e4075
Created Apr 27, 2015
check to see if cert used key.
View gist:26924fc02788fa6e4075
(openssl x509 -noout -modulus -in my.crt | openssl md5 ; openssl rsa -noout -modulus -in my.key | openssl md5) | uniq