Yahoo! pipes

I really like the Flickr widget on WordPress, and as a Smugmug user I wanted to use that feed in there as well. This weekend I started playing with Yahoo! pipes and merged my Flickr feed with my Smugmug feed. But when I tried to use that feed with the Flickr widget, I either got just the title of the images or the “More Photos” link. I opened a forum topic to see if I can find out what the widget is lookig for in the feed.

What a difference a / makes

I’ve been trying to figure out why my image upload to smugmug using HTTP PUT wasn’t working for quite some time. I always got a “connection closed” error. After looking at this example more closely I finally realized what my problem was. I forgot the freakin slash. The upload url is supposed to be http://upload.smugmug.com/filename. My code looked like this:
conn = httplib.HTTPConnection("upload.smugmug.com", 80)
conn.connect()
conn.request("PUT", filename, data, headers)

This obviously generates the following url: http://upload.smugmug.comXXX where XXX is the value of filename. That’s just outright wrong. SIGH! But I fixed it and now my uploads work. Here’s the working snippet:
conn = httplib.HTTPConnection("upload.smugmug.com", 80)
conn.connect()
conn.request("PUT", '/' + filename, data, headers)

Now I can get back to finishing my XMLRPC to JSON migration of sm-photo-tool.

bash line wrapping problem

I noticed I was having a line wrapping issue with my bash prompt which really got annoying. It’s been at least a month and I finally decided to find a fix for it.

wrapping problem

My prompt in .bashrc is PS1="[\u@\e[0;31m\h\e[1;39m \W]: "
According to this post I need to wrap the escape codes with \[. So I changed my prompt to the following and all seems well: PS1="[\u@\[\e[0;31m\]\h\[\e[1;39m\] \W]: "

wrapped fix