Public Gists by gilesbowkett

Gravatar
Mon Nov 23 01:03:32 -0800 2009
1
2
3
# usage: ruby timecard.rb path branch name-of-graph-file-not-including-extension
# e.g.: ruby timecard.rb . master timecard #=> produces timecard.png
 
Gravatar
Mon Nov 02 15:20:59 -0800 2009
1
2
3
for repo in `ls`
do
cd $repo;
Gravatar
Sun Jul 12 11:48:04 -0700 2009
1
2
3
# title (from "Mac OS X For Unix Geeks")
set_title() {
case $TERM in
Gravatar
Mon Jun 01 22:15:43 -0700 2009
1
2
3
# http://www.jamesbritt.com/2007/12/18/sending-mail-through-gmail-with-ruby-s-net-smtp
# http://d.hatena.ne.jp/zorio/20060416
 
Gravatar
Wed Apr 29 16:59:10 -0700 2009
1
2
3
  def rubyurl(original_url)
    /<permalink>(h.+)<\/permalink>/.match(
      RestClient.post("http://rubyurl.com/api/links",
Gravatar
Thu Apr 23 16:05:37 -0700 2009
1
2
3
# http://gilesbowkett.blogspot.com/2009/04/unshiftfiledirnamefile.html
class File
  class << self
Gravatar
Thu Feb 05 09:24:06 -0800 2009
1
2
3
# How does that session value get set!?
 
class << @response.session
Gravatar
Tue Feb 03 21:18:03 -0800 2009
1
2
3
# hip-hop
probabilities[36] = [1.0, 0.0, 0.5, 0.25, 0.0, 0.6, 0.0, 0.9, 0.9, 0.0, 1.0, 0.0, 0.5, 0.0, 0.3, 0.0]
probabilities[37] = [0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.0, 1.0, 0.0, 0.0, 0.0]
Gravatar
Fri Dec 05 00:05:14 -0800 2008
1
2
3
require "rubygems"
require "hpricot"
require "open-uri"
Gravatar
Mon Dec 01 19:55:31 -0800 2008
1
2
3
require "rubygems"
require "hpricot"
require "open-uri"
Gravatar
Tue Oct 07 10:22:24 -0700 2008
1
2
3
#!/usr/bin/python
 
import gdata.youtube