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
git clone http://github.com/bnoguchi/redis/tree/sort_get_hash_all_keys | |
cd redis | |
make | |
sudo make install | |
make test | |
sudo redis-server | |
git clone http://github.com/bnoguchi/redis-rb/tree/sort_get_hash_all_keys | |
cd redis | |
ruby sample.rb |
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
diff --git a/bin/nodeprofile b/bin/nodeprofile | |
index 608872f..9f4cba1 100755 | |
--- a/bin/nodeprofile | |
+++ b/bin/nodeprofile | |
@@ -11,29 +11,34 @@ var command = 'node --prof --log-snapshot-positions --logfile='+logName+' '+proc | |
console.log('Running: '+command); | |
-exec(command, function (error, stdout, stderr) { | |
- exec('locate linux-tick-processor.py', function(err, stdout, stderr) { |
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
File "~/sources/github/node/deps/v8/tools/linux-tick-processor.py", line 78, in <module> | |
Main() | |
File "~/sources/github/node/deps/v8/tools/linux-tick-processor.py", line 73, in Main | |
cmdline_processor.RunLogfileProcessing(tick_processor) | |
File "~/sources/github/node/deps/v8/tools/tickprocessor.py", line 567, in RunLogfileProcessing | |
self.separate_ic, self.call_graph_json) | |
File "~/sources/github/node/deps/v8/tools/tickprocessor.py", line 216, in ProcessLogfile | |
for row in logreader: | |
_csv.Error: newline inside string |
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 sys = require("sys"); | |
var HashRing = require("../lib/hash_ring"); | |
var nodes = { | |
"127.0.0.1:8080": 1, | |
"127.0.0.2:8080": 1, | |
"127.0.0.3:8080": 1 | |
}; |
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 givens = {}; | |
var Given = function (pattern, topicGenerator) { | |
givens[pattern] = topicGenerator; | |
}; | |
var whens = {}; | |
var When = function (pattern, topicGenerator) { | |
whens[pattern] = topicGenerator; | |
}; |
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 ejs = require('ejs') | |
, app = require('express').createServer(); | |
app.set('view engine', 'ejs'); | |
app.get('/', function (req, res) { | |
res.render('index'); // Where index.ejs is your ejs template | |
}); | |
app.listen(3000); |
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 mongoose = require('mongoose') | |
, Schema = mongoose.Schema | |
, assert = require('assert'); | |
var subSchema = new Schema({ | |
name : String , | |
subObj : { subName : String } | |
}); | |
var schema = new Schema ({ name : String , arrData : [ subSchema] }); |
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 mongoose = require('./index') | |
, TempSchema = new mongoose.Schema({ | |
salutation: {type: String, enum: ['Mr.', 'Mrs.', 'Ms.']} | |
}); | |
var Temp = mongoose.model('Temp', TempSchema); | |
console.log(Temp.schema.path('salutation').enumValues); | |
var temp = new Temp(); | |
console.log(temp.schema.path('salutation').enumValues); |
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
// Example works also works if you swap the commented lines into the code, and comment | |
// the corresponding uncommented lines. | |
var mongoose = require('mongoose') | |
, Schema = mongoose.Schema ; | |
mongoose.connect('mongodb://localhost/test'); | |
var Item = new Schema({ | |
cat_id: Number |
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
// This shows that GH-248 is no longer relevant | |
var mongoose = require('mongoose') | |
, Schema = mongoose.Schema ; | |
mongoose.connect('mongodb://localhost/test'); | |
var EmbeddedDocSchema = new Schema({ | |
inner_label: String | |
}); |
OlderNewer