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"> | |
<canvas id="canvas" width="640" height="360" style="display:block"></canvas> | |
<script> | |
function cb(data) { | |
WSRAW.log('x: ' + data['values'][0] + ' y: ' + data['values'][1] + ' z: ' + data['values'][2]); | |
WSRAW.pebbleSetBody('x: ' + data['values'][0] + ' y: '+ data['values'][1] + ' z: ' + data['values'][2], 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"> | |
<script> | |
function server() { | |
WS.myoTrain() | |
// Currently one of {NONE, FIST, FINGERS_SPREAD, WAVE_IN, WAVE_OUT} | |
WS.gestureCallback('onMyo', function (x) { | |
WS.say(x); | |
}); | |
// Value is a quaternion (w, x, y, z) and (pitch, yaw, roll) for convenience |
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"> | |
<script> | |
function cb(channel, msg) { | |
var tree = new WS.Cards(); | |
tree.add(msg, ''); | |
WS.cardTree(tree); | |
} | |
function server() { |
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="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> |
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
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 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 | |
# | |
# .git/hooks/post-checkout | |
import sys | |
import subprocess | |
git_name = subprocess.Popen(("git","name-rev","--name-only", "HEAD"), | |
stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
branch_name = git_name.communicate()[0].strip('\n') | |
git_name.stdout.close() |
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
! Urxvt theme from: http://crunchbanglinux.org/forums/topic/9935/post-your-xdefaults-and-terminal-apps-colorschemes-with-screenshot/ | |
URxvt.perl-ext-common: default,matcher,tabbedex | |
!enabling clickable links: | |
URxvt.urlLauncher: /usr/bin/firefox | |
URxvt.matcher.button: 1 | |
!urxvt scrolling options and cursor style: |
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
# .zshrc mashup of davesdots and robbseaton | |
# "compile slow, run fast." - family motto | |
export CFLAGS="-O3 -funsafe-loop-optimizations -ffast-math -march=native -pipe" | |
export CXXFLAGS=${CFLAGS} | |
# export LDFLAGS=${CFLAGS} | |
# I think I speak for everyone when I say "fuck gcc" | |
alias cc="clang -Wall -Wextra -Werror" |
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
#include <stdio.h> | |
#include <string.h> | |
#define MAX_KEY 50 | |
#define MAX_HASH 10 | |
typedef struct node { | |
char key[MAX_KEY]; | |
int value; | |
struct node *next; |
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
Section "ServerLayout" | |
Identifier "aticonfig Layout" | |
Screen 0 "aticonfig-Screen[0]-0" 0 0 | |
Screen "aticonfig-Screen[0]-1" RightOf "aticonfig-Screen[0]-0" | |
Screen "aticonfig-Screen[1]-0" RightOf "aticonfig-Screen[0]-1" | |
Screen "aticonfig-Screen[1]-1" RightOf "aticonfig-Screen[1]-0" | |
EndSection | |
Section "Module" | |
EndSection |