This file contains 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 SaveYourselfFromPalin | |
// @namespace http://www.youtube.com/ | |
// @description saves you from the emotion that you feel after seeing another sarah palin clip | |
// @include http://www.youtube.com/* | |
// ==/UserScript== | |
var sarah = /(palin)/; | |
function pitbull_exists(lipstick) { |
This file contains 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
soap4r stuff | |
# before (this didn't really seem to work...) | |
soap.options["receive_timeout"] = 300 | |
soap.options["connect_timeout"] = 300 | |
# found examples with this online... | |
soap.options["protocol.http.connect_timeout"] = 300 |
This file contains 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
// line 1, requires an array of arrays (x,y) | |
var line_1 = [ [2000, 10000], | |
[2001, 13000], | |
[2002, 11245], | |
[2003, 11094], | |
[2003.4, 14392], // example with a dcimal in between a tick | |
[2004, 11000], | |
[2005, 10040], | |
[2006, 13590], |
This file contains 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 SkitchEmbedder | |
// @namespace skitch | |
// @description Robby Russell's hack to remove skitch crap from the embed HTML | |
// @include http://skitch.com/* | |
// ==/UserScript== | |
// clear out the sidebar | |
sidebar = document.getElementById( 'selectcopycontainer_3_div' ); | |
sidebar.innerHTML = ''; |
This file contains 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 Basecamp Favicons | |
// @namespace http://robbyonrails.com/greasemonkey | |
// @description Adds a favicon to Basecamp | |
// @include http://*.projectpath.com/* | |
// @include http://*.updatelog.com/* | |
// @include http://*.clientsection.com/* | |
// @include http://*.seework.com/* | |
// @include http://*.grouphub.com/* | |
// @include https://planetargon.grouphub.com/* |
This file contains 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; | |
} | |
This file contains 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 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 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 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 |