Created
May 16, 2011 20:59
-
-
Save iamjwc/975362 to your computer and use it in GitHub Desktop.
Revisions
-
iamjwc revised this gist
May 16, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -13,4 +13,4 @@ echo $IP:$PORT | pbcopy echo Serving at $IP:$PORT # Start http server on port passed in python -m SimpleHTTPServer $PORT &> /dev/null -
iamjwc created this gist
May 16, 2011 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #!/usr/bin/env bash IP=`ifconfig | grep "inet " | grep -v "inet 127.0.0.1" | cut -f 2 -d " "` PORT=$1 if [ -z "$1" ] then PORT=8000 fi # Copy ip and port to pasteboard echo $IP:$PORT | pbcopy echo Serving at $IP:$PORT # Start http server on port passed in python -m SimpleHTTPServer $1 &> /dev/null