I was writing a Ruby script which runs shell commands on a remote server as part of a disaster recoveray. I needed to fetch the latest backup for S3. My solution was to use Fog to query the S3 API and use Ruby to figure out which was the most recent filename, then build a command to run on the server. In other words I figure out the command locally and then run it to the server.
But Guy had a better solution which ran server side:
1 2 3