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
set-window-option -g mode-keys emacs | |
set-window-option -g window-status-current-bg red | |
set-window-option -g window-status-current-fg white | |
set-window-option -g window-status-current-attr 'bold' | |
set-window-option -g window-status-current-attr 'bold' | |
set-window-option -g window-status-fg black | |
set-window-option -g window-status-bg white | |
set-window-option -g automatic-rename on | |
set-window-option -g utf8 on |
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
module ShouldaContextExtensions | |
def self.included(base) | |
base.class_eval do | |
alias_method_chain :build, :fast_context | |
alias_method_chain :am_subcontext?, :fast_context | |
end | |
end | |
def fast_context(name, &blk) | |
@fast_subcontexts ||= [] |
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
- if RAILS_ENV == "production" | |
%script{ :type => "text/javascript" } | |
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); | |
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); | |
%script{ :type => "text/javascript" } | |
var pageTracker = _gat._getTracker("UA-3794127-4"); | |
pageTracker._trackPageview(); |
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
#!/bin/bash | |
# Inspired by http://blog.fiveruns.com/2008/9/24/rails-automation-at-slicehost | |
yum install -y l gcc-c++ zlib-devel openssl-devel | |
yum install -y mysql-server mysql-devel | |
/etc/init.d/mysqld start | |
yum install -y ruby rdoc ruby-devel | |
RUBYGEMS="rubygems-1.3.1" | |
wget http://rubyforge.org/frs/download.php/45905/$RUBYGEMS.tgz |
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
## Rails development best practices | |
# An #RMM alternative, open and collaborative set of development practices we can adhere to. | |
* Distributed Version Control over relying on the File System | |
* Business Logic in the Models over being spread throughout the MVC layers | |
* RESTful Architecture over overloaded controllers | |
* KISS - Short methods with descriptive names | |
* Tests/Specs covering each layer of MVC and the whole stack | |
* Document the setup procedure (freeze dependancies where possible) |
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 advisor | |
@license = 'LTAM663SPJLO.945CWK-2XOI1X0-7L' | |
advisor = Advisor.find(params[:id]) | |
category = params[:category] | |
case category | |
when 'fixed' | |
chart_years = advisor.fixed_product_years.find_all_by_year(@year_num) | |
when 'combined' | |
chart_years = advisor.categorical_years.find_all_by_year(@year_num) | |
else |
NewerOlder