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
def timeIt(comment, &code) | |
retValue = nil | |
time = Benchmark.realtime do | |
retValue = code.call | |
end | |
puts "#{comment}: %.2fms" % (time*1000) | |
retValue | |
end |
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
beforeEach -> | |
@broadcasterMethods = jasmine.createSpy() | |
@messageBroadcaster = | |
strokeBegin: @broadcasterMethods | |
strokeContinue: @broadcasterMethods | |
strokeEnd: @broadcasterMethods | |
.... | |
it "should return early", -> |
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
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script> | |
var WIDTH = 500; | |
var HEIGHT = 500; | |
function drawoutline(id) { | |
var el = $(id); | |
var ctx = el[0].getContext('2d'); |
NewerOlder