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
| <html style="width:100%; height:100%; overflow:hidden"> | |
| <head> | |
| <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>--> | |
| </head> | |
| <body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
| <canvas id="canvas" width="640" height="360" style="display:block"></canvas> | |
| <script> | |
| function Cards(cards) { | |
| this.cards = cards || []; |
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
| <html style="width:100%; height:100%; overflow:hidden"> | |
| <head><script src="https://api.picar.us/wearscriptdev/bower_components/msgpack-javascript/msgpack.js"></script></head> | |
| <body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
| <canvas id="canvas" width="640" height="360" style="display:block"></canvas> | |
| <script> | |
| function server() { | |
| TAPCOUNT = -1; | |
| WS.say('Tap to take a picture'); | |
| WS.subscribe('sensors:eyetracker', function (channel, sensorNames, sensorValues) { |
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
| <html style="width:100%; height:100%; overflow:hidden"> | |
| <head><script src="https://api.picar.us/wearscriptdev/bower_components/msgpack-javascript/msgpack.js"></script></head> | |
| <script> | |
| /* To use, try the following in the playground (HACK_WS may change by then, but use w/e it is now) | |
| HACK_WS.publish('example', 'test'); | |
| HACK_WS.publish('example', 'test', {'1': 3}); | |
| */ | |
| function example(data) { | |
| WS.log(JSON.stringify(msgpack.unpack(atob(data)))); |
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
| <html style="width:100%; height:100%; overflow:hidden"> | |
| <body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
| <script> | |
| function server() { | |
| var a=[]; for (var i = 0; i < 256; i++) a.push(String.fromCharCode(i));b256=a.join(''); | |
| a=[]; for (var i = 1; i < 256; i++) a.push(String.fromCharCode(i));b255=a.join(''); | |
| WS.log('echolen(b256): ' + WS.echolen(b256)); | |
| WS.log('echolen(b255): ' + WS.echolen(b255)); | |
| WS.log('echo(b256).length: ' + WS.echo(b256).length); | |
| WS.log('echo(b255).length: ' + WS.echo(b255).length); |
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
| <html style="width:100%; height:100%; overflow:hidden"> | |
| <head><script src="https://api.picar.us/wearscriptdev/bower_components/msgpack-javascript/msgpack.js"></script></head> | |
| <body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
| <canvas id="canvas" width="640" height="360" style="display:block"></canvas> | |
| <script> | |
| function publish() { | |
| var data = msgpack.pack(Array.prototype.slice.call(arguments)); | |
| WS.publish(arguments[0], btoa(data.map(function (x) {return String.fromCharCode(x)}).join(''))); | |
| } | |
| function cb(path) { |
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
| #!/usr/bin/env python | |
| import shutil | |
| import urllib2 | |
| import platform | |
| import tempfile | |
| import urllib | |
| import os | |
| import subprocess | |
| import webbrowser | |
| import stat |
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
| <html style="width:100%; height:100%; overflow:hidden"> | |
| <body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
| <script> | |
| function qr(data, format) { | |
| WS.publish('urlopen', atob(data)); | |
| } | |
| function server() { | |
| WS.say('Scan a QR Code'); | |
| WS.qr('qr'); | |
| } |
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
| <html style="width:100%; height:100%; overflow:hidden"> | |
| <body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
| <canvas id="canvas" width="640" height="360" style="display:block"></canvas> | |
| <script> | |
| function show(msg) { | |
| WS.log(msg) | |
| WS.cardModify(0, WS.cardFactory(msg, '')); | |
| } | |
| function onGesture(gesture) { |
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
| import gevent.monkey | |
| gevent.monkey.patch_all() | |
| import msgpack | |
| from gevent import pywsgi | |
| from geventwebsocket.handler import WebSocketHandler | |
| def websocket_app(environ, start_response): | |
| print('Connected') | |
| if environ["PATH_INFO"] == '/': | |
| ws = environ["wsgi.websocket"] |
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
| <!--{"profile":"http://wearscript.com"}--> | |
| <html> | |
| </html> |