Skip to content

Instantly share code, notes, and snippets.

// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
### Keybase proof
I hereby claim:
* I am shanejonas on github.
* I am superfreek (https://keybase.io/superfreek) on keybase.
* I have a public key ASAaTrFUno0AfcmgjkLnhSolhqBydwEhyhJUanj_TwfLSAo
To claim this, I am signing this object:
#!/bin/bash
while ! curl http://$DB_HOST:$DB_PORT/
do
echo "$(date) - still trying"
sleep 1
done
echo "$(date) - connected successfully to mongodb"
node server.js
@shanejonas
shanejonas / designer.html
Created October 19, 2014 18:48
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<polymer-element name="my-element">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@shanejonas
shanejonas / myfile.coffee
Last active December 14, 2015 17:18
backbone client/server model
Backbone = require 'backbone'
if Backbone.isServer then API = require '../../api'
class PostModel extends Backbone.Model
urlRoot: -> "/api/posts"
sync: (method, model, options)->
if not Backbone.isServer
super
@shanejonas
shanejonas / events.coffee
Created August 2, 2011 23:32
Working with backbone events in coffeescript
# Heres how I've been working with arbitrary backbone events:
#
# Obviously in Backbone you can use events elsewhere as well, for
# more info see the docs here: http://documentcloud.github.com/backbone/
# useful for running this with node.. else browser this with the right includes.
# includes
if typeof window is 'undefined'
# npm install -g backbone
# gives you:
@shanejonas
shanejonas / coffeescript-arrays.coffee
Created July 29, 2011 01:29
Working with arrays in coffeescript
#
# Working with arrays, ranges and numbers in coffeescript:
# I've been working with a lot of arrays to do lazy loading
# heres how awesome the array syntax is:
# you can use ranges to loop over functions.
# heres a list of the numbers 100 through 115
big_list = (num for num in [100..115])