Archive for the ‘Bits and pieces’ Category

Western Digital HDD spin down problem in Mac OS 10.6

Saturday, January 1st, 2011

I’ve bought brand new Western Digital Scorpio Blue 750 GB SATA HDD for my MacBook laptop (as my secondary hard drive). It’s currently the maximum capacity you can get for standard height (9 mm), the 1000 GB model is taller and wouldn’t fit into my OptiBay which I use instead of CD drive.

There is one annoying issue with this drive in Mac OS and that is its aggressive power management which spin downs the drive immediately after last application stops accessing it. Not only causes this clicking sound every few seconds and excessive wear (spin up/down cycle count is limited), but also performance is really crappy, as application accessing the drive after spin down has to wait for drive to spin up again.
(more…)

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 iOpravna.cz 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?

JAVA:
  1. ...
  2. catch (Exception e) {
  3.     StringWriter sw = new StringWriter();
  4.     PrintWriter pw = new PrintWriter(sw);
  5.     e.printStackTrace(pw);
  6.     pw.flush();
  7.  
  8.     String stackTraceString = sw.toString();
  9.     //use the stackTraceString as you need...
  10. }
  11. ...

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: ImageManipulation.java

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().

(more...)

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 www.aboveeurope.com 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!

(more...)

openSuse 10.2 on Lenovo 3000 n100

Tuesday, January 9th, 2007

Installing openSuse 10.2 on Lenovo 3000 n100.

(more...)