This file contains hidden or 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
# Load the SDK Asynchronously | |
do (d = document) -> | |
id = "facebook-jssdk" | |
ref = d.getElementsByTagName("script")[0] | |
return if d.getElementById(id) | |
js = d.createElement("script") | |
js.id = id | |
js.async = true | |
js.src = "//connect.facebook.net/en_US/all.js" |
This file contains hidden or 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
### | |
Copyright (c) 2005, 2006 Tobias Luetke, | |
JavaScript port by M@ McCray (http://www.mattmccray.com) | |
Requires Prototype 1.6+ | |
http://github.com/darthapo/liquid.js/wikis | |
Coffeescript port of liquid.js |
This file contains hidden or 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 Game extends Phaser.Game | |
constructor: -> | |
super 800, 600, Phaser.AUTO | |
@state.add 'Stage', Stage, false | |
@state.start 'Stage' | |
class Stage extends Phaser.State |
This file contains hidden or 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
... | |
sort: | |
src: posts | |
by: date | |
direction: asc | |
dest: posts_asc |
This file contains hidden or 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
# | |
# do syntax was made for jQuery... | |
# | |
do ($ = jQuery, window, document) -> | |
_defaults = | |
color: "#556b2f" | |
backgroundColor: "white" | |
# |
This file contains hidden or 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
# | |
# Liquid.js wrapper | |
# | |
# Copy your Liquid.js distro file to the same folder | |
# | |
# | |
fs = require('fs') | |
path = require('path') | |
LIQUID_JS = './liquid.js' # path to the Liquid.js distribution |
This file contains hidden or 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
# | |
# Magic | |
# | |
# Dependency injection via prototype. | |
# | |
# | |
# Get all methods and properties in the prototype chain | |
# | |
metadata = (klass) -> |
This file contains hidden or 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
# | |
# @see http://epaperpress.com/lexandyacc/calc1.html | |
# | |
# | |
# Var table | |
# | |
_var = {} | |
# | |
# Private Base Class |
This file contains hidden or 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
# | |
# Object.addSuper | |
# | |
# @see Object.getPrototypeOf | |
# | |
__addSuper = (object, prototype) -> | |
# wrap primitive values | |
object = (if object instanceof Object then object else new object.constructor(object)) |
This file contains hidden or 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 Counter | |
constructor: (max) -> | |
count = 0 | |
counter = () -> | |
if (count < counter.max) then return ++count | |
else return count = 1 | |
counter.max = Math.abs(parseInt(max)) || 1 |