Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
## Think Geek Code (controller) [ruby] def thinkGeek require 'rss' rss = RSS::Parser.parse(open('http://www.thinkgeek.com/xml/app/wishlist/id/<youridhere>').read, false) @output = "<p style='text-align: center;font-size: 110%; font-weight: bold;'>" + rss.channel.description + "</p>" @output += "<ul id='thinkgeek_update_list'>" rss.items.each_with_index do |item,i| @output += "<li><a href='" + item.link + "' title='" + cleanStr(item.title) + "'>" + item.title + "</a><br/><a target='_' class='timeStamp' href='" + item.link + "'></a></li>" end @output += "</ul>" rescue @output = 'Uh oh! Seems like something is wrong.. Try again later.' return @output end
This paste will be private.
From the Design Piracy series on my blog: