Yes. It's like a ghetto SCP for giving files to people on windows who don't have SCP. You can use it for basic web functionality, you can use it (carefully) as a mechanism for testing or serving test results. I wouldn't keep it running for days, but it's an amazingly useful tool.
I use it quite a lot to move files between my computers, stream content to my phone, test out web designs. I suppose it's like net cat, it's useful for some. I think "toy server" is fairly accurate, I can't see anyone using this in production but I can't see people installing nginx on their laptops either.
Our build process automatically generates a directory tree of HTML-formatted unit test coverage reports. Sometimes it's nice to be able to share links to those reports in a code review. I use python SimpleHTTPServer for that.
It does not support large files, so sometimes I have to fall back to https://npmjs.org/package/http-server
(npm -g install http-server .. then just run http-server /path)
A new one for me I accidentally found the other day..
If you use Spotlight to find something and then want to see the file in Finder, Cmd+click the item in the Spotlight dropdown. Edited from Cmd+shift+click due to note in child comment :-)
oo! As long as we're sharing our favourite terminal tips, here's mine: In your .bash_profile, add this line:
alias imgsz='sips -g pixelWidth -g pixelHeight' sips stands for "scriptable image processing system"[1], and provides terminal users with a toolset for inspecting and manipulating images. The alias above is really useful for web developers who need a quick look at how big a given image is:
Comments (395) 107 threads
Earlier commentsOS X comes with apache preinstalled though
Continue this thread — 1 reply
For pretty-printing without modification,
Or Ruby: ruby -run -e httpd .
If you use Spotlight to find something and then want to see the file in Finder, Cmd+click the item in the Spotlight dropdown.
Edited from Cmd+shift+click due to note in child comment :-)
alias imgsz='sips -g pixelWidth -g pixelHeight'
[1] https://developer.apple.com/library/mac/documentation/Darwin...sips stands for "scriptable image processing system"[1], and provides terminal users with a toolset for inspecting and manipulating images. The alias above is really useful for web developers who need a quick look at how big a given image is:
All comments shown.
Couldn't load more comments. Check your connection and try again.