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
sudo apt-get install python-pip | |
sudo pip install pymongo | |
curl -o 10gen-mms-agent.zip https://mms.10gen.com/settings/10gen-mms-agent.zip | |
sudo apt-get install unzip | |
unzip 10gen-mms-agent.zip | |
cd mms-agent | |
sudo cat > /etc/init/mms.conf << EOF | |
#!upstart | |
description "MongoDB Monitoring Service Agent" |
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
sudo apt-get mailutils | |
cat /var/log/node.log | mail -s 'i can haz logfile plz' [email protected] |
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
module ActiveSupport | |
module PagedScope | |
def self.extended(base) | |
base.scope :paginated, lambda { |page,per_page| | |
page ||= 0 | |
per_page ||= 25 | |
base.limit( per_page.to_i ).offset( per_page.to_i * page.to_i ) | |
} | |
end |