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
device.notifications.createNotification('Welcome to how to cook a wolf!').show(); | |
device.browser.launch('http://ethanstowellrestaurants.com/blog/menu-how-to-cook-a-wolf/'); |
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
device.assert.isTrue(true); | |
device.notifications.createNotification("device.ajax works!").show(); |
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 http = require('http'); | |
var url = require('url'); | |
var mime = require('mime'); | |
var fs = require('fs'); | |
var port = process.env.PORT || 40000; | |
http.createServer(function(req, res) { | |
var u = url.parse(req.url); | |
var filename = __dirname + '/static' + u.pathname; | |
fs.exists(filename, function(exists) { |
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
// Constants | |
const passphrase = 'A3PnGzWjxGuAYtFu', | |
key = 'data', | |
object = { foo: 'bar' }; | |
// Log original item | |
console.log('Original object', object); | |
// Store item with encryption | |
setItem(key, object, passphrase) |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |