This file contains 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
sudo npm install -g npm | |
npm http GET https://registry.npmjs.org/npm | |
npm ERR! cb() never called! | |
npm ERR! not ok code 0 |
This file contains 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
{ | |
"name": "multilevel-end-test", | |
"description": "analyze end behavior", | |
"version": "0.0.0", | |
"repository": { | |
"url": "[email protected]:6034011" | |
}, | |
"main": "index.js", | |
"scripts": { | |
"test": "tape test/*.js" |
This file contains 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 levelup = require('level') | |
var zlib = require('zlib') | |
var fs = require('fs') | |
var through = require('through') | |
//hot backup | |
db = levelup(...) | |
var backingup = false |
This file contains 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
process.stdin.pipe(require('line-stream')()).pipe(require('through')(function(line){ | |
// do analysis on a line | |
})).pipe(process.stdout) |
This file contains 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
// write a log file! | |
file = open(logname,'a+'); | |
file.write("log line!\n"); | |
// stringify json | |
import json | |
json.dumps("hi"); | |
This file contains 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
// do series or exactly N parallel its the same | |
var c = jobs.length | |
, job = function(){ | |
doThing(function(){ | |
next() | |
}) | |
}, next = function(){ | |
c--; | |
if(!c) done(); | |
else job() |
This file contains 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 level = require('levelup') | |
, db = level('./streamtest.db') | |
var dbws = db.createWriteStream() | |
, c = 0 | |
, start = Date.now() | |
, intervalCount = 0 | |
, bytes = 0 | |
, paused = false |
This file contains 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 through = require('through'); | |
// pure js vertica driver. im not into the coffee script but this is so useful even i domnt hold it against them | |
var vertica = require('vertica'); | |
var stream = through(); | |
// | |
// pipe some bar delimited rows of data to your stream. | |
// until you call stream.end() the data will not commit. | |
// because you can use logical streams rather than "real" streams.. | |
// .. you can break a job up simply by ending the stream and starting another copy command .. |
This file contains 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
make: Leaving directory `/usr/local/lib/node_modules/qrcode/node_modules/canvas/build' | |
/usr/local/bin/qrcode -> /usr/local/lib/node_modules/qrcode/bin/qrcode | |
npm WARN package.json [email protected] 'contributers' should probably be 'contributors' | |
npm ERR! peerinvalid The package flatiron does not satisfy its siblings' peerDependencies requirements! | |
npm ERR! peerinvalid Peer [email protected] wants flatiron@~0.1.9 | |
npm ERR! peerinvalid Peer [email protected] wants flatiron@~0.1.9 | |
npm ERR! System Linux 3.2.0-23-generic | |
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "qrcode" | |
npm ERR! cwd /usr/local/lib/node_modules |
This file contains 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
function pr () { | |
local repo=`git remote -v | grep -m 1 "(push)" | sed -e "s/.*github.com[:/]\(.*\)\.git.*/\1/"` | |
local branch=`git name-rev --name-only HEAD` | |
if [ "$1" != "" ]; then | |
local branch=$1 | |
fi | |
echo "... creating pull request for branch \"$branch\" in \"$repo\"" | |
xdg-open https://github.com/$repo/pull/new/$branch | |
} |