Once More... a farce in many parts. A comedy in others.

Daily Links for May 18th

Posted on May 18th, 2007 / comments

Daily Links for April 27th

Posted on April 27th, 2007 / comments

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.

Hack Notes

Posted on April 12th, 2007 / 6 comments

Things I have done in the last week or so:

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.

Daily Links for February 25th

Posted on February 25th, 2007 / comments

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.

Daily Links for October 6th

Posted on October 6th, 2006 / comments

Expect more of this sort of thing

Posted on May 6th, 2006 / comments

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.

The Fluff got less fluffy

Posted on April 30th, 2006 / comments

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.

Make Tabs Work Wordpress Plugin

Posted on April 26th, 2006 / comments

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.

Still awesome

Posted on March 27th, 2006 / comments

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.

I am awesome

Posted on March 20th, 2006 / 2 comments

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>

Wordpress is the new orange

Posted on March 19th, 2006 / 2 comments

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

Posted on July 6th, 2005 / comments

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.