The blog is not really topic specific. I will post random stuff which I find worth sharing. Solutions to little issues, tricks etc.

Friday, August 29, 2008

Sarah Palin - life time NRA member

The US elections don't fail to surprise and entertain me. Not necessarily in a good way. McCain has announced his running mate: US Governor from Alaska: Sarah Palin. Mother of 5 and life time NRA member.
Oh dear... the NRA in the seat of the White House. Presidential support of the NRA.... What's next?
Obama on the other hand is the strongest opponent of the NRA the NRA will have to face should Obama become the next president. Obama has great plans of changing and reverting the 2nd amendment. Closing 90% of gun shops, increasing the federal tax of guns by 500% etc. Nice. The states seem to refuse to learn lessons. Columbine, West Virginia etc... Why is it still so easy to buy guns?

Lovely US... can't drink beer in public, but you can buy a gun without a license. Geez, imagine somebody bought a gun while drinking beer! That would be a disaster!
Good thing beer in public is illegal...

Wednesday, August 27, 2008

Clinton's Speech at the DNC

Hillary Clinton held her speech yesterday, Aug 26, 2008 in Denver at the Democratic National Convention.
I thought her speech kicked-ass. The way she was presenting herself and the way she held her speech really impressed me. A Delegate said on CNN "this was a presidential speech". I totally agree with that Delegate. You could really tell, that is a senior politician, knows how to talk to a crowed, knows how to be on stage and present herself. Obama seems to be more of a junior politician to me. Obama needs to make sure that he has more than a great speech tomorrow. If he doesn't present himself presidentially, I am not sure, what the Delegates are going to do.

"No way. No how. No McCain." [H. Clinton]

"Animated" desktop wallpaper

A colleague of mine always has a neat satellite image of the north American continent on his desktop as his wallpaper, the desktop background.



So I had to get that too... He actually post-processed the image using ImageMagick do make it darker. Fortunately, I use KDE 3.5.9 (he uses gnome) and let kdesktop blend it with black so make it less intrusive. I actually use a vertical blend, so the image is darker at the bottom, which makes it better for my transparent task bar.

We download the image every twenty minutes and update the wallpaper. Here again, KDE lets me do that easily by using the slide show functionality... A slide show consisting of 1 picture. My desktop always shows the latest satellite picture of North America :)

Then he raised the bar again by archiving all downloaded images. He then rotated through all archived images (past 2 days) and updates the wallpaper every 2 seconds.
Obviously, I had to do that too....

Need two scripts for that

  • The first one is ran as a cronjob, every twenty minutes. It downloads the image, appends a date string to it and checks whether the image has changed (if no, delete the old one).

  • The second script is ran manually and can be sent into the background.
    It loops through all images and sets the wallpaper to the next picture after 2 seconds.


In order to set the wallpaper using a script, I use the dcop call to kdesktop:

dcop kdesktop KBackgroundIface setWallpaper 1 $filename 6

I do that for all 4 desktops. Unfortunately, kdesktop eats my here, so I had to decrease the sleep time between changing pictures from 1 second to 2 seconds.

Does anybody know of a faster way to set the background image?
xsetroot does not work, as the window manager takes control of the background.

As you will notice, the script downloads two other IR images of Eastern Canada and Eastern USA. I was hoping, I could set the image for the left and right head of my monitors individually, however, it seems that the KBackgroundIface does not provide that functionality.

Wednesday, August 20, 2008

post-review

While creating a presentation for my company about review-board, I started playing around with the tool post-review.
post-review is a command-line tool (python script) with which you can
- create a new review request
- update a diff of an existing review
- create a review request of already committed code using the -rRev1:HEAD syntax.

Loving it!

Here is how to use it:
http://code.google.com/p/reviewboard/wiki/Using_PostReview

And here is the actual script
http://reviewboard.googlecode.com/svn/trunk/reviewboard/contrib/tools/post-review