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
| # get the name of the branch we are on | |
| function git_prompt_info() { | |
| ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
| branch=${ref#refs/heads/} | |
| if [[ -d .git ]]; then | |
| CURRENT_BRANCH="%{$fg[red]%}git:(%{$fg[green]${branch}$(parse_git_dirty)%{$fg[red])" | |
| else | |
| CURRENT_BRANCH='' | |
| fi |
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
| <div id="x_container"> | |
| <a id="x_back_button"><img src="/images/left-arrow.png" /></a> | |
| <a id="x_forward_button"><img src="/images/right-arrow.png" /></a> | |
| <div class="x_widget"> | |
| <p>content...1</p> | |
| </div> | |
| <div class="x_widget" style="display:none;"> | |
| <p>content...2</p> |
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 :containers do |container| | |
| container.resources :widgets | |
| end | |
| # gives us... | |
| # /containers/:container_id | |
| # /containers/:container_id/widgets/ | |
| # /containers/:container_id/widgets/:id | |
| # but what i really want is... |
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
| Missing these required gems: | |
| feedtools = 0.2.29 | |
| You're running: | |
| ruby 1.8.6.114 at /opt/local/bin/ruby | |
| rubygems 1.3.1 at /Users/robbyrussell/.gem/ruby/1.8, /opt/local/lib/ruby/gems/1.8 | |
| Run `rake gems:install` to install the missing gems. | |
| git:(master): | |
| git:(master): gem list|grep feed |
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
| // ==UserScript== | |
| // @name BetterFavicon | |
| // @namespace planetargon | |
| // @description A better favicon for google | |
| // @include http://*.google.com/ | |
| // ==/UserScript== | |
| var favicon_link_html = document.createElement('link'); | |
| favicon_link_html.rel = 'icon'; | |
| favicon_link_html.href = 'http://robbyonrails.com/files/google-favicon.ico'; |
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
| # | |
| # Inspired by | |
| # http://dev.rubyonrails.org/svn/rails/plugins/account_location/lib/account_location.rb | |
| # | |
| module SubdomainAccounts | |
| def self.included( controller ) | |
| controller.helper_method(:account_domain, :account_subdomain, :account_url, :current_account, :default_account_subdomain, :default_account_url) | |
| end | |
| protected |
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 auto_complete_for_search_query | |
| if params.has_key( :search_query ) and not params[:search_query].blank? | |
| search_query = "%#{params[:search_query]}%" | |
| @cars = Car.find( :all, :conditions => [ 'title LIKE ?', search_query ] ) | |
| render :partial => "search_results" | |
| end | |
| end | |
| def search_query | |
| auto_complete_for_search_query |
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
| <ul class="horizontal main_nav"> | |
| <li <%= 'class="active"' if current_page?( root_path ) -%>><%= link_to_unless_current( 'Plans', root_path, { :title => 'Boxcar Plans' } ) -%></li> | |
| <li <%= 'class="active"' if current_page?( contact_path ) -%>><%= link_to_unless_current( 'Contact Us', contact_path, { :title => 'Contact Us' } ) -%></li> | |
| <li <%= 'class="active"' if current_page?( support_path ) -%>><%= link_to_unless_current( 'Get Support', support_path, { :title => 'Get Support' } ) -%></li> | |
| </ul> |
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
| #!/usr/bin/env ruby | |
| sleep( 28800 ) | |
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
| #!/bin/sh | |
| # | |
| # bash script to run a git-pull... and restart mongrel for you... | |
| # | |
| function mongrel_reload { | |
| mongrel_rails stop; | |
| mongrel_rails start -d; | |
| } | |