Skip to content

Instantly share code, notes, and snippets.

View jfhbrook's full-sized avatar
💭
KNEE DEEP IN THE HOOPLA

Josh Holbrook jfhbrook

💭
KNEE DEEP IN THE HOOPLA
View GitHub Profile
npm it worked if it ends with ok
npm sudo true
npm configfile /root/.npmrc
npm cli [ 'install', 'dnode' ]
npm version 0.1.19
npm install pkg dnode
npm fetch data dnode
npm GET dnode
npm install pkg dnode
npm nodeSupported by dnode@0.0.1 true
@jfhbrook
jfhbrook / gitchecker.js
Created July 13, 2010 20:40
Look ma, I can watch repos on github AND message irc!
//TODO: Like, Actually Install these things so they don't depend on abs. paths?
var sys = require('sys')
var GitHubApi = require('./lib/github').GitHubApi
//May want to use Jerk later. :/
var IRC = require('./lib/irc')
var gh = new GitHubApi(true)
var options = { server: 'irc.freenode.net',
nick: 'lulzbot',
[josh@eevee ~]$ su -c'npm install htmlparser'
Password:
npm it worked if it ends with ok
npm sudo true
npm configfile /root/.npmrc
npm cli [ 'install', 'htmlparser' ]
npm version 0.1.19
npm install pkg htmlparser
npm fetch data htmlparser
npm GET htmlparser
[josh@eevee dnode-chat]$ su -c'npm cache clean && npm install dnode'
Password:
npm it worked if it ends with ok
npm sudo true
npm configfile /root/.npmrc
npm cli [ 'cache', 'clean' ]
npm version 0.1.19
npm ok
npm it worked if it ends with ok
npm sudo true
% datamanip_example.m
% An example for Kyle
% Example vectors
a=1:10
b=11:20
% Probably the format you'll see them in:
A= [a' b']
//Does the equivalent of:
// curl -d 'url=http://www.google.com' http://www.ln-s.net/home/api.jsp
var http = require('http');
var querystring = require('querystring');
var client = http.createClient(80, 'www.ln-s.net');
var query = querystring.stringify({url: 'http://www.google.com'});
var request = client.request('POST', '/home/api.jsp?'+query, {host: 'ln-s.net'});
@jfhbrook
jfhbrook / gru.coffee
Created August 3, 2010 21:31
The basic DNode example in coffee-script.
#!/usr/bin/env coffee
# This one makes the call.
DNode: require 'dnode'
sys: require 'sys'
DNode.connect(6060, (remote) ->
remote.timesTen(5, (res) ->
sys.puts res )
@jfhbrook
jfhbrook / make.log
Created August 4, 2010 00:16
Believe it or not, node's make actually had an error on the ARSCputers.
DEST_OS: linux
DEST_CPU: x86_64
Parallel Jobs: 1
/usr/lib64/ccache/gcc -rdynamic -D_GNU_SOURCE -DHAVE_CONFIG_H=1 -DEV_MULTIPLICITY=0 -pthread -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPLATFORM=linux -DNDEBUG -g -O3 -Idefault/deps/libeio -I../deps/libeio -Idefault -I.. ../deps/libeio/eio.c -c -o default/deps/libeio/eio_1.o
/usr/lib64/ccache/gcc -rdynamic -D_GNU_SOURCE -DHAVE_CONFIG_H=1 -DEV_MULTIPLICITY=0 -pthread -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPLATFORM=linux -DNDEBUG -g -O3 -Idefault/deps/libev -I../deps/libev -Idefault -I.. ../deps/libev/ev.c -c -o default/deps/libev/ev_1.o
/usr/lib64/ccache/gcc -rdynamic -D_GNU_SOURCE -DHAVE_CONFIG_H=1 -DEV_MULTIPLICITY=0 -pthread -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPLATFORM=linux -DNDEBUG -g -O3 -Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/linux-x86_64 -I../deps/c-ares/linux-x86_64 ../deps/c-ares/ares_strcasecmp.c -c -o default/deps/c-ares/ares_strcasecmp_1.o
/usr/lib64/cc
@jfhbrook
jfhbrook / BlackBox.js
Created August 11, 2010 00:46
I've been thinking about dataflow-paradigm languages. Events would make for a handy way to deal with edges.
EE = require('events').EventEmitter
//edges isn't well-thought-out. I want to be able to hold it as a string but treat it as a pointer. :/
// I could also make edges contain both a name *and* an EE-/type/ object, for more flex. Might be The Way.
function BlackBox(fxn, edges) {
blackbox = new EE;
blackbox.input = [none, none];
blackbox.edges = edges;
blackbox.on('input' function(index,val) {
if ( index < input.length() ) {
@jfhbrook
jfhbrook / tdl.md
Created August 31, 2010 00:46
Back-To-School To-Do List

GARY TRUDEAU LIST:

  • Dynamicals #5
  • Grade E&tE hw
  • Make sweet images for poster
  • Mod/deploy Tues. quiz
  • Hack on something
    • Land of Lisp
    • dnode-python
  • Any of your other half-baked projects