ssh -C2qTnN -D 8080 gsm
This file contains hidden or 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
defaults write NSGlobalDomain KeyRepeat -int 1 | |
defaults write NSGlobalDomain InitialKeyRepeat -int 10 |
This file contains hidden or 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
find . -name \*.slim -type f -exec cat {} + | sed '/^\s*#/d;/^\s*$/d' | wc -l |
This file contains hidden or 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
# 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 |
This file contains hidden or 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
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 |