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
{ | |
// Docs: http://play.elevatorsaga.com/documentation.html#docs | |
init: function(elevators, floors) { | |
console.log("init() with " + elevators.length + " elevators and " + floors.length + " floors"); | |
for (var i=0; i<elevators.length; i++) { | |
(function(elevator){ | |
elevator.on("idle", function() { | |
console.log("idle"); | |
elevator.goToFloor(0); | |
//console.log("done idling"); |
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 SiriProxy::Plugin::Twitter < SiriProxy::Plugin | |
# this watches when in the default context | |
listen_for /tweet (.*)/ do |data, tweetText| | |
show_rich_snippet do | |
image 'http://cl.ly/1l040J1A392n0M1n1g35/content' # this just makes things looks nice, but is obviously specific to my username | |
text tweetText | |
end | |
# this locks out other plugins until a confirmation or deny | |
confirm do | |
confirmed do |