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
// list a directory | |
{ | |
command: 'ls', | |
arguments: [ | |
{'uri': '/home/dunk/*.json'} | |
] | |
} | |
// list a directory and grep the returned files for foo | |
{ |
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
// Retrieving the "dashboard" object will tell you how to draw the | |
// dashboard. I've organized the things with "panes" so if we want to | |
// add a right top or bottom one later the data format already | |
// supports it. | |
var exdata = { | |
"dashboard": { | |
"name" : "mydashboard", |
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
dunk@somehost:/tmp$ sudo npm install fatbot | |
npm it worked if it ends with ok | |
npm configfile /home/dunk/.npmrc | |
npm cli [ 'install', 'fatbot' ] | |
npm version 0.1.20 | |
npm install pkg fatbot | |
npm fetch data fatbot | |
npm GET fatbot | |
npm install pkg fatbot | |
npm install pkg [email protected] |
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 connect = require('connect'), | |
sys = require('sys'); | |
if( 0 ) { | |
// this works | |
module.exports = connect.createServer( | |
function(req, resp) { | |
sys.puts('json request'); | |
req.setEncoding('utf8'); | |
var body = ''; |
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
module.exports = connect.createServer( | |
connect.staticProvider(__dirname), | |
connect.router(function(app) { | |
app.post('/posttest', function(req, resp, params) { | |
sys.puts('post request'); | |
req.setEncoding('utf8'); | |
var body = ''; | |
req.addListener('data', function(data) { | |
sys.puts('data'+ data); | |
body += data; |
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 spidermonkey import Runtime | |
import sys | |
rt = Runtime() | |
def jsprint(*args): | |
print " ".join(str(a) for a in args) | |
def _require(source): | |
cx = newcontext() |
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
""" | |
simple script to merge multiple har files | |
usage: python merge_har.py out.har mylogs/*.har | |
""" | |
import simplejson | |
import sys | |
def merge(out_fn, in_files): | |
merged_log = { | |
'version': '1.1', |
NewerOlder