Thursday, April 30, 2009

Calibre: open source to the rescue

About six month ago I bought my wife Sony PRS-505 eBook reader for her birthday. She uses it mainly to read Russian books. My home computer is dual boot Ubuntu/Windows machine, Ubuntu being the primary OS. When my wife downloads Cyrillic books they are in fb2 format and I prefer lrf for Sony Reader. So what I've been doing is sending downloaded books to my Dropbox and picking them up and converting once I am in Windows. Yes, I could have told my wife to use Windows when she downloads books, but I rather she uses Ubuntu, for obvious reasons.

Today I decided that this is enough and started looking for what is available on Ubuntu - I found Calibre. This is exactly what I was looking for! Calibre does exactly what I wanted - catalog my eBooks, convert between different formats and tons of other things that I have not tried yet. Open source wins again!

Tuesday, April 28, 2009

Harvesting eclipse icons

Found this useful script here. Pasting it here so I don't loose it. Really useful stuff.

export CVSROOT

mkdir -p eclipse
cd eclipse
cvs -q co org.eclipse.debug.ui/icons
cvs -q co org.eclipse.pde.ui/icons
cvs -q co org.eclipse.jdt.ui/icons
cvs -q co org.eclipse.vcm.ui/icons
cvs -q co
cvs -q co org.eclipse.ant.ui/icons
cvs -q co
cvs -q co org.eclipse.ui/icons
cvs -q co org.eclipse.ui.views/icons
cvs -q co org.eclipse.ui.console/icons
cd ..
rm -f ~/public_html/
find eclipse -name "*.gif" -print | zip ~/public_html/ -@

Thursday, April 23, 2009

Fast Ubuntu server

Whenever I try to download new Ubuntu release, fast download server is the key to enjoy the OS goodness. seems to be the fastest one I've seen at 3-4 MB/sec.

Monday, April 20, 2009

Zooming in GEF Editor and Connections

Recently I was faced with an issue in GEF Editor where when I was making a connection between to figures and scaling was less than 100%, the connetion feeback would be shown relative to figures coordinates at 100%. I like this kind of problems because you are not quite sure where the problem is; do I have to do coordinate translation? Get new coordinates of figures taking scaling in consideation? Who knows? Luckily the solution was pretty easy: override getFeedbackLayer() method in GraphicalNodeEditPolicy:

protected IFigure getFeedbackLayer() {
return getLayer(org.eclipse.gef.LayerConstants.SCALED_FEEDBACK_LAYER);

That is all, pretty easy-peasy, no?

Friday, April 17, 2009

Eclipse CNF filters

Recently I needed to apply a filter to a third party view. I could not easily work with given view because I did not have source code available and had to rely on reflection to add needed filters. At first I implemented org.eclipse.ui.startup to find the view and apply the filter - however this did not work as I wanted. Luckily the view relied on CNF and I was able to use org.eclipse.ui.navigator.navigatorContent to insert my filter without any need for reflection or searching view of interest.

Tuesday, April 14, 2009

Dropbox failed to connect in Ubuntu 9.04

I upgraded to Ubuntu 9.04 yesterday - everything went smooth except Dropbox was not connecting. I've become some attached to Dropbox that I don't use my flash driver anymore. Clearly I was upset, but thanks to Google and this post, I got everything working again and can happily shift files between computers with ease. Ahh, life is good.

Blogger Syntax Highliter