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
| sdfsadf |
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
| map.resources :divisions do |division| | |
| division.resources :wss_configs | |
| division.resources :websites | |
| division.resources :urls | |
| division.resources :announcements | |
| division.resources :attachments | |
| division.resources :scenes | |
| end | |
| map.resources :articles, :has_many => [:comments], do |article| |
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
| class Show | |
| has_many :scenes | |
| end | |
| class Scene | |
| has_one :scenable :as => :scenable | |
| end | |
| class Announcement | |
| belongs_to :scenable, :polymorphic => true |
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
| require 'rubygems' | |
| require 'open-uri' | |
| require 'hpricot' | |
| doc = Hpricot(open("http://en.oreilly.com/rails2009/public/schedule/topic/General")) | |
| doc.search('.url').each do |session| | |
| session_link = "http://en.oreilly.com#{session[:href]}" | |
| session_page = Hpricot(open(session_link)) | |
| begin | |
| title = session_page.at('.summary').inner_html | |
| rating = session_page.at('.en_grade_average_detail').inner_html |
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
| #TO RUN | |
| # Install ruby | |
| # from command line type gem install sinatra haml | |
| # create this file and call it app.rb | |
| # from command line type ruby app.rb | |
| # open up browser to http://localhost:4567/haml | |
| require 'rubygems' | |
| require 'sinatra' | |
| require 'haml' |
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
| require 'rubygems' | |
| require 'active_record' | |
| require 'spec' | |
| ActiveRecord::Base.establish_connection( { | |
| :adapter => 'mysql', | |
| :host => 'localhost', | |
| :database => 'testbed', | |
| :username => 'root', | |
| :password => '' |
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
| india:mymckinsey mdeiters$ rake deadweight | |
| (in /Users/mdeiters/development/mckinsey/mymckinsey) | |
| /stylesheets/application.css | |
| /stylesheets/facebox.css | |
| /stylesheets/IE6.css | |
| /stylesheets/IE7.css | |
| / | |
| /networks | |
| /profiles/14714-sean-brown | |
| /profiles/14714-sean-brown/friendships |
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
| india:mymckinsey mdeiters$ rake deadweight | |
| (in /Users/mdeiters/development/mckinsey/mymckinsey) | |
| /stylesheets/application.css | |
| /stylesheets/facebox.css | |
| /stylesheets/IE6.css | |
| /stylesheets/IE7.css | |
| / | |
| /networks | |
| /profiles/14714-sean-brown | |
| /profiles/14714-sean-brown/friendships |
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
| map.resource :people |
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 Capistrano | |
| class SSH | |
| class << self | |
| alias :original_connect :connect | |
| def connect(server, options={}, &block) | |
| special_server_settings = options[:server_authentication] ? options[:server_authentication][server.to_s] : nil | |
| if special_server_settings.nil? | |
| return original_connect(server, options, &block) | |
| else | |
| methods = [ %w(publickey hostbased), %w(password keyboard-interactive) ] |
OlderNewer