Skip to content

Instantly share code, notes, and snippets.

View tshanks's full-sized avatar

tshanks

  • This is not where I keep my code.
View GitHub Profile
@tshanks
tshanks / Sample Template
Created March 4, 2011 10:49
Sakai T&Q to Assignments Converter
Homework NUM Tests and Quizzes Submission
Prof. NAME NAME NAME
SUBJ XXXX/YYYY – SEMESTER 20XX
Converted from Tests & Quizzes spreadsheet by [email protected]'s Sakai scripts
Your name (as in Sakai): $$$#First Name#$$$ $$$#Last Name#$$$
Your Sakai User ID Number: $$$#User Name#$$$
@tshanks
tshanks / pingtimes.py
Created March 4, 2011 11:01
quick script that automates scraping online ping tools and graphs the results (see comment below)
#!/usr/bin/env python
# Copyright (c) 2009 Thomas Shanks and the Georgia Institute of Technology
# Licensed under an MIT-Style (like BSD-style) free-software license; see complete notice at end.
#
# This script emulates the process described in Savage (et al.)'s IEEE Micro article
# "Detour: Informed Internet Routing and Transport" at http://doi.ieeecomputersociety.org/10.1109/40.748796 .
import os
from urlparse import urlparse
import re
@tshanks
tshanks / .bash_profile
Created August 14, 2011 13:32
.bashrc for Mac OS X - CLICOLOR for ls (etc) in color, set xterm window title, and color prompt
# Only for Mac OS X, where .bashrc is otherwise ignored
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
# MacPorts
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export MANPATH=/opt/local/share/man:$MANPATH
@tshanks
tshanks / com.apple.Terminal.plist
Created August 14, 2011 13:42
My Mac OS X 10.5 com.apple.Terminal.plist (black backgrounds, PgUp/PgDn/Home/End work, using ASCII codepage to avoid xterm-color backspace bug) exported as XML (need to convert it back)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Default Window Settings</key>
<string>Pro</string>
<key>HasMigratedDefaults</key>
<true/>
<key>NSColorPanelMode</key>
<string>1</string>
@tshanks
tshanks / .vimrc
Created August 14, 2011 13:54
The shortest vimrc I can possibly stand (minimal-vimrc)
" tshanks minimal vimrc
set backup
"set backupdir=~/vimbackups
set visualbell
set secure " disable trojan modelines (hopefully)
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
@tshanks
tshanks / .Xdefaults
Created August 14, 2011 16:57
xterm .Xdefaults for Mac OS X's awkward X11 server
# XDarwin only shares the CLIPBOARD properly with the rest of Mac OS X
# (the PRIMARY options don't work) and doesn't properly handle copying
# to multiple buffers (it manages to lose one of them). We only have
# one mouse button. For now, let's just use the good old menu option
# selectToClipboard, even though it breaks extending with the third
# mouse button we don't have.
xterm*selectToClipboard: true
# The OS X xterm doesn't set t_vb in vim, so we need to make the bells
@tshanks
tshanks / disable_osx_extended_attributes.sh
Created September 8, 2011 21:05
Mac OS X, stop sticking ._* extended-attribute and fork preservation files in my tarballs
# source me
export COPYFILE_DISABLE=true
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true