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
var PageLoadHandler = (function() { | |
PageLoadHandlerObject = function() {}; | |
PageLoadHandlerObject.prototype = { | |
callBackList: [], | |
execute: function(callBack) { | |
jQuery(callBack); | |
this.callBackList.push(callBack); | |
}, | |
executed: function(functionToVerify) { | |
for(functionIndex in this.callBackList) { |
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
# external dependencies | |
require 'rack' | |
require 'tilt' | |
# stdlib dependencies | |
require 'thread' | |
require 'time' | |
require 'uri' | |
# other files we need |
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
describe Something do | |
before(:each) do | |
do_something_before | |
end | |
it "does one thing" do | |
# before will run for this example because rspec doesn't know it is pending | |
# until the example is eval'd | |
pending | |
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
# KBounce clone | |
# Setup a basic canvas, 600x400, not resizable | |
Shoes.app :width => 600, :height => 400, :resizable => false do | |
background black | |
# Put our vertical and horizontal baracades in a list | |
@linesv = [] | |
@linesh = [] | |
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
Shoes.app width: 800, height: 600 do | |
tick 60 do | |
stop_ticking if @right_player.won? or @left_player.won? | |
alert "Right Player Wins!" if @right_player.won? | |
alert "Left Player Wins!" if @left_player.won? | |
end | |
moving_element :ball do | |
location top: 400, left: 300 |
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
data:text/html, <style>@import url(http://fonts.googleapis.com/css?family=Inconsolata);html,body{background-color:%233f3f3f}%23f,%23d{background-color:rgba(0,0,0,0);margin:0;padding:3px;font-size:14px;font-family:'Inconsolata';display:block}pre .nocode {background-color:none;color:%23000}pre .str{color:%23cc9393}pre .kwd{color:%23f0dfaf}pre .com{color:%237f9f7f}pre .typ {color:%23dfdfbf}pre .lit{color:%238cd0d3}pre .pun{color:%23fff}pre .pln{color:%23dcdccc}pre .tag{color:%23e89393;font-weight:bold}pre .atn{color:%23dfdfbf;font-weight:bold}pre .atv{color:%23dca3a3}pre .dec{color:%23efdcbc}ol.linenums{margin-top:0;margin-bottom:0;color:%23AEAEAE}li.L1,li.L3,li.L5,li.L7,li.L9{}%23m{position:relative;z-index:1;color:rgba(0,0,0,0);border:1px solid %23888}%23d{z-index:0;position:absolute;left:0px;top:0px}%23p{position:relative}</style><script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js" type="text/javascript"></script><div id="p"><pre id="m"><code id="f" oninput='d=document.getElement |