sudo apt-get install nginx
require 'fileutils' | |
start_time = Time.now | |
SOURCE_DB = { | |
:name => 'db_name', | |
:user => 'db_user', | |
:password => 'db_pass', | |
:host => 'localhost' |
module Base62 | |
SIXTYTWO = ('0'..'9').to_a + ('a'..'z').to_a + ('A'..'Z').to_a | |
def encode( numeric ) | |
raise ArgumentError unless Numeric === numeric | |
return '0' if numeric == 0 | |
s = '' | |
while numeric > 0 | |
s << Base62::SIXTYTWO[numeric.modulo(62)] | |
numeric /= 62 |
# May not be the best approach | |
# Issues with Proxies limititing headers | |
# Headers could be cached | |
# Not sure of having JSON | |
class ApplicationController < ActionController::Base | |
after_filter :flash_to_headers | |
def flash_to_headers |
CONFIG = HashWithIndifferentAccess.new(YAML::load(ERB.new(IO.read(File.join(Rails.root, 'config', 'config.yml'))).result)[Rails.env]) |
- Introduction To Programming ** Code Academy
- Introduction to Ruby ** Try Ruby - http://tryruby.org ** Why's Guide ** Ruby in 20 Minutes - http://www.ruby-lang.org/en/documentation/quickstart/
- Meet Rails 3 ** Part 1 (Video) - http://peepcode.com/products/meet-rails-3-i ** Part 2 (Video) - https://peepcode.com/products/meet-rails-3-ii
Beard fixie carles, letterpress thundercats yr aesthetic organic locavore. Craft beer tofu scenester shoreditch before they sold out. Trust fund viral helvetica organic brooklyn. Iphone mcsweeney's banh mi, salvia freegan vice tattooed organic cred whatever art party retro etsy fixie vegan. Photo booth 3 wolf moon dreamcatcher cred hoodie butcher. Brunch mcsweeney's beard helvetica, brooklyn viral put a bird on it 3 wolf moon you probably haven't heard of them whatever fanny pack VHS gluten-free. Cosby sweater irony +1 photo booth synth tumblr you probably haven't heard of them 3 wolf moon.
+1 leggings put a bird on it, stumptown portland brunch master cleanse mixtape brooklyn artisan VHS. Before they sold out skateboard banh mi viral american apparel keytar cliche. Art party chambray single-origin coffee cardigan carles. Marfa 3 wolf moon wolf, biodiesel Austin farm-to-table master cleanse freegan cardigan you probably haven't h
source 'http://rubygems.org' | |
gem 'rails', '3.1.1' | |
gem 'jquery-rails' | |
gem 'sqlite3' | |
gem 'pg' | |
gem 'ejs' | |
gem 'devise' | |
gem 'paperclip' |
#!/bin/sh | |
curl -L https://github.com/downloads/jezdez/textmate-missingdrawer/MissingDrawer-0.4.0.tmplugin.zip | tar -xf - && open MissingDrawer.tmplugin |
#!/bin/sh | |
# Install EGO TextMateFullScreen Plugin for TextMate | |
# Usage : bash <(curl -s https://raw.github.com/gist/1147847/2a312eb2ebf91c3eb04cc15328dc5fa1f064b199/text-mate-full-screen.sh) | |
git clone https://github.com/enormego/EGOTextMateFullScreen.git /tmp/EGOTextMateFullScreen | |
/usr/bin/xcodebuild -project /tmp/EGOTextMateFullScreen/EGOTextMateFullScreen.xcodeproj -target EGOTextMateFullScreen | |
open /tmp/EGOTextMateFullScreen/build/Release/EGOTextMateFullScreen.tmplugin |