A line chart with mouseover so that you can read the y-value based on the closest x-value. The x-value is found using d3.mouse and scale.invert. The y-value is then found by bisecting the 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
var redis = require('redis'); | |
var client = redis.createClient(); | |
var pullNotifications = function() { | |
// if notification in list rpop it else block until one is available; timeout=0; | |
client.brpop('_bitcoin_notifications_', '_bitcoin_notifications_', 0, function(e, data) { | |
if(!data.length) return; | |
data = JSON.parse(data[1]); | |
switch(data.type) { |
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
# download libpng 1.4.x (1.5 didn't work yet with GraphicsMagick 1.3.12) | |
./configure --prefix=$HOME/INST && make && make install | |
# download libjpeg | |
./configure --prefix=$HOME/INST && make && make install | |
# download GraphicsMagick | |
CFLAGS=-I$HOME/INST/include LDFLAGS=-L$HOME/INST/lib ./configure --prefix=$HOME/INST --disable-openmp --disable-openmp-slow && make && make install |
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 node | |
/** | |
* dependencies: | |
* clientjade (sudo npm install -g clientjade) | |
* chokidar (sudo npm install chokidar) | |
* how to run: | |
* node watch_jade.js | |
* to render template, just call: | |
* jade.render(domNode, templateName, 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
var fs = require('fs'); | |
function removeSockFile(file) { | |
if(fs.existsSync(__dirname+"/tmp/"+file)) { | |
fs.unlinkSync(__dirname+"/tmp/"+file); | |
} | |
} | |
removeSockFile('app.sock'); | |
removeSockFile('main.sock'); |
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 http = require('http'); | |
var cp = require('child_process'); | |
var httpProxy = require('http-proxy'); | |
var sentinelChild = cp.spawn('node', ['app.js'], {stdio: 'inherit'}); | |
var agentChild = cp.spawn('node', ['agent/agent.js'], {stdio: 'inherit'}); | |
var agent = new httpProxy.HttpProxy({ | |
target: { | |
host: 'localhost', |
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
➜ team-unknown git:(master) jitsu deploy | |
info: Welcome to Nodejitsu nko3-team-unknown | |
info: jitsu v0.11.3, node v0.8.14 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Analyzing application dependencies in node server.js | |
info: Creating snapshot 0.0.4 | |
info Uploading: [=============================] 100% | |
error: Error running command deploy | |
error: Nodejitsu Error (500): Internal Server Error |
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
/Users/shripadk/NKO/team-unknown/node_modules/redis/index.js:726 | |
throw new Error("Connection in pub/sub mode, only pub/sub commands may | |
^ | |
Error: Connection in pub/sub mode, only pub/sub commands may be used | |
at RedisClient.send_command (/Users/shripadk/NKO/team-unknown/node_modules/redis/index.js:726:15) | |
at RedisClient.commands.forEach.RedisClient.(anonymous function) (/Users/shripadk/NKO/team-unknown/node_modules/redis/index.js:872:25) | |
at Timer.<anonymous> (/Users/shripadk/NKO/team-unknown/app.js:40:28) | |
at Timer.exports.setInterval.timer.ontimeout (timers.js:234:14) |
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
/Users/shripadk/NKO/team-unknown/node_modules/redis/index.js:504 | |
throw callback_err; | |
^ | |
Error: Auth error: ERR timeout | |
at Command.RedisClient.do_auth.self.send_anyway [as callback] (/Users/shripadk/NKO/team-unknown/node_modules/redis/index.js:171:43) | |
at RedisClient.return_error (/Users/shripadk/NKO/team-unknown/node_modules/redis/index.js:500:25) | |
at ReplyParser.RedisClient.init_parser (/Users/shripadk/NKO/team-unknown/node_modules/redis/index.js:260:14) | |
at ReplyParser.EventEmitter.emit (events.js:96:17) | |
at ReplyParser.send_error (/Users/shripadk/NKO/team-unknown/node_modules/redis/lib/parser/javascript.js:293:10) | |
at ReplyParser.execute (/Users/shripadk/NKO/team-unknown/node_modules/redis/lib/parser/javascript.js:176:22) |
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
➜ team-unknown git:(master) ✗ jitsu databases create redis sentineldb | |
info: Welcome to Nodejitsu nko3-team-unknown | |
info: jitsu v0.10.5, node v0.8.14 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command databases create redis sentineldb | |
info: A new redis has been created | |
/Users/shripadk/node/lib/node_modules/jitsu/lib/jitsu/commands/databases.js:320 | |
server = database.metadata.label.split('-')[0] + '.redistogo.com'; | |
^ |