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 String | |
def is_i? | |
!!(self =~ /^[-+]?[0-9]+$/) | |
end | |
end | |
class Board | |
def initialize(rows,columns) | |
@theBoard = Hash.new | |
@rows = rows |
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
// detecting if browser supports fullscreen | |
return document.body.mozRequestFullScreen || document.body.webkitRequestFullScreen || document.body.requestFullScreen; | |
// requesting full screen on an elm | |
( elm.mozRequestFullScreen && elm.mozRequestFullScreen() ) || ( elm.webkitRequestFullScreen && elm.webkitRequestFullScreen() ) || ( elm.requestFullScreen && elm.requestFullScreen() ); | |
//binding to full screen event | |
( document.body.requestFullScreen && window.addEventListener('fullscreenchange',fullScreenEvent) ) || ( document.body.webkitRequestFullScreen && window.addEventListener('webkitfullscreenchange',fullScreenEvent ) ) || ( document.body.mozRequestFullScreen && window.addEventListener('mozfullscreenchange',fullScreenEvent) ); | |
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
#elm:-webkit-full-screen, #elm:-moz-full-screen,#elm:full-screen { | |
height: 100%; | |
width: 100%; | |
position: absolute; | |
background-color:#000; | |
} |
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
http://icanhazjs.com/ | |
http://mustache.github.com/ | |
https://github.com/nje/jquery-tmpl | |
http://documentcloud.github.com/backbone/ | |
http://handlebarsjs.com/ | |
http://akdubya.github.com/dustjs/ | |
https://github.com/creationix/haml-js |
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
body { | |
background-color:#DDD | |
} | |
.green { | |
background: #2eb760; | |
background: -moz-linear-gradient(top, #2eb760 0%, #1b9746 71%, #199540 88%, #1b9a35 100%); | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2eb760), color-stop(71%,#1b9746), color-stop(88%,#199540), color-stop(100%,#1b9a35)); | |
background: -webkit-linear-gradient(top, #2eb760 0%,#1b9746 71%,#199540 88%,#1b9a35 100%); | |
background: -o-linear-gradient(top, #2eb760 0%,#1b9746 71%,#199540 88%,#1b9a35 100%); |
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
.pill { | |
height: 30px; | |
width: 70px; | |
overflow: hidden; | |
position: relative; | |
} | |
.pill .section.right { | |
border-radius: 0px 10px 10px 0px; | |
} |
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
window.onload = -> | |
img = new Image() | |
img.src = '600.jpeg' | |
img.onload = -> | |
el = document.getElementById('stage') | |
ctx = el.getContext('2d') | |
el.setAttribute 'width', img.width | |
el.setAttribute 'height', img.height | |
ctx.drawImage img, 0, 0 |
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
// CONDITIONALS | |
if (foo && bar) { | |
} | |
if () { | |
} else { | |
} |
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
body { | |
background-color:#111; | |
color: #FFF; | |
} | |
.foo { | |
opacity: 0.9 | |
} | |
.bar { |
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
body { | |
background-color:#111; | |
color: #FFF; | |
} | |
.foo { | |
opacity: 0.9 | |
} | |
.bar { |
OlderNewer