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 Player | |
constructor: (@health = 10) -> | |
@attributes = | |
str: 8, int: 8, wis: 8, | |
dex: 8, con: 8, cha: 8 | |
damage: (amount) -> | |
@health += amount | |
@inSameParty: (p1, p2) -> |
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
/*--------------------------------------------------- | |
LESS Elements 0.9 | |
--------------------------------------------------- | |
A set of useful LESS mixins | |
More info at: http://lesselements.com | |
---------------------------------------------------*/ | |
.gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) { | |
background: @color; | |
background: -webkit-gradient(linear, |
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
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class=""> <!--<![endif]--> |
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
'use strict' | |
@App = Ember.Application.create | |
LOG_TRANSITIONS: true | |
ready: -> | |
console.log "app ready, starting server" | |
@set 'server', App.EventedServer.create | |
url: '192.168.1.101:8888/game' | |
delegateType: App.FixtureWebSocket |
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
# RFC1422-compliant CoffeeScript UUID function. | |
# Generates a UUID from a random number, which means it is not entirely unique. | |
# See: http://stackoverflow.com/questions/105034 | |
guid = -> | |
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace /[xy]/g, (c) -> | |
r = Math.random() * 16 | 0 | |
v = if c is 'x' then r else (r & 0x3|0x8) | |
v.toString(16) |
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
@media only screen and (max-width: 767px) { | |
} | |
@media only screen and (min-width: 768px) { | |
} | |
@media only screen and (min-width: 992px) { | |
} | |
@media only screen and (min-width: 1200px) { |
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> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script> | |
<script src="http://builds.emberjs.com/ember-latest.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> |
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> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script> | |
<script src="http://builds.emberjs.com/ember-latest.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> |
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 EventDispatcher = function() { | |
this.initialize(); | |
}; | |
var p = EventDispatcher.prototype; | |
EventDispatcher.initialize = function(target) { | |
target.addEventListener = p.addEventListener; | |
target.removeEventListener = p.removeEventListener; | |
target.removeAllEventListeners = p.removeAllEventListeners; |
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 ComputedAttributesModel extends Backbone.Model | |
initialize: -> | |
super | |
return if _.isUndefined(@computed) | |
for attr, dependencies of @computed | |
@bind "change:#{attr}", => | |
param = {} | |
param["_#{attr}"] = @[attr].call @ | |
@set(param) |
NewerOlder