Skip to content

Instantly share code, notes, and snippets.

View gljeremy's full-sized avatar

Jeremy Kent gljeremy

View GitHub Profile
@gljeremy
gljeremy / fifa_scrape.rb
Created October 2, 2011 23:11
Scrapes the FIFA web site for stats that feed a fantasy league.
require 'rubygems'
require 'mechanize'
require 'uri'
require 'CSV'
class FifaScrape
attr_reader :baseUrl, :mech
def initialize(url, proxy)
@mech = Mechanize.new
@baseUrl = url
@gljeremy
gljeremy / which.pl
Created September 22, 2011 17:56
which command for windows
#! /usr/bin/perl
foreach my $arg (@ARGV) {
#print $arg, "\n";
my $found = 0;
foreach my $dir (split(/\;/, $ENV{"PATH"})) {
foreach my $ext ('', split(/\;/, $ENV{"PATHEXT"})) {
$fqpath = $dir . "\\" . $arg . $ext;
#print $fqpath, "\n";
if (-f $fqpath) {
@gljeremy
gljeremy / disconnect.rb
Created September 21, 2011 14:03 — forked from tmcw/disconnect.rb
bulk-export run data from Garmin Connect
#!/usr/bin/env ruby
## disconnect
# ./disconnect.rb -u yourusername [-o /your/path] [-p yourhttpproxyserver]
#
# This is a command-line utility for the bulk-downloading of run data from
# the connect.garmin.com web application, which has lackluster export
# capabilities.
#