Serve a Directory with Ruby
Quickly serving a directory using PHP, Node.js, or Python allows for quick testing with as little hassle as possible. Imagine having to stand up apache or another server just to serve a directory -- gross! Since I had touched the three important languages, I looked to Ruby, a language I have very little experience with.
It turns out that serving a directory with Ruby is as easy as the other languages:
ruby -run -e httpd . -p 8080
-p argument obviously represents the port, so hitting
localhost:8080 will get you to the served directory!
I get asked loads of questions every day but I'm always surprised that they're rarely questions about code or even tech -- many of the questions I get are more about non-dev stuff like what my office is like, what software I use, and oftentimes...
Back in late 2012 it was not easy to find open source projects using
The idea of image preloading has been around since the dawn of the internet. When we didn't have all the fancy stuff we use now, we were forced to use ugly mouseover images to show dynamism. I don't think you were declared an official...