Skip to content

Instantly share code, notes, and snippets.

Garrett Wilkin garrettwilkin

Block or report user

Report or block garrettwilkin

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
View apt-get & npm link logs
View mdns 0.0.5 node-waf -v configure build
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 Feb 27, 2012
This is me, trying to install hook.io since it won't come down with NPM 1.1, i'm trying it manually
View Failing at linking Hook.io
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
View Some crazy advanced stuff going on here...
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 Apr 17, 2012
.vimrc file when jslint causes input errors
View .vimrc
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 Jun 7, 2012
Attempting Non-blocking IO with TCL
View nonblocking.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 Aug 7, 2012
HTML for d3_identity error
View d3-example.html
<!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 Aug 29, 2012
overloading constructor
View Stupid.js
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 Sep 1, 2012
First Jitsu deploy fails
View Jistu Deploy fail
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
View MongoBadData
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();
};
You can’t perform that action at this time.