Skip to content

Instantly share code, notes, and snippets.

Brock Whitten sintaxi

Block or report user

Report or block sintaxi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sintaxi
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
sintaxi / broker.js
Created Apr 3, 2014
push pull with waterfront.
View broker.js
var waterfront = require("waterfront")
waterfront.listen()
View gist:36daae63a28dbdaea70d
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 Aug 29, 2015
Debian configuration
View debian.md

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
View gist:bb844ab953beecdb681d
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")
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 || "https://foo.com")
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
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: "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 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
You can’t perform that action at this time.