Skip to content

Instantly share code, notes, and snippets.

View sintaxi's full-sized avatar
🔥
GSD

Brock Whitten sintaxi

🔥
GSD
View GitHub Profile
@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!
@sintaxi
sintaxi / broker.js
Created April 3, 2014 20:29
push pull with waterfront.
var waterfront = require("waterfront")
waterfront.listen()
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 / 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

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")
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.
/**
* Implementation
*/
var url = require("url")
var u = function(domain){
var urlObj = url.parse(domain || "https://foo.com")
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
sintaxi / surge.js
Last active August 29, 2015 14:18
surge library interface
var surge = require("surge")
var readableStream = surge.createReadableStream("path/to/project")
surge.publish(readableStream, { domain: "foobar.com", email: "brock@sintaxi.com", password: "bigsecret" }, function(errors, deployment){
if (errors) return "invalid arguments. cant deploy."
deployment.on("error", function(err){
console.log("Oops! something went wrong")
})
@sintaxi
sintaxi / gist:26924fc02788fa6e4075
Created April 27, 2015 05:08
check to see if cert used key.
(openssl x509 -noout -modulus -in my.crt | openssl md5 ; openssl rsa -noout -modulus -in my.key | openssl md5) | uniq