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
<?xml version="1.0"?> | |
<!-- This file configures MAME to use four controllers (I use XBox 360 wireless controllers) as inputs --> | |
<mameconfig version="10"> | |
<system name="default"> | |
<input> | |
<port type="P1_JOYSTICK_UP"> | |
<newseq type="standard"> | |
JOYCODE_1_YAXIS_UP_SWITCH | |
</newseq> | |
</port> |
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
# Screen Options ## | |
shell bash # Tell screen your default shell | |
startup_message off # Turn off start message | |
defscrollback = 5000 | |
shelltitle '$ |bash' # Dynamic window titled for running program | |
msgwait 1 # Set messages timeout to one second | |
nethack on # Turn on nethack error messages | |
backtick 0 0 0 whoami # Set "%0`" to equal the output of "whoami" | |
escape ^Oo |
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 plistlib | |
import subprocess | |
ppc_apps = [] | |
command = ["system_profiler", "-xml", "SPApplicationsDataType"] | |
task = subprocess.Popen(command, stdout=subprocess.PIPE) |
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
float dpLength(DelaunayPoint p1, DelaunayPoint p2) { | |
float deltaX = p2.x - p1.x; | |
float deltaY = p2.y - p1.y; | |
float deltaZ = p2.z - p1.z; | |
return sqrt((deltaX * deltaX) + (deltaY * deltaY) + (deltaZ * deltaZ)); | |
} | |
DelaunayPoint dpAdd(DelaunayPoint p1, DelaunayPoint p2) | |
{ |
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 | |
## in .bash_profile | |
SSHAGENT=`which ssh-agent` | |
SSHAGENTARGS="-s" | |
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then | |
eval `$SSHAGENT $SSHAGENTARGS` | |
trap "kill $SSH_AGENT_PID" 0 | |
fi |
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
{ | |
"emacs-21.3.tar.gz": { | |
"XML": { | |
"files": 2, | |
"comment": 106, | |
"code": 4262, | |
"blank": 91 | |
}, | |
"C": { | |
"files": 181, |
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 | |
with open("names.txt", "r") as fp: | |
for file_num, line in enumerate(fp): | |
track_num = file_num + 1 | |
artist, sep, title = line.strip().partition('-') | |
artist = artist.strip() |
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
(defun markupserve-resource-dir-for-buffer (buffer) | |
(concat (buffer-file-name buffer) "/../" (file-name-sans-extension | |
(buffer-name buffer)) | |
".resources")) | |
(defun markupserve-make-resource-directory () | |
(interactive) | |
(if (buffer-file-name (current-buffer)) | |
(let ((dirname (markupserve-resource-dir-for-buffer (current-buffer)))) | |
(make-directory dirname) |
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 | |
""" | |
Execute a child process, redirecting its output and error to files. If it's not | |
done after a predetermined number of seconds, KILL IT WITH FIRE | |
""" | |
from optparse import OptionParser | |
import shlex, subprocess, time, os, sys |
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 | |
# -*- mode: shell-script -*- | |
EXPECTED_ARGS=1 | |
if [ $# -ne ${EXPECTED_ARGS} ] | |
then | |
echo "Usage: git_prune_remote <remote name>" | |
exit 2 | |
fi |
OlderNewer