Archive for March, 2007

Why my ruby sucks

March 22, 2007

I’ve been wondering why my ruby’s so poor and why I am so slow at it. I just read a blog the other day and now I know … the reason is WHY.
Anyway, now i am finally reading the Poignant Guide. Hopefully you’ll see better code in some distant future.

Quote of the … Year ?

March 22, 2007

ie_hack: Internet Explorer is the worst piece of crap to have ever been written, with the possible exception of Windows itself. Since IE is unable to parse proper XML, we have to provide a hack to generate XML that IE‘s limited abilities can handle. This hack inserts a space before the /> on empty tags. [...]

Getting Categories using Unix Blogger

March 19, 2007

Aaah! In order for labels to be displayed on Google’s Blogger the scheme needs to be mentioned too.
<category scheme=”http://www.blogger.com/atom/ns#” term=”blogger”/>
Now labels will come through while blogging with blogger.sh.
~~~
Feeling amorous, she looked under the sheets and cried, “Oh, no,
it’s Microsoft!”

Inconsistencies in Unix programs

March 19, 2007

I use the command-line all the time, as well as ruby and Vim. I also use regular expressions all the time.
With all the brains going behind the various unices/unixes one would expect consistent handling of regexes across various unix programs on one system.
While vim does take “\d” in place of [0-9], however, it requires escaping [...]

Simple Drupal Blog Poster (ruby xmlrpc)

March 19, 2007

After yesterday’s struggle getting ruby 1.8.5 to do a post with drupal, today i quickly put together a simple drupal poster. It posts a new post, and can update the same.
Its a Simple poster in the sense that it takes a file in the following minimal format:
first line is subject
rest is content.
In the case of [...]

feedvalidator and drupal xmlrpc

March 18, 2007

I had hoped to validate feeds for being proper XHTML before pushing them to Google’s Blogger.
Tried feedvalidator on the XML feeds and entries returned by Google’s Blogger. Feedvalidator throws up errors on all Blogger’s XML feeds ! So that’s out.
Spent some hours trying to push an XMLRPC request to Drupal. I tried various of the [...]

A ONE-line signature rotator

March 16, 2007

If you have a file with quotations, verses or whatever that you would like to print out like the fortune program or rotator, you need do only the following:
1. break the file in to multiple files, one for each quote, or verse.
perl -pe ‘BEGIN {$n=1} printf ” — Author’s name\n” and open STDOUT, “>$ARGV.$n” [...]

Power Blogging from Unix (and Vim)

March 15, 2007

The benefit of using a unix shell (Unix/Linux/Mac OS X) for blogging is not just that one can use one’s favorite editor, such as Vim, or even something absolutely freakingly great such as html.vim, but also …
One painful part of blogging can be creating hyperlinks. There are links in your browser bookmark file, and links [...]

Migrating a WordPress blog to Google Blogger

March 14, 2007

WordPress is such a lovely Blog System, but in case you wish to have a parallel blog on Google’s new Blogger, you might like to try out this free ruby program which can do the job in one stroke.
All you need to do is go to your WordPress dashboard, Export and export an RSS XML [...]

multi-blog blogging with Curl

March 12, 2007

Finally, the multi-email multi-blog version of the Blogger for Google’s blog is ready for a release. A lot of changes have happened since the past release. Still some to iron up…
Getting the blogger to work with multi-blogs was no issue at all. But then i started using XSL for formatting the incoming XML. Seemed nice, [...]