This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# save as "Rakefile" in desired directory | |
# cd to directory and type "rake" | |
task :default => 'make_html' | |
desc "Turns a directory of images into linked HTML" | |
task :make_html do | |
extensions = "png,PNG,jpg,JPG,gif" | |
working_dir =File.dirname(__FILE__) | |
pictures = Dir.glob("#{working_dir}/*.{#{extensions}}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//from http://stackoverflow.com/questions/5489946/jquery-how-to-wait-for-the-end-or-resize-event-and-only-than-perform-action | |
$(window).resize(function(){ | |
rtime = new Date(); | |
if(timeout === false){ | |
timeout = true; | |
setTimeout(resizeend, delta); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Game | |
attr_accessor :possible_choices, :victory_table, :score, :round | |
def initialize | |
@victory_table = { | |
'rock' => 'paper', | |
'paper' => 'scissors', | |
'scissors' => 'rock' | |
} | |
@possible_choices = [:rock, :paper, :scissors] |
NewerOlder