Skip to content

Instantly share code, notes, and snippets.

View robbyrussell's full-sized avatar
🤡
Life: WIP

Robby Russell robbyrussell

🤡
Life: WIP
View GitHub Profile
@robbyrussell
robbyrussell / basecamp_favicons.user.js
Created November 10, 2008 20:19
A few gresemonkey scripts to add favicons to 37signals apps
// ==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/*
@robbyrussell
robbyrussell / skitchembedder.user.js
Created October 24, 2008 05:12
Replaces the select to copy html to not include the 'uploaded with plasq's skitch' references. makes LOLBugz less noisey
// ==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 = '';
@robbyrussell
robbyrussell / 01 port self-update
Created October 17, 2008 19:20
Everything that I'm doing to get my development environment up and running with MacPorts
robby-russells-macbook-pro% sudo /opt/local/bin/port selfupdate
MacPorts base version 1.600 installed
Downloaded MacPorts base version 1.600
The MacPorts installation is not outdated and so was not updated
selfupdate done!
@robbyrussell
robbyrussell / gist:15458
Created October 8, 2008 06:40
example of building line graph with ProtoChart
// 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],
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
@robbyrussell
robbyrussell / SaveYourselfFromSarahPalin.js
Created October 2, 2008 03:20
greasemonkey script to protect you from palin videos on youtube
// ==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) {
curl -X POST -H 'Content-Type: application/json' -H "Accept: application/json" -d '{ "link": { "website_url": "http://github.com/robbyrussell/rubyurl" } }' http://rubyurl.com/api/links | ruby -rubygems -e 'require "json"; require "yaml"; puts JSON.parse($stdin.gets).to_yaml'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 107 100 107 0 0 527 0 --:--:-- --:--:-- --:--:-- 0
---
link:
permalink: http://rubyurl.com/G2mM
website_url: http://github.com/robbyrussell/rubyurl
require 'rubygems'
require 'httparty'
class Rubyurl
include HTTParty
base_uri 'rubyurl.com'
def self.shorten( website_url )
post( '/api/links.json', :query => { :link => { :website_url => website_url } } )
end
@robbyrussell
robbyrussell / rubyurl-request.json
Created September 2, 2008 01:21
request/response for RubyURL via JSON
{ "link": { "website_url": "http://github.com/robbyrussell/rubyurl" } }
<?xml version="1.0" encoding="UTF-8"?>
<link>
<website_url>http://github.com/robbyrussell</website_url>
<permalink>http://rubyurl.com/PNsF</permalink>
</link>