Skip to content

Instantly share code, notes, and snippets.

Avatar

Jonathan Duncan SunSparc

View GitHub Profile
@fungus
fungus / win.py
Created Mar 27, 2014
Automate the 2048 game with random moves. Utilizes term2048 python module. https://github.com/bfontaine/term2048
View win.py
#!/usr/bin/python
SIZE = 4
import sys
import dbhash
import random
from time import time
from multiprocessing import Process, Queue
from term2048.game import Game
@nickrw
nickrw / volsay.sh
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.
View volsay.sh
#!/bin/bash
function usage() {
echo "usage: $0 <volume (0-100)> <say args...>"
echo
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
}