Skip to content

Instantly share code, notes, and snippets.

View gist:9495557
### Keybase proof
I hereby claim:
* I am theepicsnail on github.
* I am theepicsnail (https://keybase.io/theepicsnail) on keybase.
* I have a public key whose fingerprint is FA28 EB5B BC2C 77CE A838 612D FC6E 54FC 9668 47E1
To claim this, I am signing this object:
@theepicsnail
theepicsnail / glass.html
Created Mar 28, 2014
[wearscript] Multi device attempt
View glass.html
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<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 server() {
@theepicsnail
theepicsnail / glass.html
Created Apr 29, 2014
[wearscript] Slide show example
View glass.html
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<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" bgcolor="#000">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
var words_per_minute = 300
@theepicsnail
theepicsnail / glass.html
Created May 3, 2014
[wearscript] Speed reader
View glass.html
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<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" bgcolor="#000">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
var words_per_minute = 300
View watch.sh
alias watch="bash ~/watch.sh"
# watch foo.js bar.js -- ./runTests.sh
# runs runTests.sh, then waits for foo.js or bar.js to be modiified
# then reruns runTests.sh (kills the old process if it's still alive)
View flux2.py
import subprocess
#figure this stuff out automatically?
left,top = 58, 478
right,bottom = 1020, 1440
cell_size = 186
height = (bottom - top)
width = (right - left)
gap = (width % cell_size)/(width/cell_size - 1)
View gist:dc1dcddb0051ab9e5f16
import subprocess
#figure this stuff out automatically?
left,top = 58, 478
right,bottom = 1020, 1440
cell_size = 186
height = (bottom - top)
width = (right - left)
gap = (width % cell_size)/(width/cell_size - 1)
@theepicsnail
theepicsnail / watch.sh
Created Jan 16, 2015
Monitor files, rerun script when they are modified
View watch.sh
#!/bin/bash
# find --
split="-1"
for (( i = 0; i < ${#@}; i++ )); do
if [ "${!i}" == "--" ]
then
split=$i
i=${#@}
fi
done
View config
set $mod Mod4
set $alt Mod1
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
bindsym $mod+F5 exec --no-startup-id i3-msg restart
View gist:f3ee120f2bb6274bc141
server {
listen 80;
server_name ~^(.*).theepicsnail.net;
root /home/snail/public_html/$1/;
charset utf-8;
location / {
autoindex on;
}
}