Skip to content

Instantly share code, notes, and snippets.

@markolson
markolson / stream.sh
Created May 24, 2012 00:59
Play justintv streams in VLC
STREAM=`curl -d "channelname=$1&hoster=justin" http://bogy.mine.nu/sc2/stream2vlc.php | jshon -e 360p -u`
echo "rtmpdump $STREAM | vlc -" | pbcopy
echo 'now, paste, enter, play.'
@markolson
markolson / run.sh
Created May 10, 2012 15:35
Webdriver/Capybara runner.
if [ -f /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome ]; then
browser="chrome"
elif [ -f /Applications/Firefox.app/Contents/MacOS/firefox ]; then
browser="firefox"
else
echo "Neither Chrome nor Firefox found. Install one."
exit
fi
echo "This opens a screen session with several windows. Once testing is complete, exit all of them to return to this terminal"
DIR="$( cd "$( dirname "$0" )" && pwd )"
@markolson
markolson / gist:2571028
Created May 1, 2012 20:13
Horrible bash_profile ssh function for osx
# change terminal theme when I ssh into Important Things.
function ssh() {
local term_theme="Pro" #default
case ${@:(-2):1} in # start at 2nd to last paramter, take one.
*live-demo1*|*prod*|*prod-db*) # production
term_theme="Red Sands"
;;
*selenium*|*hudson*) # testing
term_theme="Silver Aerogel"
@markolson
markolson / selenium-runner.sh
Created September 2, 2011 00:20
a small bash script to kickstart all the processes needed for selenium testing on os x
# wget http://selenium.googlecode.com/files/selenium-server-standalone-2.5.0.jar
# wget http://chromium.googlecode.com/files/chromedriver_mac_14.0.836.0.zip
if [ -f /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome ]; then
browser="chrome"
elif [ -f /Applications/Firefox.app/Contents/MacOS/firefox ]; then
browser="firefox"
else
echo "Neither Chrome nor Firefox found. Install one."
exit