Skip to content

Instantly share code, notes, and snippets.

@timothyclemans
timothyclemans / gist:9284867
Last active August 29, 2015 13:56
windows installer
import os
import re
import urllib
user_profile = os.environ['USERPROFILE']
urls = ['https://github.com/OpenShades/wearscript/raw/dev/thirdparty/adb/windows/AdbWinApi.dll', 'https://github.com/OpenShades/wearscript/raw/dev/thirdparty/adb/windows/AdbWinUsbApi.dll', 'https://github.com/OpenShades/wearscript/raw/dev/thirdparty/adb/windows/adb.exe']
for url in urls:
print os.path.join(user_profile, re.search('(?P<filename>\w+\.[de][lx][le])', url).groups()[0])
urllib.urlretrieve(url, os.path.join(user_profile, re.search('(?P<filename>\w+\.[de][lx][le])', url).groups()[0]))
@timothyclemans
timothyclemans / glass.html
Created February 28, 2014 23:43
[wearscript]
<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://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>-->
<style>
/* recover from old-browser styling */
.oldbl {display: block !important;}
.oldin {display: inline !important;}
@timothyclemans
timothyclemans / glass.html
Created February 28, 2014 16:46
[wearscript] Hashtag tweets
<!-- hashtag tweets -->
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden;">
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700' rel='stylesheet' type='text/css'>
<style>
body {
background:#000;
color:#FFF;
font-family:Roboto;
font-weight:100;
@timothyclemans
timothyclemans / gist:9257112
Created February 27, 2014 19:18
Install ADB one liner on Mac
curl -L https://github.com/OpenShades/wearscript/raw/dev/thirdparty/adb/osx/adb > adb && chmod 755 adb
@timothyclemans
timothyclemans / glass.html
Created February 24, 2014 19:31
[wearscript]
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700' rel='stylesheet' type='text/css'>
<style>
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
@timothyclemans
timothyclemans / glass.html
Last active August 29, 2015 13:56
[wearscript] A tool for learning to talk concisely in a conversation
<!--{"r":"fqtn66CAYt9g5XATyDm59iFD2lRRkjmpfA0v09hZe04=","s":"ZGa3RCqfvD45QyG+vo8tJScvjePe9WxEKVH+ObJxzIs=","v":0,"h":"https://api.picar.us/wearscript"}-->
<!--https://plus.google.com/100378621884093522327-->
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700' rel='stylesheet' type='text/css'>
<style>
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
@timothyclemans
timothyclemans / glass.html
Created February 11, 2014 18:28
[wearscript]
<html style="width:100%; height:100%; overflow:hidden">
<head>
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700' rel='stylesheet' type='text/css'>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<!--<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>-->
<style>
/* recover from old-browser styling */
.oldbl {display: block !important;}
@timothyclemans
timothyclemans / glass.html
Created February 11, 2014 00:10
[wearscript]
<html style="width:100%; height:100%; overflow:hidden">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<head>
<style>
p {
font-size:40px;
color:#FFF;
}
</style>
@timothyclemans
timothyclemans / glass.html
Created February 9, 2014 03:43
[wearscript]
<!--{"r":"fqtn66CAYt9g5XATyDm59iFD2lRRkjmpfA0v09hZe04=","s":"ZGa3RCqfvD45QyG+vo8tJScvjePe9WxEKVH+ObJxzIs=","v":0,"h":"https://api.picar.us/wearscript"}-->
<!--https://plus.google.com/100378621884093522327-->
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700' rel='stylesheet' type='text/css'>
<style>
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
var oGet = jQuery.get;
jQuery.get = function() {
arguments[0] = 'http://www.corsproxy.com/' + arguments[0].replace("http://", "").replace("https://", "");
return oGet.apply(this, arguments);
};
var oPost = jQuery.post;
jQuery.post = function() {
arguments[0] = 'http://www.corsproxy.com/' + arguments[0].replace("http://", "").replace("https://", "");
return oPost.apply(this, arguments);