Using a Mac or Linux
Guess you have often wondered how to open a simple http server at the current location in the terminal?
Here is a one-liner that requires Python.
Execute in the Shell:
python -m SimpleHTTPServer
That will start a small http server on port 8000.
You may also specify a custom port at the end if you want.
python -m SimpleHTTPServer [port]
As often, I had a Ruby script for that as well. It was simple but this one-liner is really a killer.
According to Stackoverflow this is not working in Python 3. Instead you should write:
python -m http.server
Have not tested this however...