Skip to content

Instantly share code, notes, and snippets.

View sdball's full-sized avatar

Stephen Ball sdball

View GitHub Profile
@sdball
sdball / index.html
Created July 15, 2011 13:07
Use jQuery to modify URLs that contain a specific string
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Rewriting UR Links</title>
</head>
<body>
<h1>Rewriting UR Links</h1>
<p>
<a href="http://na8.salesforce.com/something">Link to http://na8.salesforce.com/something that opens in a new tab/window.</a>
@sdball
sdball / text_to_link.html
Created August 10, 2011 18:01
Text into a link
@sdball
sdball / gist:1218338
Created September 15, 2011 02:02
gem redis
gem 'redis'
gem 'redis-store', '1.0.0.rc1'
@sdball
sdball / broadbandmap.jquery.js
Created November 18, 2011 21:25
broadband.com jquery javascript plugin
(function( $ ){
var settings = {
lat: 38.651198,
lng: -97.976074,
address: '',
minimumDetailZoom: 4,
defaultZoom: 4,
displayLitBuildings: false,
displayCentralOffices: false,
dslHeatmapActive: false,
@sdball
sdball / ajax_loader.coffee
Created December 15, 2011 00:31
Quick demo of how to do a simple jQuery binding in CoffeeScript
$(document).ready ->
$('form').submit ->
$(this).find('.ajax-loader').show()
@sdball
sdball / expand-url.sh
Created August 8, 2012 13:20
Expand URLs by following a single redirect
#!/bin/bash
main() {
if [ -z $1 ]; then
echo "Usage: expand-url URL"
exit 1
fi
url=$1
response $url | parse_redirect
}
@sdball
sdball / autobots.bash
Created September 18, 2012 01:36
beanstalkd rollout!
$ ruby rollout.rb
$ stalk jobs.rb
@sdball
sdball / Gemfile
Last active December 10, 2015 15:39
Just a quick prototype to talk to data.com's sandbox.
# Ruby 1.8.7
source "https://rubygems.org"
gem "json_pure"
group :test do
gem "rspec"
gem "vcr"
gem "webmock"
@sdball
sdball / fiat_nil.rb
Last active December 10, 2015 15:59
Don't Do What Johnny Don't Does
class FiatNil
def method_missing(*args)
nil
end
end