This file contains hidden or 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
def time_it(&block) | |
before = Time.now | |
block.call() | |
Time.now - before | |
end | |
def display_time(&block) | |
puts "time took: #{time_it(&block)} seconds" | |
end |
This file contains hidden or 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
require 'filewatcher' | |
system('clear') | |
puts 'and now my watch begins ...' | |
FileWatcher.new('.').watch() do |filename, event| | |
if filename.include? '.rb' and filename != 'watch.rb' | |
system('clear') | |
puts "time is #{Time.now.strftime('%I:%M:%S %P')}" | |
puts `ruby #{filename}` |
This file contains hidden or 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
//Written by Hoten | |
//www.hotengames.com | |
//feel free to use | |
for (Center c : centers) { | |
g.setColor(key[c.index]); | |
//only used if Center c is on the edge of the graph. allows for completely filling in the outer polygons | |
Corner edgeCorner1 = null; | |
Corner edgeCorner2 = null; |
NewerOlder