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
# - A first approximation of using the keyboard as a trackpad | |
# - It uses curses/Xlib for input and mouse interaction, so if you don't | |
# have those you're going to have a bad time | |
# - This is only a proof of concept, sniffing X for keystrokes and | |
# finding out how to seamlessly pop in and out of | |
# keyboard-as-trackpad-mode is left as an exercise to the reader | |
# - It turns out this isn't a very good control scheme, given the | |
# limited vertical resolution (4-6 rows vs. ~12 columns), and that | |
# it additionally suffers from all the problems inherent in | |
# acceleration based control schemes |
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
/* | |
* phylactery.go | |
******************************************************************************* | |
* This is a small exercise, for making a program that will keep | |
* un-cooperative processes running when the processes are just lazy | |
* | |
* Do what you want with this code | |
*/ | |
package main |
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
\version "2.14.1" | |
\header { | |
title = "Firefly Theme" | |
} | |
<< | |
\new ChordNames { | |
\chordmode { | |
s2 |
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 serial | |
import time | |
# this is the port you're connecting to the irobot with | |
# on windows, this is something like COM2 | |
N = 2 | |
def ints2str(lst): | |
''' | |
Taking a list of notes/lengths, convert it to a string |
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 timeit | |
# introducing a C primitive to the Python namespace for fun and profit | |
# if you're familiar with the way Python-C modules are usually built, | |
# you'll notice this is abstracting way a bunch of things, | |
# which may or may not be possible | |
# syntax: C <ret_type> <name>(...<params>...) with {<header>: <library>} | |
C str fn_name(int something) with {'stdio.h': 'stdlib', 'math.h': 'm'}: | |
// blah blah blah |
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
#!/bin/bash | |
# execute from cron for github cheese! | |
# assume starting from ~/ | |
cd git/trivial | |
git rm * | |
r=`date | md5sum` | |
touch $r | |
git add . | |
git commit -m "$r" | |
# assumes you have master/origin configured |
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 | |
import os | |
import time | |
import random | |
rows, columns = os.popen('stty size', 'r').read().split() | |
columns = int(columns) | |
middle = columns/2 |
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
svn log | grep "^r[[:digit:]]\{4\}" | cut -f 3 -d " " | sort | uniq |
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/python | |
import time | |
import base64 | |
import hashlib | |
hash_out = base64.urlsafe_b64encode(hashlib.md5(str(time.time())).digest()) | |
print hash_out[:-2].replace('-', ',').replace('_', '.') |
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
#!/bin/sh | |
if [ -z "$(pgrep -fl selfspy)" ] | |
then | |
DISPLAY=:0.0 notify-send -u critical "Selfspy isn't running"; | |
fi |
NewerOlder