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
| Resources | |
| --------- | |
| http://www.boogiejack.com/hosting/what-is-shared-hosting.html | |
| http://www.mybestratedwebhosting.com/tips/cloud-hosting-vs-shared-hosting.html [ Good ] | |
| http://www.smallcloudbuilder.com/hosting/articles/395-cloud-vs-shared-hosting-whats-the-difference | |
| http://www.brilliantthinking.net/2009/10/16/cloud-vs-traditional-hosting/ | |
| Ruby on Rails hosting options |
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 formatted_website_value(url) | |
| if url.blank? | |
| "http://" | |
| else | |
| url | |
| end | |
| end | |
| def formatted_website_link(url) |
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
| * obj.created_at.strftime("%I:%M %p") | |
| # Output: | |
| # 12:53 PM | |
| # 03:53 AM | |
| e.start.strftime("%B %d, %Y") | |
| #Output | |
| "October 29, 2011" |
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
| Mailman v0.4.0 started | |
| POP3 receiver enabled ([email protected]@pop.gmail.com). | |
| Polling enabled. Checking every 60 seconds. | |
| /home/prashant/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/pop.rb:979:in `check_response': * OK Gimap ready for requests from 122.177.151.250 g5if4077877pbt.39 (Net::POPError) | |
| from /home/prashant/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/pop.rb:872:in `initialize' | |
| from /home/prashant/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/pop.rb:551:in `new' | |
| from /home/prashant/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/pop.rb:551:in `do_start' | |
| from /home/prashant/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/pop.rb:528:in `start' | |
| from /home/prashant/.rvm/gems/ruby-1.9.2-p290@opso/bundler/gems/mailman-70382c3c32bd/lib/mailman/receiver/pop3.rb:29:in `connect' | |
| from /home/prashant/.rvm/gems/ruby-1.9.2-p290@opso/bundler/gems/mailman-70382c3c32bd/lib/mailman/application.rb:57:in `block in run' |
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
| https://github.com/alphagov |
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
| /*! | |
| * jQuery TextChange Plugin | |
| * http://www.zurb.com/playground/jquery-text-change-custom-event | |
| * | |
| * Copyright 2010, ZURB | |
| * Released under the MIT License | |
| */ | |
| (function ($) { | |
| $.event.special.textchange = { |
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 ActionDispatch::Routing::Mapper | |
| def draw(routes_name) | |
| instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
| end | |
| end | |
| BCX::Application.routes.draw do | |
| draw :api | |
| draw :account | |
| draw :session |
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
| Animals.each do |letter, results| | |
| 10.times do | |
| doc = Nokogiri::HTML(open("http://www.ocar.org/page.php?tut=realtor-affiliate-search-results&tid=802&pid=8&first_or_last_name=#{letter}&city=&office=&btc=&op=find_a_realtor&ftut=find-a-realtor&start=#{results_per_page}")) | |
| realtors = {} | |
| ('a'..'z').each do |n| | |
| realtors[n] = Realtor.create | |
| end | |
| doc.css('div.search_results_item').each do |number| | |
| phone_number = /\(\d{3}\)\s\d{3}-\d{4}/.match("#{number.content}") | |
| ('a'..'z').each do |n| |
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 'spec_helper' | |
| feature "Editing tickets" do | |
| let!(:project) { Factory(:project) } | |
| let!(:ticket) { Factory(:ticket, :project => project) } | |
| before do | |
| visit '/' | |
| click_link project.name | |
| click_link ticket.title |
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
| namespace :deploy do | |
| desc "Hot-reload God configuration for the Resque worker" | |
| task :reload_god_config do | |
| sudo "god stop resque" | |
| sudo "god load #{File.join(deploy_to, 'current', 'config', 'resque-' + rails_env + '.god')}" | |
| sudo "god start resque" | |
| end | |
| end | |
| # append to the bottom: |