Skip to content

Instantly share code, notes, and snippets.

View leereilly's full-sized avatar

Lee Reilly leereilly

View GitHub Profile
@leereilly
leereilly / rbconf.rb
Created October 4, 2012 03:44 — forked from maxwellE/rbconf.rb
Automated Twillio RubyConf ticket avaliability checker
require 'mechanize'
require 'twilio-ruby'
# Need to save a file with the html body to refer to later in the script since this is run
# in a cron job.
if File.exists?("rubyregistration.html")
body = File.read("rubyregistration.html")
else
File.open("rubyregistration.html","w+") do |file|
@leereilly
leereilly / gist:3200294
Created July 29, 2012 17:07 — forked from danparsons/gist:3195652
How to stream the London 2012 Olympics

How to stream the London 2012 Olympics

There have been several HOWTOs posted regarding streaming the 2012 Olympics using HTTP / SOCKS proxies via SSH and other similar methods. None of these actually work using the latest Flash on Mountain Lion (with Firefox, Chrome or Safari). Additionally, the third-party streaming sites don't provide BBC's amazing interface, which lets you quickly skip to individual competitors and events. However, setting up an OpenVPN server does work, with some tweaks. You'll get the exact same UX that people in England receive.

@leereilly
leereilly / dpkg.rb
Created October 26, 2011 20:02 — forked from benburkert/dpkg.rb
homebrew formula to get dpkg working a mac
require 'formula'
class Dpkg <Formula
url 'http://ftp.de.debian.org/debian/pool/main/d/dpkg/dpkg_1.16.1.1.tar.bz2'
md5 '73fb4d67dbc9f9f14a776187429ce3f1'
homepage 'http://en.wikipedia.org/wiki/Dpkg'
def patches
#Fixes the PERL_LIBDIR
@leereilly
leereilly / test.rb
Created September 19, 2011 00:41 — forked from tenderlove/test.rb
require 'thread'
require 'json'
require 'net/http'
require 'uri'
require 'betabrite'
require 'psych'
require 'usb'
class StreamClient
def initialize user, pass
@leereilly
leereilly / git-setup.sh
Created August 16, 2011 17:48
Git setup niceties
# via https://gist.github.com/419201#file_gitconfig.bash
# Install (from Matt's gist) these useful Git aliases & configurations with the following command:
# $ bash <(curl -s https://raw.github.com/gist/419201/gitconfig.bash)
git config --global color.ui auto # colorize output (Git 1.5.5 or later)
git config --global color.interactive auto # and from 1.5.4 onwards, this will works:
echo "Set your name & email to be added to your commits."
echo -n "Please enter your name: "
@leereilly
leereilly / Questions.md
Created July 13, 2011 19:00
Magma Rails Give-away

Day Job: Software developer @ Stanford.

Open Source contribution (if any): Various code/documentations contributions verifiable via GitHub:

@leereilly
leereilly / coderwall.html
Created July 8, 2011 03:39
Coderwall Badge Script for Blogs (or any other Web Page)
<script>
// This is a fork of https://gist.github.com/1005886
var coderwallJSONurl ="http://www.coderwall.com/hermanjunge.json?callback=?";
var height = 75;
var width = 75;
$(document).ready(function(){
$.getJSON(coderwallJSONurl, function(data) {
$.each(data.data.badges, function(i, item) {
@leereilly
leereilly / gist:987094
Created May 23, 2011 17:21 — forked from oisin/gist:952572
API version checking using Sinatra's before filter; supports nested resources
require 'sinatra'
# Set the version of the API being run here
#
MAJOR_VERSION = 1
MINOR_VERSION = 0
helpers do
def version_compatible?(nums)
return MAJOR_VERSION == nums[0].to_i && MINOR_VERSION >= nums[1].to_i