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.App = new Marionette.Application | |
initialize: -> | |
@layout = new Layout() | |
onStart: -> | |
@layout.render() | |
@region = @layout.getRegion('main') | |
onStop: (options) -> | |
@region.empty() | |
stop: (options) -> | |
if @onStop |
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
# Thanks to this post: | |
# http://blog.ikato.com/post/15675823000/how-to-install-consolas-font-on-mac-os-x | |
$ brew install cabextract | |
$ cd ~/Downloads | |
$ mkdir consolas | |
$ cd consolas | |
$ curl -O http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe | |
$ cabextract PowerPointViewer.exe | |
$ cabextract ppviewer.cab |
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
function ref(obj, str) { | |
str = str.split("."); | |
for (var i = 0; i < str.length; i++) | |
obj = obj[str[i]]; | |
return obj; | |
} | |
var obj = { a: { b: 1, c : { d : 3, e : 4}, f: 5 } } | |
str = 'a.c.d' | |
ref(obj, str) // 3 |
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 inherits = require('inherits'); | |
var Game = require('crtrdg-gameloop'); | |
var Entity = require('crtrdg-entity'); | |
var Keyboard = require('crtrdg-keyboard'); | |
inherits(Player, Entity); | |
function Player(options){ | |
this.position = { | |
x: options.position.x, |
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
Marionette.Behaviors.behaviorsLookup = -> | |
return window.Behaviors = {} |
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 RowView extends Marionette.ItemView | |
tagName: 'tr' | |
template: require './row.hbs' | |
behaviors: | |
Socket: true |
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 window.Behaviors.Socket extends Marionette.Behavior | |
onRender: -> | |
console.log 'asd' |
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
@collection.fetch().done => | |
@layout.getRegion('main').show new ListView | |
collection: @collection |
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
Git = require('nodegit') | |
pathToRepo = require('path').resolve(process.cwd()) | |
module.exports = (socket, options) -> | |
Git.Repository.open(pathToRepo) | |
.then(getStatus) | |
.then (list) -> | |
console.log list | |
getStatus = (repository) -> |
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
#!/bin/sh | |
nohup sudo node index.js >/dev/null 2>&1 & | |
nohup grunt >/dev/null 2>&1 & |