Skip to content

Instantly share code, notes, and snippets.

View alexras's full-sized avatar

Alex Rasmussen alexras

View GitHub Profile
@alexras
alexras / Delaunay.pde
Created September 25, 2011 21:07
Quick-and-dirty Delaunay triangulation in Processing used to create http://youtu.be/dsrMjbR0usA
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)
{
@alexras
alexras / find_ppc.py
Created September 24, 2011 18:04
Search for PPC-only or Classic apps on a Mac
#!/usr/bin/python
import plistlib
import subprocess
ppc_apps = []
command = ["system_profiler", "-xml", "SPApplicationsDataType"]
task = subprocess.Popen(command, stdout=subprocess.PIPE)
@alexras
alexras / .screenrc
Created August 14, 2011 03:52
My .screenrc file
# 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
@alexras
alexras / default.xml
Created August 5, 2011 06:15
This file configures MAME to use four controllers (I use XBox 360 wireless controllers) as inputs
<?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>