Pages

Wednesday, 9 February 2011

Downgrade from squeeze to lenny..

If you were distracted in the last 3 days and forgot that Debian 'stable' became 'squeeze' last Sunday, or just inadvertently issude 'apt-get upgrade' on your lenny machine, wondering why you had more than 200 packages to update, but still pressing Yes Yes Yes... well you have done the thing I did at least  on one of my servers...

But no problem, downgrading is easy in apt.

Just put:

Package: *
Pin: release a=oldstable
Pin-Priority: 1001
in /etc/apt/preferences and do again
apt-get update && apt-get upgrade
I was so lucky to have to force jsut one package
dpkg -i --force-overwrite /var/cache/apt/archives/sysvinit_2.86.ds1-61_i386.deb
 And reinstall one of them because apticron was failing the downgrade

apt-get install mktemp --reinstall && apt-get install apticron
Cheers

Tuesday, 25 January 2011

TomTom Go 750 and adding a simple microSD to it

So I was all happy about my new TomTom that I decided to upgrade the maps to the latest version (for free since it was the first time).

That turned out in an unbelievably long and painful operation.

First attempt. Connect the device to the computer and just push the upgrade button.

"You don't have enough space on the device. Choose what area you want to upgrade"

No, thanks I want the whole Europe Maps.

Go to the shop. Buy a 4G microSD.

Second attempt. Insert the microSD into the device. Connect the device, select the microSD "as the device" and push the upgrade button.

"You don't have enough space on the device. Choose what area you want to upgrade"

For God sake I have 4G free... couldn't you just select that automagically? No, uh?

Ok... let me see how those maps are stored there... ah just a simple directory...

Third attempt.

  • Take out the microSD and use the card reader to connect it to the computer
  • Connect the device.
  • Take a backup of the device.
  • Open the file browser.
  • Move the 'Europe_2G' maps to the microSD
  • Slap the microSD into the navigator
  • Turn on the device
  • Select Europe maps
  • Reconnect the device to the computer
  • Push the button 'upgrade'

HOORAY! The downloads start... 28 minutes...

"ERROR! You don't have enough space on your computer for temporary files"

WHAT!? I had 2.3G free... Ok let me remove something. Now with 7G free I can go.

  • Push the upgrade button again.

"ERROR! Map decoding error... blablabla"

Jesus!

Find the downloaded maps. Remove them.

  • Push the upgrade button again.

And finally after another 45 minutes... I had the maps upgraded.

So if you plan to do the same make sure you have at least 5G free because it looks like TomTom takes a backup before doing the upgrade...

Painful though I would work on improving this... Attila... Michal... you listening? ;)

Tuesday, 6 April 2010

Pasta alla bolognese (finnish recipe a la Stezz)

[This post is sponsored by Misha]

This is the way it's called all over the world even though we call it in Italy "Pasta al ragù" (the ragù is "alla bolognese").

It's mainly made of tomato and minced meat BUT not only of that (and this is basically the difference between the one you find in "JukkaPekka's restaurant" and a proper italian one).

INGREDIENTS for 4 persons
  • 1/2 onion
  • 1 carrot
  • a bit of persil
  • 1 glass of red wine
  • salt
  • extravirgin olive oil
  • 1.6Kg of sleeved tomatoes
  • 0.4 Kg of minced meat (naudanjauheliha)


PREPARATION
Slice carrot, onion and celery in thin slices. Put 1 dl of oil into a casserole just to cover the bottom and put the carrot onion persil and celery in. Start frying at low temperature until the onion gets yellowish.

Then throw the minced meat in and cook until it gets brown. At that point put the red wine and let evaporate.

Now it's time to raise the temperature and to put the tomatoes that you previously slightly pressed.

Add 1-2 dl more of oil if needed and cook for 30/40 minutes (this would pretty much depend on the temperature you are cooking at) stirring regularly. You will understand that it's done when the sauce reduced its quantity to half of the original one. At that point the meat will be 50% of the tomatoes (you started at 25%).

Add salt as you like.

Cook the pasta now and take it out one minute before you usually would and finish cooking it in the sauce.

Add parmigiano in big quantity.

Enjoy.

Spaghetti Bolognese - Michaelangelo, Aspendale...Image by avlxyz via Flickr

To give you an idea this is the desired result. You can see how all the pasta is red and cooked together with the sauce.








Spaghetti Bolognese with Ground BuffaloImage by 1JLS via Flickr

This is how it shouldn't look like, you can see the sauce on top of the pasta (and probably the pasta is like glue now...)









Reblog this post [with Zemanta]

Saturday, 30 January 2010

Italy vs. Finland (a statistical approach)

I've come across an economic measure called Gini index, the index is commonly used as a measure of inequality of income or wealth. A low Gini coefficient indicates a more equal distribution, with 0 corresponding to complete equality, while higher Gini coefficients indicate more unequal distribution, with 1 corresponding to complete inequality.

So I got interested in what the Gini coefficient might be in Finland and, as expected, it's not that high. But the most interesting thing is when it is compared to the italian one and its evolution during last years (unfortunately data is there until 2005 only).

It's incredible to see that after the introduction of the Euro in Italy the inequality has increased of 4 percent points while in Finland only of 2 points (with an absolute difference of 7%).

This basically means that after 2001 the rich are richer and the poor are poorer (and this is not big news). But more in Italy than in Finland.

Another quite interesting figure is the one that photographs the gross domestic product (GDP) per capita in purchasing power. GDP is a measure for the economic activity. It is defined as the value of all goods and services produced less the value of any goods or services used in their creation. The volume index of GDP per capita in Purchasing Power Standards (PPS) is expressed in relation to the European Union (EU-27) average set to equal 100. If the index of a country is higher than 100, this country's level of GDP per head is higher than the EU average and vice versa. Basic figures are expressed in PPS, i.e. a common currency that eliminates the differences in price levels between countries allowing meaningful volume comparisons of GDP between countries.

If we check this graph it's pretty evident (and also stunning) how after the introduction of the common european currency the average 'money to spend' of italians has been dropping like hell while in Finland remained mostly unchanged. With an end result of 15% difference between the two countries.

The whole post was an attempt to proof (mostly to myself) my personal perception that while in Italy people have less money to spend and there are still a lot of people that go around in a Ferrari, in Finland, while there are obviously poor and rich, the average guy can still live decently and the distance between poor and rich is not as unfair as in Italy.

(*) Data source:
Gini index
GDP per capita in PPS


Reblog this post [with Zemanta]

Sunday, 8 November 2009

Job at Maemo

In case you'd like working in Maemo, we're looking (also) for an IT specialist:

Wednesday, 14 October 2009

Debian packaging: Changing permissions and ownership of dirs

Regarding creating users and permissions our beloved Debian Policy [chap. 10.9] tells us:
...you must arrange for your package to create the user or group if necessary using adduser in the preinst or postinst script (again, the latter is to be preferred if it is possible).

I wanted to stick to the postinst since it's preferrable so I couldn't change the permissions in the rules file.

Now the thing is I need to give this user permissions for the dirs it will need to own/write and so on. I already have the dirs listed in debian/dirs and I don't want to hardcode anything else in the rules or in the postinst. Of course not being a so experienced debian devel I started to google but didn't find anything... asked around but nothing yet... so I hacked it in this way in the end:
debian/rules:
...
MYDIRS := $(shell cat $(CURDIR)/debian/dirs)
SUBME := $(foreach dir, $(MYDIRS), chown -R \$$the_user $(dir);)
SUBFRIENDLY := $(shell echo "$(SUBME)" | sed -e 's/\//\\\//g')
...
binary-indep: build install
...
dh_installdeb
sed -i -e 's/PLACEHOLDER/$(SUBFRIENDLY)/' $(DESTDIR)/DEBIAN/postinst
...
...

debian/postinst:
...
configure)
the_user="xyz"
#Creating the user if it does not exist
if ! getent passwd $the_user > /dev/null; then
adduser $the_user
fi

#Changing the permissions for the given dirs
PLACEHOLDER
...


(user=xyz can be easily changed to numeric ID)

I don't know if this is the 'standard' way to do it (nor if there is a standard way) but it's at least a way that worked... If anybody there can give me an hint on how to do it better, it would be really appreciated.

Friday, 2 October 2009

N900 and TV-out: I just love it


After I read the post of Urho about Wiimote+DrNokSnes+TVout I couldn't help trying it out right away (except the Wiimote thing that I don't have). That was a funny jump back in time to when I was young and passed the evenings at a friend's apartment trying to finish the (amazing at that time) Super Mario bros on the NES (I didn't have a NES myself).

Besides that I tried out for the first time in these months the TV-out. I never realized it was so amazing... after having that strange cable packed on my desk for a whole 2 months I got to really use it. And, even if at first it was just to play Mario, I realized that the N900 it's a full blown audio/video player that supports a lot of formats. So I just started to watch a TV show on the bus, arrived home and plugged it into the TV and finished watching the show there.

I mean it's amazing! 180 grams plus a cable and you have a multimedia station with 32G storage on board. I've been thinking to get some kind of media box lately... well I think I found it... it was in my pocket the whole time.