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
if len(sys.argv) > 1: | |
parser = argparse.ArgumentParser() | |
subparsers = parser.add_subparsers() | |
subparser = subparsers.add_parser('easter_egg') | |
subparser.set_defaults(func=easter_egg) | |
args = parser.parse_args() | |
args.func(**vars(args)) | |
else: | |
main() |
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
# warning: may fail (`adb devices` subsequently doesn't show the device). | |
# If so, then restart device. | |
adb shell setprop service.adb.root 0 | |
adb shell "stop adbd && start adbd" |
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
#! /usr/bin/env python | |
# from http://stackoverflow.com/questions/11524586/accessing-logcat-from-android-via-python | |
import Queue | |
import subprocess | |
import threading | |
import datetime | |
class AsynchronousFileReader(threading.Thread): | |
''' |
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
<html style="width:100%; height:100%; overflow:hidden"> | |
<head> | |
</head> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
<h2> | |
<span id="lat"></span>, | |
<span id="lng"></span>, | |
<span id="deg"></span> | |
</h2> | |
<h2> |
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
<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> | |
<script src="wearscript.js"></script> | |
</head> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
<canvas id="canvas" width="640" height="360" style="display:block"> | |
</canvas> |
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
package main | |
const ( | |
// You can leave these | |
version = 0 // Defines the websocket protocol version | |
debug = true // Set to false to turn off logging every API request. | |
allowAllUsers = true // If true then all users who auth can access the server, false admin must verify | |
sessionName = "wearscript" | |
scopes = "https://www.googleapis.com/auth/userinfo.profile" | |
ravenDSN = "" // Leave blank unless you are using Raven/Sentry for logging |
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
package main | |
const ( | |
// You can leave these | |
version = 0 // Defines the websocket protocol version | |
debug = true // Set to false to turn off logging every API request. | |
allowAllUsers = true // If true then all users who auth can access the server, false admin must verify | |
sessionName = "wearscript" | |
scopes = "https://www.googleapis.com/auth/userinfo.profile" | |
ravenDSN = "" // Leave blank unless you are using Raven/Sentry for logging |
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
<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 server() { | |
WS.say('About to send some data.'); | |
WS.blobSend('glassdata', 'Some nonsense 234234'); | |
} | |
function main() { | |
if (WS.scriptVersion(0)) return; |
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
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.openshades.wearvideo" | |
android:versionCode="1" | |
android:versionName="1.0"> | |
<uses-permission android:name="android.permission.CAMERA"/> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
<uses-permission android:name="android.permission.RECORD_AUDIO" /> | |
<uses-feature android:name="android.hardware.camera" android:required="false"/> | |
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/> |
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
<html style="width:100%; height:100%; overflow:hidden"> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
<img id="image" width="640" height="360" /> | |
<script> | |
function photoPath(data) { | |
WS.say("I got your photo"); | |
img = document.getElementById("image"); | |
img.src = data; | |
} | |
OlderNewer