This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs') | |
var stdout = fs.readFileSync('./tap.log', 'utf8'); | |
var TapConsumer = require("tap-consumer"); | |
var tc = new TapConsumer; | |
tc.on('data', function(c) { | |
console.log('test result>',c); | |
}); | |
tc.on('end', function(err, total, passed) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var redis = require('redis'), | |
client = redis.createClient(); | |
client.on("error", function (err) { console.log("Error " + err.stack) }); | |
client.set('hello', 'mjr'); | |
var timestamp = (new Date()).getTime() + 400e3; | |
client.expireat('hello', timestamp, function(err, set) { | |
client.ttl('hello', function (err, ttl) { | |
console.log(ttl - timestamp); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import roslib; roslib.load_manifest('enclosure_escape') | |
import rospy | |
from geometry_msgs.msg import Twist | |
from turtlebot_node.msg import TurtlebotSensorState | |
# global variables | |
bump = False | |
# listen (adapted from line_follower | |
def processSensing(TurtlebotSensorState): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh -vv [email protected] | |
OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009 | |
debug1: Reading configuration data /Users/david/.ssh/config | |
debug1: Applying options for hollaback.no.de | |
debug1: Reading configuration data /etc/ssh_config | |
debug2: ssh_connect: needpriv 0 | |
debug1: Connecting to hollaback.no.de [64.30.138.193] port 36023. | |
debug1: Connection established. | |
debug1: identity file /Users/david/.ssh/identity type -1 | |
debug2: key_type_from_name: unknown key type '-----BEGIN' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Desktop§ npm install socket.io | |
npm ERR! /sw/bin/gtar "-mvxpf" "-" "-o" "-C" "/var/folders/HX/HXMFaA8gFNC4WNt6MCP4v++++TI/-Tmp-/npm-1314473835860/1314473835860-0.012335359817370772/contents/___package.npm" /sw/bin/gtar: Ignoring unknown extended header keyword `LIBARCHIVE.creationtime' | |
npm ERR! /sw/bin/gtar "-mvxpf" "-" "-o" "-C" "/var/folders/HX/HXMFaA8gFNC4WNt6MCP4v++++TI/-Tmp-/npm-1314473835860/1314473835860-0.012335359817370772/contents/___package.npm" /sw/bin/gtar: Ignoring unknown extended header keyword `SCHILY.dev' | |
npm ERR! /sw/bin/gtar "-mvxpf" "-" "-o" "-C" "/var/folders/HX/HXMFaA8gFNC4WNt6MCP4v++++TI/-Tmp-/npm-1314473835860/1314473835860-0.012335359817370772/contents/___package.npm" /sw/bin/gtar: Ignoring unknown extended header keyword `SCHILY.ino' | |
npm ERR! /sw/bin/gtar "-mvxpf" "-" "-o" "-C" "/var/folders/HX/HXMFaA8gFNC4WNt6MCP4v++++TI/-Tmp-/npm-1314473835860/1314473835860-0.012335359817370772/contents/___package.npm" /sw/bin/gtar: Ignoring unknown extended header keyword `SCHILY.nlink' | |
npm ERR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express') | |
, url = require('url') | |
, util = require('util') | |
, app = express.createServer() | |
; | |
app.get('/getData', function(req, res){ | |
console.log(util.inspect(req.query, false, 2)); | |
res.send('Hello World, ' + req.query.start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 932e9ced7dff802bb48843f531259fc2eda5a72d Mon Sep 17 00:00:00 2001 | |
From: David Trejo <[email protected]> | |
Date: Wed, 18 May 2011 18:39:06 -0700 | |
Subject: [PATCH] readline docs | |
--- | |
doc/api/readline.md | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++ | |
1 files changed, 133 insertions(+), 0 deletions(-) | |
create mode 100644 doc/api/readline.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// opts = { timeout: 60 } | |
function ExpiringMap(opts) { | |
var self = {} | |
, map = {} | |
, activeKeys = { | |
// key: clearTimeout | |
} | |
, noop = function() {}; | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var util = require('util') | |
, fs = require('fs') | |
, xml2js = require('xml2js-expat') | |
, querystring = require('querystring') | |
, _ = require('underscore'); | |
// this is provided by xml2js | |
function parse(xmlString, cb) { | |
var parser = new xml2js.Parser(); | |
parser.on('end', function(result) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install npm on machines with node at arbitrary spot | |
# node is installed at some arbitrary path | |
echo '# npm paths' >> ~/.bashrc | |
echo 'export PATH=~/bin:~/local/share/man:$PATH' >> ~/.bashrc | |
echo 'export MANPATH=$MANPATH:~/local/share/man' # I think this may not work | |
. ~/.bashrc | |
cat <<NPMRC >>$HOME/.npmrc | |
root = ~/.node_libraries | |
manroot = ~/local/share/man | |
binroot = ~/bin |