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
source 'https://rubygems.org' | |
# Guard | |
group :guard do | |
gem 'guard' | |
gem 'guard-coffeescript' | |
gem 'guard-haml' | |
gem 'guard-sass' |
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
case @response | |
when Net::HTTPSuccess | |
... | |
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
window.Kata ?= {} | |
window.Kata.Particle = class Particle | |
constructor: (@context, @vector, @position) -> | |
@vector = | |
x: Math.random() * 4 - 2 | |
y: Math.random() * 4 - 2 | |
@position = | |
x: @context.canvas.width/2 | |
y: @context.canvas.height/2 |
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.Kata ?= {} | |
window.Kata.Controller = class Controller | |
constructor: (@canvas, particleCount) -> | |
@context = @canvas.getContext '2d' | |
@particles = [] | |
for i in [0...particleCount] | |
@particles.push new Kata.Particle(@context) | |
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.after = (t,f) -> setTimeout f, t | |
window.every = (t,f) -> setInterval f, t | |
$ -> | |
alert "foo" | |
$('#canvas').attr | |
width: $('#canvas').width() | |
height: $('#canvas').height() | |
new Kata.Controller $('#canvas').get(0), 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
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> | |
<meta name="description" content=""> |
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
grunt.initConfig({ | |
hogan: { | |
// desired target name | |
dev : { | |
// indicate you want to compile templates | |
compile : { | |
// wildcard of desired templates (glob syntax) | |
templates : "source/**/*.mustache", | |
processName: function(filename) { | |
return filename.replace(/source\//, "").replace(/\.jst\.mustache/, ""); |
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
for roid in asteroids | |
for roid2 in asteroids when roid isnt roid2 | |
roid.explode() if roid.overlaps roid2 |
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 roid, roid2, _i, _j, _len, _len2; | |
for (_i = 0, _len = asteroids.length; _i < _len; _i++) { | |
roid = asteroids[_i]; | |
for (_j = 0, _len2 = asteroids.length; _j < _len2; _j++) { | |
roid2 = asteroids[_j]; | |
if (roid !== roid2) { | |
if (roid.overlaps(roid2)) { | |
roid.explode(); | |
} | |
} |
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
### Keybase proof | |
I hereby claim: | |
* I am sebastiandeutsch on github. | |
* I am sippndipp (https://keybase.io/sippndipp) on keybase. | |
* I have a public key whose fingerprint is 43E1 2E79 7907 07A8 1C78 3484 3D44 6B59 C0C5 8CBB | |
To claim this, I am signing this object: |