As I couldn't find a comprehensive example that simply uploads files to Rackspace CloudFiles, and gets the public CDN URL, I thought it would be good to make one available.