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
[branch "master"] | |
remote = origin | |
merge = refs/heads/master | |
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
function gc { | |
if [ -z "$1" ]; then | |
git checkout master | |
else | |
git checkout $1 | |
fi | |
} |
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
task :fix_updated_at => :environment do | |
desc 'fix updated_at dates on requests' | |
Request.record_timestamps = false | |
Request.all.each do |r| | |
r.update_attribute(:updated_at, r.calculated_updated_at) | |
end | |
end |
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
gem 'ruby_parser' | |
gem 'hpricot' | |
gem 'haml' |
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
class AddFieldToUser < ActiveRecord::Migration | |
def self.up | |
ActiveRecord::Base.establish_connection "user_#{Rails.env}" | |
add_column :users, :field, :type | |
end | |
... | |
end |
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
namespace :myapp do | |
task :reset_passwords => :environment do | |
desc 'set all passwords to Test1234 to login locally' | |
exit(1) unless Rails.env.development? | |
User.all.each do |user| | |
user.password = user.password_confirmation = "Test1234" | |
user.save | |
end | |
end | |
end |
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
# From http://opinionated-programmer.com/2011/02/profiling-spork-for-faster-start-up-time/ | |
Spork.prefork do | |
# ... your normal prefork block goes here ... | |
module Kernel | |
def require_with_trace(*args) | |
start = Time.now.to_f | |
@indent ||= 0 |
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
RCfile for "top with windows" # shameless braggin' | |
Id:a, Mode_altscr=0, Mode_irixps=1, Delay_time=3.000, Curwin=0 | |
Def fieldscur=AEHIOQTWKNMbcdfgjplrsuvyzX | |
winflags=64440, sortindx=10, maxtasks=0 | |
summclr=1, msgsclr=1, headclr=3, taskclr=1 | |
Job fieldscur=ABcefgjlrstuvyzMKNHIWOPQDX | |
winflags=62777, sortindx=0, maxtasks=0 | |
summclr=6, msgsclr=6, headclr=7, taskclr=6 | |
Mem fieldscur=ANOPQRSTUVbcdefgjlmyzWHIKX | |
winflags=62777, sortindx=13, maxtasks=0 |
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
LSCOLORS='gxfxcxdxbxegedabagacad' | |
export LSCOLORS | |
alias ls='ls -hGF' # --color=auto not valid on OS X | |
alias ll='ls -alhGF' # --color=auto not valid on OS X | |
alias flushdns='dscacheutil -flushcache' | |
# git |
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
$$('tbody .btn-disabled') | |
.each(function(element, index) { | |
element.up('tbody').hide() | |
}); |
OlderNewer