Created
July 19, 2012 22:56
-
-
Save ricktessner/3147439 to your computer and use it in GitHub Desktop.
Macosx Shell function to open xip.io url for current application
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
# Assumes wireless interface on en1. If arg is supplied, will try to open that POW app | |
xip() { | |
local ip="$(ipconfig getifaddr en1)" | |
local app="$1" | |
if [ -z "$1" ] ; then | |
app="$(basename $PWD)" | |
fi | |
open http://${app}.${ip}.xip.io | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment