Archive for the ‘Bits and pieces’ Category

iOpravna & Apple rulez!

Wednesday, June 16th, 2010

After 1.5 years my Macbook battery capacity dropped suddenly (only after about 130 cycles). I’ve contacted to ask whether it would be possible to get the battery replaced under my 3 year NBD warranty and they’ve sent technician to test the battery (at my place).

Result is positive: I’ve got new battery (for free) that allows me to work 4 hours again!

Good job!

Java – print stack trace to a String

Thursday, February 25th, 2010

Simple and quick one today – what if we need to print stack trace into a String?


catch (Exception e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);

String stackTraceString = sw.toString();
//use the stackTraceString as you need…


Remote Mic now supports both Mac OS and MS Windows!

Thursday, November 19th, 2009

Remote Mix is application that turns your iPhone into a wireless microphone (or a bug).

Remote Mic for iPhone

Today, Remote Mic Console 1.3 has been released for both Mac OS 1.5.x and MS Windows XP.

More information here

GrowlTunes patch accepted

Tuesday, November 10th, 2009

My small GrowlTunes patch (described here) made its way into official release of Growl 1.1.5:

I am happy to have contributed to such a great piece of an open source software.

GrowlTunes 1.1.4 patch

Thursday, February 19th, 2009

I use and love Growl! and especially the GrowlTunes plugin which shows you track info when iTunes song changes.

What really annoys me, though – when listening to radio stream, it shows “(null).” instead of track number and there is also only radio name, not song name in the recently played songs menu.

I created small patch. Or download patched binary. Simply unpack and put into your Applications folder (replacing original GrowlTunes if present).

This is how it looked before:
GrowlTunes Before patchGrowlTunes Before patch 2

And this is how it looks like after patch:
GrowlTunes After patchGrowlTunes After patch 2

Quick ‘n’ dirty – manipulate GIF in Java

Tuesday, March 11th, 2008

I needed to directly modify pixel values of several images in a special way. First, I looked into Gimp’s Script-Fu functionality, but this seemed too complicated for what I needed so I decided to write such one-off utility in Java.

It simply reads all GIF images in specified directory, does some custom transformation of pixels, and then writes images back onto disk. It is really quick’n’dirty so be warned :-)

Source code:

Tweaking XOM parser – element position support

Tuesday, January 22nd, 2008

XOM parser is a great piece of code. I was missing just one feature – to be able to get position of element in source file (line and column). So I did a quick and dirty hack resulting in two new nu.xom.Element methods: getLineNumber() and getColumnNumber().


Serious new Google Analytics security problem

Thursday, May 17th, 2007

I ran into a really disturbing security incident in the new Google Analytics interface today. A friend of mine was making me able to see the stats of upcoming accommodation website and an error occurred during the operation. What a surprise for me it was when I could see the statistics of totally foreign website in my analytics account afterwards!


openSuse 10.2 on Lenovo 3000 n100

Tuesday, January 9th, 2007

Installing openSuse 10.2 on Lenovo 3000 n100.


Concurrent remote desktop on Windows XP

Thursday, December 28th, 2006

Small hack for Windows XP (SP 2) which allows several remote and one local user to work simultaneously.