Skip to content

Instantly share code, notes, and snippets.

View SunSparc's full-sized avatar

Jonathan Duncan SunSparc

View GitHub Profile
@fungus
fungus / win.py
Created March 27, 2014 23:04
Automate the 2048 game with random moves. Utilizes term2048 python module. https://github.com/bfontaine/term2048
#!/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 April 19, 2013 12:43
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.
#!/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
}