Skip to content

Instantly share code, notes, and snippets.


Jonathan Duncan SunSparc

View GitHub Profile
fungus /
Created Mar 27, 2014
Automate the 2048 game with random moves. Utilizes term2048 python module.
SIZE = 4
import sys
import dbhash
import random
from time import time
from multiprocessing import Process, Queue
from import Game
nickrw /
Created Apr 19, 2013
volsay: Wrapper around OSX's `say' command, which sets the system volume to the requested level, then restores volume / mute state once speech is complete.
function usage() {
echo "usage: $0 <volume (0-100)> <say args...>"
echo "Unmutes and sets the system volume to volume%, passing the remaining"
echo "arguments to the OSX \`say' command, restoring volume / mute setting"
echo "to previous values after the speech has completed."
exit 1