Skip to content

Instantly share code, notes, and snippets.

@gigonaut
gigonaut / setup.sh
Created July 24, 2018 16:19 — forked from bradp/setup.sh
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
var bunyan = require('bunyan');
var Stache = require('mustache');
var formatter = function(data) {
var str = "";
str += '-_-_-_-_-_-_-_,------, \n';
str += '_-_-_-_-_-_-_-| /\\_/\\\n';
str += '-_-_-_-_-_-_-~|__( ^ .^) \n';
str += '_-_-_-_-_-_-_-"" "" \n';
@gigonaut
gigonaut / director.js
Created January 26, 2012 06:13
simple director with next routing. see the array of routes in the router.
//
// require the native http module, as well as director.
//
var http = require('http'),
director = require('director');
//
// create some logic to be routed to.
//
function pre(next) {
@gigonaut
gigonaut / xer.js
Created January 18, 2012 03:48
xhr request wrapper.
/* Author: Zack Bonebrake
*/
var Requester = function(options) {
this.url = options.url;
this.data = options.data;
this.method = options.reqMethod;
this.cors = options.cors || false;
this.expects = options.expects || 'application/json'
//
// require the native http module, as well as director.
//
var http = require('http'),
director = require('director');
//
// create some logic to be routed to.
//
function pre(next) {
javascript:location.href='http://test.metaflies.local/workspaces/sweehat/bookmarks/build?location='+encodeURIComponent(location.href)+';name='+encodeURIComponent(document.title)