Skip to content

Instantly share code, notes, and snippets.

View ericktai's full-sized avatar

Erick Tai ericktai

View GitHub Profile
@ericktai
ericktai / CreateRelatedObjects.js
Created March 14, 2012 00:14
JS SDK for Relationships
//Define your Weapon object type and tell StackMob to save this type to the "weapon" datastore
var Weapon = StackMob.Model.extend({ schemaName: 'weapon' });
//Create weapons locally in preparation to save them and add them to Chuck Norris
var weapons = [
new Weapon({
name: 'Fists of Fury',
hitpoints: 5, //integer
cost: 0.5, //float
visible: true, //boolean
@ericktai
ericktai / Test.scala
Created March 11, 2012 19:52
Testing Gist
val user : Box[User] = Empty
user = tryo(Users.getUser("chucknorris")) openOr Empty