Another little bit of somewhat useful code: bloglinesosd.rb. It’s pretty basic - it checks bloglines for unread entries and displays a count using the xosd library. Enjoy, and as always have the appropriate amount of fun.
Del.Icio.Us Auto-Complete - another awesome greasemonkey user script; provides autocomplete for your tags when using the del.icio.us bookmark service.
I’ve been playing around with Ruby for a while, and finally came up with something useful: rflick.rb, an uploader script written in Ruby. (You can definitely pick your language when it comes to command line uploaders.)
The actual development of the script was fairly easy: ruby’s built in support for option parsing, YAML, and XML made things simple. The only irritating part was the HTTP POST of the image file, which I found is not supported by the ruby’s (otherwise excellent) standard http lib. (In case you think this an unreasonable expectation, perl does this.) A rousing bout of googling lead me to this, which I used to extract a reasonably generic multipart/form-data helper class.
This is the first public release, so please let me know if you use it and if you discover any problems. If you’re a developer looking for the rest of the flickr API in Ruby, you want this. (Which I initially found here, which lead to the creation of the upload script. And now you know… the rest of the story.)
I thought this greasemonkey userscript, which automatically ignores stories about Michael Jackson in the reuter’s feed in bloglines, was pretty clever, but it’s not nearly agressive enough about hiding things I don’t want to know about. A wee bit of hackery later, I present: Mental Health Through Ignorance, a greasemonkey script that will hide any stories matching specified strings. A link is provided if you want to risk your zen state and read the hidden story.
By default, anything with the strings ‘michael jackson’ or ‘scott peterson’ are ignored. If you want to change this script to alter the strings that will trigger the hiding behaviour, here’s what you do:
var toMatch = ["michael jackson", "scott peterson"];
var toMatch = ["michael jackson", "robert blake", "oj simpsons"];. The rule is to put the bits you want matched between quotes, with the bits separated by commas. (Aside to people who know what they’re doing and are wondering about using regexps: go crazy. Whatever you put in the array is compiled to regexp objects and used as the matcher.)
Happy blissful ignorance!
Update: A wee bit of tweaking: the text informing you of a hidden story now gives you the matched text. Fixed problem where multiple matches meant you couldn’t view the story (although really, you probably shouldn’t).
PS: I am a complete neophyte when it comes to JavaScript and DOM; using this code as an example of how to do things is probably unwise with a capital UN.
It’s always a pleasure to find a tool that is easy to try out, and XPath Explorer certainly fits the bill: download a jar, run it with java -jar, and you’re testing XPath expressions. No dependency hell, no tracking down libs from a thousand sourceforge and jakarta sites. Nice.