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
| requirejs.config({ | |
| baseUrl: "./", | |
| //Comment out the optimize line if you want | |
| //the code minified by UglifyJS | |
| optimize: "none", | |
| //keepBuildDir: false, |
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
| //Support for internationalisation - beginning | |
| //filter strings with 'Interp' in name and register them as partials | |
| _.each(Strings, function(str, key) { | |
| if(key.indexOf('Interp') > -1) { | |
| Handlebars.registerPartial(key.substr(0, key.indexOf('Interp')), str); | |
| } | |
| }); |
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
| var express = require('express'), | |
| app = express(), | |
| restler = require('restler'), | |
| path = require('path'); | |
| app.configure(function () { | |
| app.use(express.logger('dev')); /* 'default', 'short', 'tiny', 'dev' */ | |
| app.use(express.static(path.join(__dirname, '../WWW/dist'))); | |
| app.use(express.bodyParser()); |
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
| define(function (require) { | |
| 'use strict'; | |
| var _ = require('underscore'); | |
| var PIXI = require('pixi'); | |
| var toxi = require('toxi'); | |
| var TColor = toxi.color.TColor; | |
| var Line = function(physics, points, origin) { | |
| this.init(physics, points, origin); |
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
| define(function (require) { | |
| 'use strict'; | |
| var _ = require('underscore'); | |
| var PIXI = require('pixi'); | |
| var PMath = require('utils/PMath'); | |
| var toxi = require('toxi'); | |
| var TColor = toxi.color.TColor; | |
| var BezierInterpolation = toxi.math.BezierInterpolation; | |
| var TweenBall = function() {}; |
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
| var smallest = _.reduce([4, 44, 3, 6, 2], function(memo, num){ | |
| return memo > num ? num : memo; | |
| }); | |
| //2 | |
| var largest = _.reduce([4, 44, 3, 6, 2], function(memo, num){ | |
| return memo < num ? num : memo; | |
| }); |
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
| @mixin keyframes($animation-name) { | |
| @-webkit-keyframes $animation-name { | |
| @content; | |
| } | |
| @-moz-keyframes $animation-name { | |
| @content; | |
| } | |
| @-ms-keyframes $animation-name { | |
| @content; | |
| } |
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
| <div data-ng-init="places=['Newry', 'Dundalk', 'Belfast']"></div> | |
| <div data-ng-repeat="value in places track by $index">Been to {{places[$index]}}?</div> | |
| <div data-ng-repeat="value in ['Derry', 'Dublin', 'Drogheda'] track by $index">Been to {{value}}?</div> |
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
| git status (shows the status of changes on each tree of current branch) | |
| git add -i (interactive mode) | |
| git add -u (adds all tracked files) | |
| git add . (also adds deleted files) | |
| git diff (diff of what is changed but not staged) | |
| git diff --staged (diff of what is staged but not yet committed) |
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
| //set up alternative router with nested routes (not available in Backbone's own router) | |
| //and define handlers for each route. | |
| var router = new Router["default"](); //note: ["default"] is only a temporary measure | |
| router.map(function(match) { | |
| match("/overview1").to("overview1", function(match) { | |
| match("/detail1").to("detail1"); | |
| match("/moredetail1").to("moredetail1"); |