- Set Gmail as Default Mail Client in Ubuntu
- FeedWordPress: "…an Atom/RSS aggregator for WordPress. It syndicates content from newsfeeds that you choose into your WordPress blog." Slick. On second thought, a bit too complicated for what I do at rhyley.org.
- Scott Hurring: Code: Python: PHP Serialize implemented in Python: v0.4b: This is a python implementation of PHP’s native serialize() and unserialize() functions.
Seeing as how I haven’t played a PC-based game in over three months, and having realized that The GIMP does everything that I ever actually use Photoshop for quite well (and do not. even. get me started on iTunes), today I installed Ubuntu. If you know me at all, you know that what followed was a ten-hour hacking session. And so: my first shell script replaces your desktop background with a random fave from flickr. Whee!
#set u to your user id (on your system)
u="jrhyley"
#set f to your userid OR username (on flickr)
f="11349677@N00"
cp /home/$u/pic.jpg /home/$u/pic.bak.jpg
# php source of the server-side script, if you want to host it yourself: http://dev.rhyley.org/randfavedesktop.txt
wget --output-document=/home/$u/pic.jpg http://dev.rhyley.org/randfavedesktop.php?u=$f
x=$(stat -c %s /home/$u/pic.jpg)
if [ $x < 2901 ]
then
mv -f /home/$u/pic.bak.jpg /home/$u/pic.jpg
fi
gconftool-2 -t str --set /desktop/gnome/background/picture_filename /home/$u/pic.jpg
gconftool-2 -t str --set /desktop/gnome/background/picture_options "zoom"
I’m enjoying Ubuntu a great deal so far. I had run a few livecd distros in the past to sort of dip my feet in, but I never found one that I thought I could use on a daily basis until now. Updates as events warrant.
Update 11 May 2007:Updated shell script to avoid blank images, and for ease of configuration.
Update 13 May 2007:Updated shell script to fix bug — I’m still learning this bash stuff.
Things I have done in the last week or so:
- Turned my MySpace page into a tumbleblog (cooler non-myspace version here) to try to funnel some of my friends who live on myspace out into the actual internet. This is all powered by standard PHP5 with lastRSS.
- PHP script to provide an RSS feed of your weekly last.fm charts. It just displays the most recent week’s charts, but that’s enough really. Useful for, say, including the charts in your tumbleblog. [source]
- Updated Flickr Photo Page Enhancer greasemonkey script. Changes to flickr site = changes to script.
I’ve also worked 43 hours as of Thursday, and also, excitingly, my car blew up. Which means lots of exciting meetings with loan officers at my bank as they try to find polite ways to say “have you actually seen your credit report, fool?” So I don’t know what else you might want from me, but you ain’t getting it. I’m going to bed now.
- Last RSS - PHP RSS parser/reader: Dead simple (one file) alternative to Magpie. Does not speak atom, among other limitations, but perfect for a couple of my projects.
Are you one of those rare people, like me, with both a myspace page and a twitter account you bother updating? Want twitter on your myspace page? Or do you just want to put your twitter somewhere that’s not compatible with twitter’s own JSON powered badges? Well, if you have 1) a webhost, and 2) that webhost has php, here is your answer. You can see that code in action on my myspace page. Pretty!
There’s also this thingy if you prefer something with a slightly lower barrier to entry — just put in your username and it works. Though the results are, in my admittedly biased opinion, not as pretty.
- Flickr Services: Serialized PHP Response Format: Spent today rewriting several of my flickr hacks to utilize this, and I think I’m in love.
- Top 10 Reasons Why Your 5 Tips About 7 Cutting-Edge Technologies will annoy me | A Whole Lotta Nothing: “Cool it with the lists. Feel free to use real paragraphs and explain stuff. I have time.” w3rd.
So I was bored at work tonight, despite my new cellphone and data plan combined with Bloglines mobile, so I decided to create a mobile version of Flickr Interestingness. Total amount of time it took me to write this: 20 minutes. I ♥ the Flickr API.
You’ve probably noticed that I’ve quit posting my photos and favorites from Flickr (quick, think of an f-word…) to the front page. It just started to seem like filler, and I am very anti-that, being someone who reads or at least skims something like 150 newsfeeds daily. The links, however, still get posted, as I always thought that sort of content should live in the main column anyway.
But pushing my photos back to the sidebar does present me with a quandary, though, in that I really enjoyed showing off my Flickr favorites in that way. I’ve always taken a wee bit of pride in my curatorial capacity over that collection of photos, and I have a love for each and every one of them. So, I now offer an Atom feed for those who really want to have their feedreaders spammed with my favorite photos. Everybody’s happy!
For those of you keeping track at home, I now have feeds for entries, comments, links, photos, and favorites, as well as for every single post on the weblog (right now: 1,042). So that works out to about, say, a billion feeds out there in the world, some in multiple formats, as a result of my daily activities.
So much for being against filler.
That code from bitprophet that makes tab key presses work in textareas was tempting me, so I made it into a wordpress plugin. Download it, or or see here for more info about how to install and activate a plugin in wordpress (this is sounding familiar…). The plugin adds bitprophet’s javascript code to the post editing page as well as the template/plugin editor.
So I fixed my problem with wordpress’s blogger importer script with one line of SQL and a fairly simple PHP script. Being a complete SQL n00b, I backed up my database first anyway. Here it is: SELECT ID, post_content FROM wp_posts WHERE post_title REGEXP '[0-9]{18}' That was it. I’m starting to like this stuff.
That ‘Daily Fluff’ entry is the result of a script I wrote. It pulls my photos and favorites from the Flickr API, my links from the del.icio.us API, and when webcron tells it to run, turns all that into a post on my blog. I’m eventually going to add items & reviews from my junklog account, as well. This took me two days to do, primarily because I was at first trying to use Wordpress’s XML-RPC interface to create the post, with very little in the way of success, until I realized I was being stupid. It is much (much, much) easier with a db-driven app like wordpress to just insert the post directly into the database with PHP. Of course, I had to learn how to do that first.
In other words, yes, so far I’m having fun with wordpress. <glee>
Yeah, I converted, and it was crazy easy with the importers they have now. Beating this beast into a form more pleasing to myself, though, is going to take a bit longer.
Already I don’t like that all of the posts I imported without a specific title defaulted to their unix timestamps. I found a couple of places where I was able to hack it into displaying something else instead of the ugly 18-digit number, but I’ve yet to find the silver bullet that will fix this problem everywhere titles show up in wordpress (which is a lot of places). If anybody could point me at the specific function in wp, it’d be appreciated.
One success story so far is that I got category lists to use proper grammar. This is why below you will see this post is tagged “wordpress, hacks and php” instead of “wordpress hacks php”. The relevant function is get_the_category_list, ask me how if you’re interested. And yes, I really am this anal about small details like that.
Further updates as events warrent.
More noodling with the My Web API: My Web tag cloud for URL does pretty much what it says. Surprisingly, this isn’t a built-in feature of My Web (…yet). It’s limited to the top 50 tags for a given URL. View the tag clouds for Flickr or Yahoo 360° for a demonstration.
As everything must have a bookmarklet: Y! My Web Tag Cloud.
Update: For an example of tags from bookmarks not marked as public showing via the API, see the tag cloud (such as it is) for my blog.

