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/perl | |
## REDIS REMOTE CONNECTOR | |
## | |
## Edit these values to reflect the authentication credentials for the | |
## server running the instance with which you wish to | |
## modify the `$remote_port` value. You should not need to modify the | |
## `$remote_ip` value. | |
## |
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
➜ dingdong git:(master) git push origin master | |
Counting objects: 3, done. | |
Delta compression using up to 2 threads. | |
Compressing objects: 100% (1/1), done. | |
Writing objects: 100% (2/2), 230 bytes, done. | |
Total 2 (delta 0), reused 0 (delta 0) | |
Unpacking objects: 100% (2/2), done. | |
remote: Push complete on user: shripadk | |
remote: error : Error: Command failed: fatal: Not a git repository: '.' | |
remote: |
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 | |
var user = process.ENV['USER'], | |
sys = require('sys'), | |
exec = require('child_process').exec; | |
console.log("Push complete on user: " + user); | |
exec('cd .. && git clone testbarerepo pingpong --recursive', function(e, stdout, stderr){ | |
if(stderr) { | |
exec('cd .. && cd pingpong && git pull && git submodule init && git submodule update', function(e, stdout, stderr) { |
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
// [~/Documents/code/node/myapp](master)$ ./bin/node -v | |
// => v0.2.1 | |
// [~/Documents/code/node/myapp](master)$ ./bin/express -v | |
// => 1.0.0rc4 | |
/** | |
* Module dependencies. | |
*/ | |
require.paths.unshift(__dirname + '/lib/node'); |
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
Db = require('mongodb').Db | |
Connection = require('mongodb').Connection | |
Server = require('mongodb').Server | |
EventEmitter = require('events').EventEmitter | |
sys = require('sys') | |
colors = require('colors') | |
host = if process.env['MONGO_NODE_DRIVER_HOST'] then process.env['MONGO_NODE_DRIVER_HOST'] else 'localhost' | |
port = if process.env['MONGO_NODE_DRIVER_PORT'] then process.env['MONGO_NODE_DRIVER_PORT'] else Connection.DEFAULT_PORT | |
db = [] |
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
Db = require('mongodb').Db | |
Connection = require('mongodb').Connection | |
Server = require('mongodb').Server | |
EventEmitter = require('events').EventEmitter | |
sys = require('sys') | |
colors = require('colors') | |
host = if process.env['MONGO_NODE_DRIVER_HOST'] then process.env['MONGO_NODE_DRIVER_HOST'] else 'localhost' | |
port = if process.env['MONGO_NODE_DRIVER_PORT'] then process.env['MONGO_NODE_DRIVER_PORT'] else Connection.DEFAULT_PORT | |
db = [] |
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
{"message":"Cannot provision server from empty free pool.","stack":"Error: Cannot provision server from empty free pool.\n at [object Object].provisionServer (/root/nodejitsu/vendor/broodmother/lib/broodmother/master/simple-provisioner.js:46:15)\n at notifySlaves (/root/nodejitsu/vendor/broodmother/lib/broodmother/master/master.js:612:28)\n at /root/nodejitsu/vendor/broodmother/lib/broodmother/master/master.js:652:7\n at /root/nodejitsu/vendor/broodmother/lib/broodmother/master/master.js:567:7\n at Object.callback (/root/nodejitsu/vendor/broodmother/vendor/resourcer/lib/resourcer/resource.js:76:13)\n at /usr/local/lib/node/.npm/cradle/0.2.3/package/lib/cradle.js:242:26\n at IncomingMessage. (/usr/local/lib/node/.npm/cradle/0.2.3/package/lib/cradle.js:181:53)\n at IncomingMessage.emit (events.js:41:20)\n at HTTPParser.onMessageComplete (http.js:112:23)\n at Client.onData [as ondata] (http.js:889:27)"} |
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
checkElement = (element) -> | |
if typeof element is 'object' | |
return element | |
else | |
return $(element) | |
class TwistedGrid | |
constructor: (grid, records) -> | |
@grid = checkElement(grid) | |
@records = records |
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
# Redis configuration file example | |
# Note on units: when memory size is needed, it is possible to specifiy | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# | |
# 1k => 1000 bytes | |
# 1kb => 1024 bytes | |
# 1m => 1000000 bytes | |
# 1mb => 1024*1024 bytes | |
# 1g => 1000000000 bytes |
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
NodeQ = require "#{__dirname}/../lib/NodeQ" | |
queueAworker = new NodeQ("queueA") | |
secondsFromNow = (secs) -> | |
Math.round(Date.now() + (secs * 1000)) | |
minutesFromNow = (minutes) -> | |
Math.round(Date.now() + (minutes * 60 * 1000)) | |
hoursFromNow = (hours) -> | |
Math.round(Date.now() + (hours * 60 * 60 * 1000)) | |
daysFromNow = (days) -> |