Skip to content

Instantly share code, notes, and snippets.

@brunogama
Created May 22, 2012 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunogama/2771443 to your computer and use it in GitHub Desktop.
Save brunogama/2771443 to your computer and use it in GitHub Desktop.
Runserver with the interface IP (for Parallels VM testing) OSX Only
runservervm() {
interface=$1
if [ -n "$interface" ]; then
interface=$1
else
interface='en1'
fi
internalIP=$(ipconfig getifaddr ${interface})
echo "http://${internalIP}:8000" | pbcopy
python manage.py runserver ${internalIP}:8000
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment