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
#!/bin/bash | |
for i in {1..5}; do | |
"$@" && exit 0 | |
sleep 1 | |
done |
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 JSONStream = require('JSONStream'); | |
// server ... | |
var stringify = JSONStream.stringify(); | |
stringify.pipe(stream); | |
terminal.on('stdout', function(id, dock, data) { | |
stringify.write({ | |
id: id, | |
dock: dock, | |
data: data.toString() |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Net.Sockets; | |
namespace RedisPublisher | |
{ | |
class Publisher | |
{ |
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
TAP version 13 | |
# setup | |
# clone from hyperlevel server | |
ok 1 no open err | |
npm http GET https://registry.npmjs.org/leveldown-hyper | |
npm http 200 https://registry.npmjs.org/leveldown-hyper | |
npm http GET https://registry.npmjs.org/leveldown-hyper/-/leveldown-hyper-0.10.1.tgz | |
npm http 200 https://registry.npmjs.org/leveldown-hyper/-/leveldown-hyper-0.10.1.tgz | |
npm http GET https://registry.npmjs.org/bindings | |
npm http GET https://registry.npmjs.org/nan |
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 fbackup = require('folder-backup') | |
var request = require('request') | |
module.exports = function(dat, remote, cb) { | |
copyMeta(dat, remote, function(err, backend) { | |
if (err) return cb(err, err.message) | |
if (backend === 'leveldown-hyper') hyperClone(dat, remote, cb) | |
else normalClone(dat, remote, cb) | |
}) | |
} |
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
/** @jsx React.DOM */ | |
var React = require('react') | |
var lex = require('lexicographic-integer') | |
module.exports = React.createClass({ displayName: 'SearchPopup', | |
propTypes: { | |
// onSelect: React.PropTypes.func.isRequired, | |
// items: React.PropTypes.arrayOf( | |
// React.PropTypes.shape({ | |
// columns: React.PropTypes.arrayOf(React.PropTypes.string).isRequired, |
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 nothing | |
setInterval(function() { | |
// just to keep the program going | |
}, 1000) |
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
// run this: node test-no-stdin.js | cat - | |
var buf = new Buffer(512); | |
var cnt = 0; | |
buf.fill(97); | |
setInterval(function() { | |
console.log(buf.toString()+' #'+(cnt++)); | |
}, 5); |
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 proc = require('child_process'); | |
if (process.argv[2] === 'test') { | |
var stdin = process.stdin; // this line breaks things | |
var buf = new Buffer(512); | |
var cnt = 0; | |
buf.fill(97); |
OlderNewer