Skip to content

Instantly share code, notes, and snippets.

Matt Dean trabianmatt

Block or report user

Report or block trabianmatt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
trabianmatt /
Last active Mar 28, 2016
Trabian's Frontend Stack

Note: This is a portion of a project README and contains links to files within that project that are not applicable to this gist but are included anyway to show how this is used.

Frontend Stack

Build Tools


Babel is a JavaScript compiler that converts new syntax such as that provided by ES2015 (and beyond) into JavaScript that's compatible on browsers that don't support the latest standards. The Babel configuration for this application is located at .babelrc.

trabianmatt / HomeRoute.js
Created Nov 4, 2015 — forked from ide/HomeRoute.js
Simple example of an ExRoute object
View HomeRoute.js
let homeRoute = {
getSceneClass() {
return require('./HomeScreen');
getTitle() {
return 'Home',
renderLeftButton(navigator) {


  • Fields:
    • member_number
    • name
    • users (array of user nodes with same data as already added to the API, including username and lock info, but add “enrollment_status” with choice of “enrolled” or “restricted” or “unenrolled”)

Linked memberships

  • Does Joe represent each membership in the DB as a separate entity with its own ID, or do we reference it with both the user id and membership number?

    For example: POST to /api/users/1/membership/12345/link to link the membership, or POST to /api/associated_member/2394809834/link

  • Which actions do we need?
helpers = require '../../../helpers'
{ assert } = helpers.chai
describe 'Backbone.View binding', ->
beforeEach ->
class SampleView extends Backbone.View
trabianmatt /
Last active Dec 11, 2015
A preview of what's in store for titanium-backbone. (Ignore the numbers and underscores in the file names - they are intended only to provide order to the gists).
SampleWindow = require './window'
person = new Backbone.Model
name: 'John Doe'
sampleWindow = new SampleWindow
model: person
View template.jade
Label= title
View(layout='horizontal', top=11)
Button.clickable I work!
Button.notclickable I don't!
trabianmatt /
Last active Dec 11, 2015
sample titanium-backbone view
template = require './template'
module.exports = class Window extends Backbone.View
viewName: 'Window'
backgroundColor: '#eee'
layout: 'vertical'
import sublime, sublime_plugin
import os, time
class RestartPassengerCommand(sublime_plugin.TextCommand):
"""Touch tmp/restart.txt file in the rails project to restart pasenger"""
def run(self, edit):
for folder in self.view.window().folders():
fname = os.path.join(str(folder), 'tmp', 'restart.txt')
if os.path.exists(os.path.dirname(fname)):
You can’t perform that action at this time.