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
# How we store all time views across the entire system for http://gauge.es. | |
# All in one document that gets incremented using MongoDB $inc modifier in | |
# every track. The $inc increments t, year.t, year.month.t, year.month.day.t | |
# so we get to the day numbers. These are in EST, as we are in EST and these | |
# stats are just for us. :) Nothing amazing, but thought I would share. | |
# | |
# >> pp View.all_time | |
{ | |
"_id" => "all_time", | |
"t" => 502352, |
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
require "stateful" | |
class Folder < ActiveRecord::Base | |
include Stateful | |
# ... | |
stateful do | |
state :active | |
state :inactive |
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
log_level :info | |
log_location STDOUT | |
node_name 'solo' | |
client_key File.expand_path('../solo.pem', __FILE__) | |
cache_type 'BasicFile' | |
cache_options( :path => File.expand_path('../checksums', __FILE__)) | |
cookbook_path [ File.expand_path('../../cookbooks', __FILE__) ] |