# change mirror to ubuntu.osuosl.org first
sudo apt-get update
sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev
class ActiveRecord::Base | |
# Totals the virtual attributes of a collection | |
def self.vsum collection, v_attr | |
total = 0 | |
collection.each { |collect| total += collect.method(v_attr.to_s).call } | |
return total | |
end | |
# Avarages the virtual attributes of a collection |
# schedule.rb | |
set :output, "/path/to/log/cron.log" | |
# Requires that your production server is set to UTC time | |
# Subclass Time and override self.parse to adjust for timezone offset | |
class TimeInZone < Time | |
def initialize | |
super | |
end |
find . -name \*.slim -type f -exec cat {} + | sed '/^\s*#/d;/^\s*$/d' | wc -l |
defaults write NSGlobalDomain KeyRepeat -int 1 | |
defaults write NSGlobalDomain InitialKeyRepeat -int 10 |