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
var bixiToronto = [{name:"Jarvis St",lat:"43.662070",long:"-79.376170",nbBikes:"3",nbEmptyDocks:"9"}, | |
{name:"Granby St / Church St",lat:"43.661563",long:"-79.378832",nbBikes:"1",nbEmptyDocks:"5"}, | |
{name:"Mutual St / Gould St",lat:"43.659040",long:"-79.376532",nbBikes:"17",nbEmptyDocks:"11"}, | |
{name:"St George St / Bloor St W",lat:"43.667333",long:"-79.399429",nbBikes:"3",nbEmptyDocks:"11"}, | |
{name:"Madison Ave / Bloor St W",lat:"43.667158",long:"-79.402761",nbBikes:"6",nbEmptyDocks:"9"}, | |
{name:"King St W / Spadina Ave",lat:"43.645323",long:"-79.395003",nbBikes:"14",nbEmptyDocks:"4"}, | |
{name:"Elizabeth St / Edward St",lat:"43.656152",long:"-79.385225",nbBikes:"13",nbEmptyDocks:"2"}, | |
{name:"Scott St / The Esplanade",lat:"43.646669",long:"-79.375152",nbBikes:"5",nbEmptyDocks:"14"}, | |
{name:"Ferry Ramp / Queens Quay W",lat:"43.640823",long:"-79.376265",nbBikes:"18",nbEmptyDocks:"2"}, | |
{name:"Temperance St / Yonge St",lat:"43.650855",long:"-79.379492",nbBikes:"14",nbEmptyDocks:"1"}, |
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
# -o = Output Directory | |
# -c = Compile | |
coffee -w -o public/javascripts -c app/assets/coffeescripts |
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
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 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 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 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 |