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 Foo | |
def fail | |
raise "I Can't Code" | |
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
PROs in the Community - Cris | |
Delete Orphaned Symptoms/Tx/Purposes - Jeffrey | |
Sort Forum by Topic Creation - James | |
Track CPTs by Condition - Jeffrey | |
Link Treatments to Condition - Ben & Keenan | |
Flash Doctor Visit Sheet - Doug | |
Condition Admin Improvements - Keenan | |
Community Engagement Reminders - Michael | |
CDN - Winfield | |
Instant Mood Everywhere - Amy |
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
revision_file = Rails.root.join('REVISION') | |
if File.exist?(revision_file) | |
revision = File.read(revision_file).match /[a-f,0-9]{6}$/ | |
end | |
config.cache_store = :mem_cache_store, memcache_host, { | |
:namespace => "volatile-#{ revision ? revision[0] : '0'}" | |
} | |
config.action_controller.cache_store = :mem_cache_store, memcache_host, { | |
:namespace => 'stable' | |
} |
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
# Filename: RAILS_ROOT/config/initializers/paperclip_thumbnail_with_dimensions.rb | |
# Required Configuration in the model | |
# | |
# include Paperclip::Dimensions | |
# | |
# has_attached_file :image, | |
# :styles => { | |
# :thumbnail => { | |
# :geometry => "100x100>", | |
# :format => :png |
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
Condition primary-ness should be enforced at the model level - Michael | |
Find closed clinical trials - Keenan | |
Improving results on who is eligible link from CTA show page - Jeffrey | |
Show misdiagnoses in a separate way from resolved conditions - Mav | |
Human readable database - Michael | |
Allow different lab intervals for different conditions - Brett | |
Blood pressure + FVC should be listed under labs and tests in condition admin tool - Brett | |
Allow non-members to sign up for newsletters - Chris B. | |
Improvements to admin redirector tool - Joe | |
Style changes to reminder emails - Cris |
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
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/ | |
1.) Open any application | |
2.) Press and hold the power button until the slide to shutdown swipe bar appears. | |
3.) Release Power button | |
4.) Press and hold Home button Lightly | |
until screen returns to icon screen |
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
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/data/server/shared/bundle/ruby/1.9.1/bin:/Users/web-user/.rvm/gems/ruby-1.9.2-p180@katama_server/bin:/Users/web-user/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/web-user/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/web-user/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:$PATH" | |
builtin-productPackagingUtility /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/Entitlements.plist -entitlements -format xml -o /var/folders/bd/hk27x3wj4jq5sl__cq4c_1lc0000gv/T/50532bbe8bd94b0215002e49/1348682935/IOS/build/IOSContainer.build/Release-iphoneos/IOSContainerRelease.build/test.xcent | |
CodeSign build/Release-iphoneos/test.app | |
cd /var/folders/bd/hk27x3wj4jq5sl__cq4c_1lc0000gv/T/50532bbe8bd94b0215002e49/1348682935/IOS |
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
# For Debian Squeeze | |
# Part 1: Make a deb package of ruby: | |
# Get our deps | |
sudo apt-get update | |
sudo apt-get install -y python-setuptools python-dev build-essential dpkg-dev libopenssl-ruby ruby1.8-dev rubygems bison autoconf zlib1g zlib1g-dev libreadline6 libreadline6-dev libssl0.9.8 libssl-dev libyaml-dev | |
# Get ruby | |
curl -O http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz | |
tar -zxvf ruby-1.9.3-p327.tar.gz |
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 CoercedValueValidator < ActiveModel::Validator | |
def validate(record) | |
coercible_attrs = record.keys.select { |k,v| [Integer, Float, Date, Time].include?(v.type) }.map(&:first) | |
coercible_attrs.each do |attr| | |
record.errors.add(attr, 'is invalid') if record.send("#{attr}_before_type_cast").present? && record.send(attr).nil? | |
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
namespace :git do | |
desc "Prune remote git cached copy (fixes errors with deleted branches)" | |
task :prune do | |
repository_cache = File.join(shared_path, 'cached-copy') | |
logger.info "Pruning origin in remote cached-copy..." | |
run "cd #{repository_cache}; git remote prune origin" | |
end | |
desc "Clear Capistrano Git cached-copy" | |
task :clear_cache do |