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
| # Get EPEL set up | |
| rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
| # Instal Dev Tools | |
| yum -y groupinstall 'Development Tools' | |
| # Install Git | |
| yum -y install git | |
| # Install Node |
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
| after "deploy:symlink", "deploy:restart_workers" | |
| ## | |
| # Rake helper task. | |
| # http://pastie.org/255489 | |
| # http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
| # http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
| def run_remote_rake(rake_cmd) | |
| rake_args = ENV['RAKE_ARGS'].to_s.split(',') | |
| cmd = "cd #{fetch(:latest_release)} && #{fetch(:rake, "rake")} RAILS_ENV=#{fetch(:rails_env, "production")} #{rake_cmd}" |
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
| Handlebars.registerHelper 'simple_format', (text) -> | |
| carriage_returns = /\r\n?/g | |
| paragraphs = /\n\n+/g | |
| newline = /([^\n]\n)(?=[^\n])/g | |
| text = text.replace(carriage_returns, "\n") # \r\n and \r -> \n | |
| text = text.replace(paragraphs, "</p>\n\n<p>") # 2+ newline -> paragraph | |
| text = text.replace(newline, "$1<br/>") # 1 newline -> br | |
| text = "<p>" + text + "</p>"; |
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 icon(name, options = {}) | |
| # icon("camera-retro") | |
| # <i class="icon-camera-retro"></i> | |
| # | |
| # icon('cogs', :class => 'large nav-item', :size => 1.5) | |
| # <i class='icon-cogs large nav-item', style='font-size:1.5em'></i> | |
| classes = ['icon-'+name] | |
| classes << options[:class].split(' ') if options[:class].present? | |
| classes = classes.flatten.join(' ') |
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
| # -o = Output Directory | |
| # -c = Compile | |
| coffee -w -o public/javascripts -c app/assets/coffeescripts |