This is the haml version. If you want to use the same with erb just change haml to erb.
- Create you partial form example
_form.haml(The underscore at the beginning is really important). - In you
.hamlfile just write= partial("form").
| #!/usr/bin/env ruby | |
| # Usage: gitio URL [CODE] | |
| # | |
| # Turns a github.com URL | |
| # into a git.io URL | |
| # | |
| # Copies the git.io URL to your clipboard. | |
| url = ARGV[0] | |
| code = ARGV[1] |
| require 'rubygems' | |
| require 'oauth' | |
| require 'yaml' | |
| CONSUMER_KEY = '' | |
| CONSUMER_SECRET = '' | |
| def get_access_token | |
| p "get_access_token: Initializing Consumer" | |
| consumer = OAuth::Consumer.new(CONSUMER_KEY, CONSUMER_SECRET, { |
| source 'http://rubygems.org' | |
| gem 'sinatra' | |
| gem 'dm' |
| require 'rubygems' | |
| require 'sinatra' | |
| require 'redis' | |
| # To use, simply start your Redis server and boot this | |
| # example app with: | |
| # ruby example_note_keeping_app.rb | |
| # | |
| # Point your browser to http://localhost:4567 and enjoy! | |
| # |
| function setSeat(e, handler) { | |
| e.preventDefault(); | |
| $('.selected').removeClass('selected').click(handler); | |
| $(e.target).addClass('selected').unbind('click', handler); | |
| $('#seatSelected').text($(e.target).data('seat')); | |
| } | |
| function selectFirstClass(e) { | |
| setSeat(e, selectFirstClass); | |
| var resulting_html = fetchFirstClassConfirm(); |
| #!/bin/bash | |
| BOLD="\033[1m" | |
| _BOLD="\033[22m" | |
| RED="\033[31m" | |
| YELLOW="\033[33m" | |
| GREEN="\033[32m" | |
| RESET="\033[39m" | |
| range=$1 |