Skip to content

Instantly share code, notes, and snippets.

View kurtisnelson's full-sized avatar
🏠
Working from home

Kurt Nelson kurtisnelson

🏠
Working from home
View GitHub Profile
@kurtisnelson
kurtisnelson / post.md
Created February 17, 2014 15:28
Glass Design

#Designing Glassware

First off, if you haven't seen the official Glass Design guidelines, or one of Timothy Jordan's talks take a detour there now.

Last night I attended a Google Glass Design Sprint hosted by the Glass team. I've been working on various Glassware since July now, but this was the first formal design process I did for anything and I managed to learn a few things by putting myself in the mind of a designer.

##Principles

###Keep it Stupid Simple

@kurtisnelson
kurtisnelson / glass.html
Last active September 21, 2017 01:44
[wearscript] Display a live compass
<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>
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<h2>
<span id="lat"></span>,
<span id="lng"></span>
</h2>
@kurtisnelson
kurtisnelson / Gemfile
Last active January 1, 2016 16:59
Lockitron tools rake file. Make sure you have a valid OAuth token in your environment at LOCKITRON_TOKEN.
source "https://rubygems.org"
gem 'rake'
gem 'lockitron'
@kurtisnelson
kurtisnelson / html-copy.htm
Last active December 10, 2015 21:48
Spam Dissection
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>India rape suspects may be turning on each other</title>
</head>
<body bgcolor="#E8E8E8">
@kurtisnelson
kurtisnelson / sunbowl.sh
Created December 30, 2012 23:12
Submit fake votes to the sunbowl poll
#!/bin/bash
page=`curl -isS http://www.sunbowl.org/component/apoll/apoll/7-who-is-going-to-win`
secret=$(echo $page | sed -n -e 's/.*name="\([0-9a-z]*\)" value="1".*$/\1/p')
echo "Secret is $secret"
cookie=$(echo $page | sed -n -e "s/.*417=\([a-z0-9]*\); path=.*$/\1/p")
echo "Cookie is $cookie"
while [ true ]
do
@kurtisnelson
kurtisnelson / pa_vol.sh
Created July 13, 2012 02:31
PulseAudio Controls
#!/bin/bash
_full_line=`pacmd dump|grep "set-sink-volume"|grep "analog"`
_sink_vol=`echo $_full_line|cut -d" " -f3`
vol=$(( $_sink_vol / 655 ))
_full_line=`pacmd dump|grep "set-sink-mute"|grep "analog"`
_sink_mute=`echo $_full_line|cut -d" " -f3`
mute="%"
if [ $_sink_mute == "yes" ];
then
mute="M"
@kurtisnelson
kurtisnelson / aaaa-octal.php
Created June 6, 2012 05:50
AAAA for TinyDNS Function
$ip = $_REQUEST['ip'];
$ttl = 86400;
if(isset($_REQUEST['ttl']))
$ttl = $_REQUEST['ttl'];
$host = $_REQUEST['host'];
$ip_a = ip6Array($ip);
echo ip6AAAA($ip_a, $host, $ttl)."
";
echo ip6rDNS($ip_a, $host, $ttl)."
";