Start a web server from your pwd using Ruby and Thin
Occasionally I'm interested in grabbing files from a directory on a remote host. This could be for another process to consume or to look at on my local work station.
The standard way of doing this is using scp, ftp or a file share. I prefer to start a short-lived web server that shares the file system.
To make this simple I use a ruby script to allow me to start a webserver from the directory I'm currently in.
As an alias for ~/.bashrc it looks like this:
This allows you to go to port 7777 on the host and retrieve the files you're interested in.
You will need to have the 'thin' and 'rack' gems installed to do this.