Skip to content

Instantly share code, notes, and snippets.

@timothyclemans
timothyclemans / AndroidManifest.xml.erb
Last active August 29, 2015 13:59
Wear Script APK creation
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.weariverse.<%= $package %>"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
@timothyclemans
timothyclemans / glass.html
Created April 17, 2014 00:52
checklists for Chris
<!-- Complex checklists V2 -->
<html style="width:100%; height:100%; overflow:hidden">
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="https://rawgit.com/Glench/fuzzyset.js/master/lib/fuzzyset.js"></script>
<script src="http://checklistsforglass.com/static/js/show_checklist.js"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700' rel='stylesheet' type='text/css'>
<style>
body {
@timothyclemans
timothyclemans / glass.html
Last active August 29, 2015 14:00
[wearscript] Checklists with QR
<!-- Complex checklists V2 -->
<html style="width:100%; height:100%; overflow:hidden">
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="https://rawgit.com/Glench/fuzzyset.js/master/lib/fuzzyset.js"></script>
<script src="http://checklistsforglass.com/static/js/show_checklist.js"></script>
<script src="http://checklistsforglass.com/static/js/glass.js"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700' rel='stylesheet' type='text/css'>
<style>
var user_id;
var checklist_id;
var device_type = 'glass';
function onGesture(name) {
WS.log('gesture: '+name);
if (name == 'TAP' || name == 'WINK') {
WS.log('tap');
advance();
} else if (name == 'TWO_TAP' || name == 'DOUBLE_BLINK') {
select();
@timothyclemans
timothyclemans / glass.html
Created April 23, 2014 10:24
[wearscript] WearScriptOS
<html style="width:100%; height:100%; overflow:hidden">
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
</head>
<body style="background:#000; overflow:hidden; margin:0; color:#FFF; margin:40px; font-size:40px;">
<div id="main"></div>
<script>
// 1. Display "Tap the touchpad to login with your QR code."
// 2. Scan QR code
// 3. Get password
@timothyclemans
timothyclemans / start_dual_video_screen_recording.sh
Last active August 29, 2015 14:00
dual_video_screen_recording.sh
adb shell am start -a android.intent.action.VIEW -d com.glass.videoglass:// --ez startFromWS true
adb shell screenrecord /sdcard/VideoBlack/screen.mp4
import os
import os
import signal
import subprocess
import shlex
#!/usr/bin/env python
import signal
import sys
def signal_handler(signal, frame):
#os.killpg(pro.pid, signal.SIGTERM)
@timothyclemans
timothyclemans / glass.html
Created April 27, 2014 04:59
[wearscript] adding to timeline
<html style="width:100%; height:100%; overflow:hidden">
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="https://rawgit.com/Glench/fuzzyset.js/master/lib/fuzzyset.js"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700' rel='stylesheet' type='text/css'>
<style>
body {
font-family:roboto;
font-weight:100;
@timothyclemans
timothyclemans / glass.html
Created April 28, 2014 04:15
[wearscript] facical
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0" bgcolor="#000">
<script type="text/javascript" src="http://yourjavascript.com/27943214444/ccv.js"></script>
<script type="text/javascript" src="http://yourjavascript.com/47473214320/face.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<p id="data" style="color: red; font-size: 30px; width: 100px"></p>
<canvas id="output"></canvas>
<script>
WS.log("starting");
image = document.createElement('img');
@timothyclemans
timothyclemans / glass.html
Created May 1, 2014 18:50
[wearscript] myo
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0; color:#FFF">
Myo2
<script>
function server() {
WS.myoPair(WS.myoTrain);
WS.gestureCallback('onMyo', function (x) {
WS.say(x);
});
WS.sensorOn('myoOrientation', .15, function (data) {