Skip to content

Instantly share code, notes, and snippets.

@tsibley
Created September 21, 2011 15:58
Show Gist options
  • Save tsibley/1232459 to your computer and use it in GitHub Desktop.
Save tsibley/1232459 to your computer and use it in GitHub Desktop.
#!/bin/bash
# We use --host localhost by default so that Regexp::Common matches
plackup --host 0.0.0.0 -R share,static,web "$@" 3>&1 1>&2 2>&3 \
| perl -MRegexp::Common=URI -wne 'system("gnome-open", $1), $spawned++ if not $spawned and /($RE{URI}{HTTP})/; warn $_;'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment