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
command = { | |
'group' : { //mongodb group command | |
'ns' : 'pings', //the collection to query | |
'cond' : {'active.end' : { $gt: new Date() }}, //active.end must be in the future | |
'initial': {'count': 0}, //initialize any count object properties | |
'$reduce' : 'function(doc, out){ out.count++ }', | |
'key' : {'url': 1} //fields to group by | |
} | |
} | |
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
# 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL | |
# 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew | |
# https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers | |
# 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it | |
gem install bundler | |
# 1. Get edge Rails source (master branch) | |
git clone https://github.com/rails/rails.git |