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
def artist_mode? | |
@mode == 'artist' | |
end | |
def label_mode? | |
@mode == 'label' | |
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 AttachmentFile < Asset | |
# === List of columns === | |
# id : integer | |
# data_file_name : string | |
# data_content_type : string | |
# data_file_size : integer | |
# assetable_id : integer | |
# assetable_type : string | |
# type : string |
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
access_key_id: 1XAqwqwZBWQ87PK7qwqwqZ | |
secret_access_key: pXZZ+q1w8V4e2yBewasdaseR1LvesdsdsdssssdcWjKJ |
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 Picture < Asset | |
# === List of columns === | |
# id : integer | |
# data_file_name : string | |
# data_content_type : string | |
# data_file_size : integer | |
# assetable_id : integer | |
# assetable_type : string | |
# type : string |
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
/* Selection of rules to make tiptip work in IE6 */ | |
#tiptip_content { | |
background-color: #000; | |
color: #fff; | |
} | |
#tiptip_arrow { | |
display:none; | |
} |
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
sudo apt-get install ruby ri rdoc ruby1.8-dev libopenssl-ruby1.8 | |
sudo ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby | |
sudo ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdoc | |
sudo ln -s /usr/bin/ri1.8 /usr/local/bin/ri | |
sudo ln -s /usr/bin/irb1.8 /usr/local/bin/irb | |
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz | |
tar xvzf rubygems-1.3.5.tgz | |
cd rubygems-1.3.5 | |
sudo ruby setup.rb | |
sudo ln -s /usr/bin/gem1.8 /usr/local/bin/gem |
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 MobileConstraint | |
def initialize | |
@mobiles = UserAgents.retrieve | |
end | |
def matches?(request) | |
@mobiles.include?(request.user_agent) | |
end | |
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
memcachedb -p21201 -d -r -H /Users/alastairbrunton/dumps/21201 -N -v >/Users/alastairbrunton/dumps/21201.log 2>&1 |
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
# products_controller.rb | |
before_filter :authenticate | |
protected | |
def authenticate | |
authenticate_or_request_with_http_basic do |username, password| | |
username == "foo" && password == "bar" |
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
curl http://github.com/rails/rails/commit/268c9040d5c3c7ed30f3923eee71a78eeece8a8a.diff | sudo patch -d /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails |