Skip to content

Instantly share code, notes, and snippets.

@scottrogowski
Created March 26, 2015 16:04
Show Gist options
  • Save scottrogowski/80c9a3d855431e2241f5 to your computer and use it in GitHub Desktop.
Save scottrogowski/80c9a3d855431e2241f5 to your computer and use it in GitHub Desktop.

Revisions

  1. scottrogowski created this gist Mar 26, 2015.
    5 changes: 5 additions & 0 deletions sharefolder
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    #!/bin/bash
    ip=`ifconfig -r en0 inet | sed -E '/en0/d;s/inet[ \t]([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+).+/\1/'`
    ip=`echo $ip | tr -d '[:space:]'`
    echo "The files in this directory are being served! Go to $ip:8000 in a browser on your local network. When you are done, use ctrl-c to exit"
    python -m SimpleHTTPServer 8000