Skip to content

Instantly share code, notes, and snippets.

View garrettwilkin's full-sized avatar

Garrett Wilkin garrettwilkin

View GitHub Profile
@garrettwilkin
garrettwilkin / apt-get & npm link logs
Created February 27, 2012 11:13
Install issues on ubuntu
@garrettwilkin
garrettwilkin / mdns 0.0.5 node-waf -v configure build
Created February 27, 2012 13:06
mdns 0.0.5 compile failing - help!
garrett@li284-151:~/mdns/agnat-node_mdns-d979f84$ node-waf -v configure build
Setting srcdir to : /home/garrett/mdns/agnat-node_mdns-d979f84
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
Checking for header dns_sd.h : 13:04:38 runner system command -> ['/usr/bin/g++', '-g', '-I/usr/local/include', '../test.cpp', '-c', '-o', 'default/test_1.o']
@garrettwilkin
garrettwilkin / Failing at linking Hook.io
Created February 27, 2012 22:59
This is me, trying to install hook.io since it won't come down with NPM 1.1, i'm trying it manually
Linking in the hook.io folder:
-----------------------------
garrett@li284-151:~/hook.io$ sudo npm link
npm WARN eyes@0.1.7 dependencies field should be hash of <name>:<version-range> pairs
npm http GET https://github.com/substack/socket.io-client/tarball/master
npm http 200 https://github.com/substack/socket.io-client/tarball/master
/usr/local/bin/hookio -> /usr/local/lib/node_modules/hook.io/bin/hookio
/usr/local/lib/node_modules/hook.io -> /home/garrett/hook.io
for (var f in HTTP) {
typeof HTTP[f] === 'function' && (this.HTTP[f] = HTTP[f].bind(this));
}
for (var member in provider) {
if (typeof provider[member] === 'function') {
if (member === 'HTTP' || member === 'provider') {
throw new Error('API object or function name `' + member + '` is reserved');
}
@garrettwilkin
garrettwilkin / .vimrc
Created April 17, 2012 23:23
.vimrc file when jslint causes input errors
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vungle manage Vundle
" required!
Bundle 'gmarik/vundle'
@garrettwilkin
garrettwilkin / nonblocking.tcl
Created June 7, 2012 15:10
Attempting Non-blocking IO with TCL
#Non-blocking channel
set nb "data.txt"
set data [open $nb r]
fconfigure $data -blocking 0
puts "$nb [fconfigure $data]"
#Blocking channel
set bl "data2.txt"
set data2 [open $bl r]
puts "$bl [fconfigure $data2]"
@garrettwilkin
garrettwilkin / d3-example.html
Created August 7, 2012 05:10
HTML for d3_identity error
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="src/d3/d3.js"></script>
<script type="text/javascript" src="src/d3/d3.geom.js"></script>
<script type="text/javascript" src="src/d3/d3.layout.js"></script>
</head>
<body>
<div id="viz1"></div>
<div id="viz2"></div>
@garrettwilkin
garrettwilkin / Stupid.js
Created August 29, 2012 14:40
overloading constructor
function Event(kind, method, url, data) {
this.kind = kind;
this.method = method;
this.url = url;
this.data = data;
this.milliseconds = new Date().getTime();
};
/*
function Event( obj ) {
@garrettwilkin
garrettwilkin / Jistu Deploy fail
Created September 1, 2012 00:33
First Jitsu deploy fails
gw@airy ~/C/HackerClubProjectOne> jitsu deploy
info: Welcome to Nodejitsu garrettwilkin
info: jitsu v0.9.8
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
warn: There is no package.json file in /Users/gw/Code/HackerClubProjectOne
warn: Creating package.json at /Users/gw/Code/HackerClubProjectOne/package.json
help:
help: A package.json stores meta-data about an app
help: In order to continue we'll need to gather some information about the app
@garrettwilkin
garrettwilkin / MongoBadData
Created September 2, 2012 03:12
Bad Data Decision
I wrote this to standardize all the meta data that i wanted in my documents:
function Shlock(kind, method, url, data) {
this.kind = kind;
this.method = method;
this.url = url;
this.data = data;
this.time = new Date().toJSON();
};