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
| Z = Ember.Application.create({ | |
| ready: function () { | |
| this.initialize(); | |
| } | |
| }); | |
| Z.ApplicationController = Ember.Controller.extend(); | |
| Z.ApplicationView = Ember.View.extend({ | |
| templateName: 'application' | |
| }); |
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 players = { | |
| 324234: { | |
| x: 100, | |
| y: 100 | |
| } | |
| }; | |
| socket.on('message', function (data) { | |
| if (data.type === 'move') { |
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 fs = require('fs'), | |
| // CONFIG OPTIONS | |
| basePath = './static/js/', | |
| buildPath = basePath + 'build/app.js', | |
| templatePath = basePath + 'templates/' | |
| filePaths = [ | |
| 'libs/jquery.js', | |
| 'libs/ember.js', | |
| 'libs/ember-data.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
| App.Project = DS.Model.extend({ | |
| }); | |
| App.Issue = DS.Model.extend({ | |
| project: DS.hasOne('App.Project') | |
| }); | |
| var issue = App.store.create(App.Issue, { | |
| project: App.projectControllet.get('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
| // libs | |
| var flatiron = require('flatiron'); | |
| var fs = require('fs'); | |
| // create app | |
| var app = flatiron.app; | |
| app.use(flatiron.plugins.http); | |
| // router logic | |
| app.router.get('/', 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
| // Client Model | |
| CoreIo.Client = SC.Record.extend( | |
| /** @scope CoreIo.Client.prototype */ { | |
| primaryKey: 'id', | |
| title: SC.Record.attr(String), | |
| stat: SC.Record.attr(Number, {key: 'status'}), | |
| created: SC.Record.attr(SC.DateTime, {format: '%Y-%m-%d %H:%M:%S'}), | |
| updated: SC.Record.attr(SC.DateTime, {format: '%Y-%m-%d %H:%M:%S'}), | |
| brands: SC.Record.toMany('CoreIo.Brand', {isMaster: YES, inverse: 'client'}), |
NewerOlder