Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeremy Kent gljeremy

View GitHub Profile
@gljeremy
gljeremy / which.pl
Created Sep 22, 2011
which command for windows
View which.pl
#! /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 Sep 21, 2011 — forked from tmcw/disconnect.rb
bulk-export run data from Garmin Connect
View disconnect.rb
#!/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.
#
@gljeremy
gljeremy / fifa_scrape.rb
Created Oct 2, 2011
Scrapes the FIFA web site for stats that feed a fantasy league.
View fifa_scrape.rb
require 'rubygems'
require 'mechanize'
require 'uri'
require 'CSV'
class FifaScrape
attr_reader :baseUrl, :mech
def initialize(url, proxy)
@mech = Mechanize.new
@baseUrl = url