Cristian Livadaru's Blog

My personal view on things

The bad and ugly GOTO

In school you learn to never ever use GOTO in your programs, since in real life things turn out to be much different then in school it’s not quite practicable. I was looking for GOTO in Bash and came across this statement

Quote: Originally Posted by gnashley Not a good idea to use GOTO in BASH. Try using a while statement instead, or use functions.

And this was the reply


Krapfenwaldlbad - Swinming with a great view over vienna

Where can you go cool down when it’s hot in Vienna? Well there are a lot of places, but one that you should visit is Krapfenwaldlbad The swimming pools are not really great, but the view will compensate for that. Anyway, I wouldn’t go to often there since it’s to crowded in the small pool. But look at the photos and decide for your self.


Weather gone crazy

Yesterday we had “a bit” of a thunderstorm in Vienna. Winds up do 120km/h killed 2 people and ripped trees apart within some minutes. Luckily I came home just as the wind started it’s action.

read more in derStandard (Austrian newspaper, also with a small video)

More blogs on this issue:

http://blog.myspace.com/index.cfm?fuseaction=blog…


HowTo install openfire (former wildfire) on Debian

Note: This has been done on a Debian Sarge installation but it should work on Etch also, I will report if it does once I have done it, sometime this week. I found this post on howtoforge and it helped me alot.

First you need Java JRE, lucky me I had a deb package on my server from some other tests so I didn’t need to create a new JRE deb package. Follow this howto to create a debian package so you can install JRE the debian way. Once you installed the JRE you can continue with openfire.


Back in Shanghai

Finally we are back in Shanghai. We left Beijing yesterday, again with the night train. The only problem we had this time was finding the train. The taxidriver didn’t speak a word in english but we managed to tell him that we want to get to the train station and arrived pretty quick. Now it was time to enter the station, there are 3 doors open and about 10 dozens of people pushing and trying to get in. After the security check, which from my point of view is useless since I entered with a small bag without putting it trough the X-Ray, we where in the main hall. Huge panels showing all trains and of course everything in chinese. But we saw Z13, the name of the train, and 2 … oh yes, the titles where written in english also, so 2 was for the waiting hall. Here the problems started, there was a waiting hall 2 just right near the entrance and one, also number 2, on the upper floor. I asked someone and she told me the one I have to go to is right above the one near the entrance, so we went up, in to the waiting hall where again I asked, and got a completely different answer and finally at the information counter I got again a different answer. I started looking myself and found the correct platform and none of the answers I got from the people working there where correct. Train was leaving at 19:38 and the doors for the platform was opened at 19:00. There are two doors, one on the left, one on the right. One would think it could be quite useful to open both since there where so many people, but don’t forget … you are in China! so let the people wait at both and then open just one and look at them fight, could be some weird hobby of the people working at the train station. How can I explain these few minutes it took to pass the door, let’s say there is a bomb in the train station and everyone just HAS to squeeze trough this door to survive the explosion, this is exactly the same thing while passing the doors to get to the platform. There was enough time to get twice as many people in and out again without pushing and fighting, but once again don’t forget you are in China! All these little things make you wish to get back home and tomorrow, finally, it’s bye bye China, hello Austria … There is no place like 127.0.0.1 … Anyway … back to the trip. The Z trains are one if not even THE best trains I have ever been on. There are so silent, you feel nothing when the train leaves, except Chinese people spitting, so this is from my point of view the most comfortable way to travel. The beds are indeed a bit hard but we could sleep very very good …. Ok enough of that, time to go shopping and finish our stuff for tomorrow.


Arrived in Beijing

Today morning we arrived in Beijing. We left the Beijing Railway Station at about 07:30 and it already had 25deg. Celsius. The first thing we noticed was the small sun, but I will come back later to this. The train ride was quite smooth, the only small problem we had was that our tickets where in different compartments, but this was solved quite fast after the lady in one compartment moved to the other one. So if you plan to go with the Z class train from Shanghai to Beijing, ask extra if you want to be in the same compartment. There are 4 beds in each compartment and they are numbered from one upwards (Compartment 1: 1,2,3,4; Compartment 2: 5,6,7,8 and so on).


Preparing for Beijing

Today we will go by train from Shanghai to Beijing. A almost 12 hour ride in a Chinese first class sleeping compartment, I am curios if the images found on the net about the Z class trains really match to the reality. Anyway it doesn’t really matter, what matters is that we arrive in Beijing and can see all the great things, probably the greatest things you can see in China. The Great wall and the Forbidden City. I think you have wasted your life, if you didn’t see the great wall!


[HowTo] Installing eAccelerator on Debian etch

This works for php4 and php5, apache1.3 and 2!

first get php5-dev (or php4-dev, depending on what you use) apt-get install php5-dev

get eaccelerator from here and unpack it.

cd eaccelerator-0.9.5
phpize
./configure
make
make install

create the eaccelerator cache directories

mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator

and add this to your php.ini (in my case: /etc/php5/apache2/php.ini )


extension=eaccelerator.so
eaccelerator.shm_size=64
eaccelerator.cache_dir=/tmp/eaccelerator
eaccelerator.enable=1
eaccelerator.optimizer=1
eaccelerator.check_mtime=1
eaccelerator.debug=0
eaccelerator.filter=
eaccelerator.shm_max=0
eaccelerator.shm_ttl=0
eaccelerator.shm\_prune\_period=0
eaccelerator.shm_only=0
eaccelerator.compress=1
eaccelerator.compress_level=9
eaccelerator.allowed\_admin\_path=/path/to/control.php

adjust the memory to whatever you like. Copy the control.php to whatever path you like (must be some htdocs accessible path) and set the path in eaccelerator.allowed_admin_path= … edit the file and user/password. now restart apache and you are done! go to the link where control.php is and check if you can login and if it works.


Fourteen Things That It Took Me Over 50 Years To Learn - by Dave Barry

  1. Never, under any circumstances, take a sleeping pill and a laxative on the same night.

  2. If you had to identify, in one word, the reason why the human race has not achieved, and never will achieve, its full potential, that word would be “meetings.”

  3. There is a very fine line between “hobby” and “mental illness.”

  4. People who want to share their religious views with you almost never want you to share yours with them.


What happened on the 20th May?