Skip to content

Instantly share code, notes, and snippets.

Avatar

Shaun Duncan shaunduncan

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am shaunduncan on github.
  • I am smduncan (https://keybase.io/smduncan) on keybase.
  • I have a public key ASC87EdDOV293PDN52z6dZPrfaUj1WnqS_HWi3q0lqOP5wo

To claim this, I am signing this object:

View battery_hearts.py
#!/usr/bin/env python
# -*- coding: utf8 -*-
import subprocess
from operator import itemgetter, methodcaller
def get_current_state(battery):
state = ''
pct = 100.0
View tmux_stats.py
#!/usr/bin/env python
# -*- coding: utf8 -*-
import subprocess
from operator import itemgetter, methodcaller
import dbus
def get_current_track():
View gist:d05f47167533a517af59
diamond 41115 diamond 3w REG 8,2 261385928704 0 9043981 /var/log/diamond/diamond.log.2015-03-28 (deleted)
View pecha_kucha.py
# The web server:
import SimpleHTTPServer
import SocketServer
PORT = 8000
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer(("", PORT), Handler)
View gist:7158256
package main
import "fmt"
import xmlx "github.com/jteeuwen/go-pkg-xmlx"
var demo = `
<document>
<collection>
<category>One</category>
<category>Two</category>
@shaunduncan
shaunduncan / gist:6904322
Created Oct 9, 2013
Move godep build binaries to $build/bin
View gist:6904322
# Add to end of bin/compile in heroku go buildpack
if test -f $build/Godeps; then
echo "-----> Checking for build artifacts from godep sandbox"
for dep in $(echo `godep path` | tr ":" "\n"); do
if test -d $dep/bin; then
echo " Moving: `ls -m $dep/bin`"
mv $dep/bin/* $build/bin
fi
done
fi