Donnerstag, 31. März 2011

Shooting yourself in the foot with "carriage return"

Just today somebody had a problem with a file that he "could not cat", but less worked. The reason was that the file had only a carriage return at the end of the only line.

Here's an example how to reproduce:
> echo -en "bla\r" > bla2
> cat bla2
> od -c bla2
0000000 b l a \r
0000004

Sonntag, 27. März 2011

Very lazy way of installing Internet Explorer on Ubuntu

For various bad reasons I need to sometimes use Internet Explorer. The easiest way to set it up on Ubuntu is via a tool called "PlayOnLinux". Just install the package and then install IE using that tool, it will take care of all the special wine settings and dependencies. Quite neat.

Sonntag, 20. März 2011

March 14th (Mon)

After watching the news and taking a look at the station in the morning, I figured, that it would be very hard to get to work, so I took the day off. I didn't really feel like walking long distances again, as my legs still hurt a bit.
At the same time more and more bad news from Fukushima Nuclear Power Plant came in, so we where quite worried. The situation there was totally out of control and when I noticed that my neighbors where leaving I thought it might be a good idea to also leave.
So we packed our things – mostly stuff for the kids. These vacuum sealed storage bags we bought at Costco previously proved very useful. Luckily I now have quite a big car and managed to get everything in.
At this point my plan was to go to Kyushu or Osaka and send my wife and kids to Germany.
Once I left my home, I noticed that the traffic was completely stuck. I waited 4 phases at the traffic light to route 16 and figured it might be best to take another route.
So I took the small country route via route 299 to Chichibu and from there to Yamanashi. Roads where OK, but gasoline was sold out everywhere. At the few places that still had gasoline there where huge lineups (also blocking the traffic).
I drove quite fuel saving and my tank was full, but still I was worried. In Yamanashi I refueled at a tiny fuel station that was still open. I only used about 10 liters, which is not bad for such a big van, fully loaded through the mountains (~140km).
From Yamanashi it was quite a relaxing drive on the highway. The only thing I noticed was, that everyone was going really slowly and fuel conserving, which is really unusual here (Normally it's a hard race for position).
When the fuel needle reached ¾ I pulled in at the next gas station, mostly because I wanted to make sure that there is fuel. Turned out that fuel was limited to 10L per car, so I was glad I refueled early as it was still a long way.
Somewhere after Osaka we took a coffee break and I skyped with my parents. They suggested that I should stay in Osaka, because there is a German consulate in Osaka and none in Kyushu. So I googled for a hotel for the next day.
The combination of Google maps and car navigation is quite good – even though the hotel is in the middle of the city, in some small side-street, I had no trouble finding it, even at night. We had to wait until the next morning (it was already past midnight), so I drove around to find a place where I could rest. That was a tough night, because of the kids who had slept well and where now up and wanted to play.




Samstag, 19. März 2011

March 13th (Sun)

Not much happening on Sunday. Just watching the news and some shopping. My kids where playing earthquake with their toy house made out of an old box. News came in about the planned power cuts from Monday and I began to wonder how I should ever make it to work. Everything was quite normal on Sunday.

Donnerstag, 17. März 2011

March 12th (Sat)

Woke up at around 7:00 and after a bit of internet reading (first time I used an IPad for real btw.. not bad) I figured that maybe I could take a bus from Omiya to Kawagoe.
At the station I quickly checked whether the Kawagoe-sen would resume service soon, but the Eki-in said it might take a long time, so I went to search for the bus. Luckily there is a Bus to Kawagoe Green Park, which passes by Minami-Furuya, which is just one JR train stop from home, so not to far of a distance. So I took the bus and then walked from after where route 16 passes the Arakawa river to home.
I arrived home at around 10:00. Since I had to do my weekly weekend shopping I thought it's better to get done with it quickly, before it starts to get crowded, so I quickly took a bath and grabbed my car and bought the usual stuff. On my way back I refilled my car and noticed that gasoline stations are starting to get crowded, so I decided it would be best not to use the car unless emergency.  So I continued my shopping by Mamachari.
Besides that not much happened, we watched the news, called home etc. At that point I did not have any plan of leaving Kawagoe. Of course we where worried about the news from the various nuclear power plants, but it did not seem to be too bad.

What happened so far

So as many of my friends ask me how I've been and I don't like telling the same story over and over again, here's what happened so far:

March 11 (Fri): As you all knew there was a big quake in the north of Japan at that time. I was in the office at Tokyo. When the quake hit I actually thought, that it was a direct hit on Tokyo and thus did not worry too much. Usually even if a quake is quite strong it is hardly recognizable in the part of Saitama where my wife and Kids are. I actually managed to post a note on facebook and I actually took a video wile the quake was on. I must say quake-wise I feel very safe in Tokyo.
So after the first quake we evacuated the office, which I must say happened in a very calm manner. At the evacuation point most people had no Keitai connection, which is not much of a surprise, because everybody tried to called home - what is exactly what you should NOT do, but people (that includes myself) are not very reasonable when they worry about their family.
While on the evacuation point we had another, but much smaller quake. Helicopters where circling around Tokyo like a swarm of flies. I have never seen so many helicopters at once. Some people had mobile TV on their phone (see previous entry) and when I saw the news about where the quake was I was quite concerned about my family, because then it was clear that the quake must also have hit Saitama. Then quite soon reports about huge tsunamis came in and the first pictures where really shokind.
But there was nothing I could do at that point, so after a while I went to check whether the trains are running again.  I got the information, that currently trains are stopped and the tracks would be checked and that maybe in 2 hours time the trains would run again. Since it also started to rain a little I decided to go back to the office and try my luck with Internet and phone there. So I climbed up the 15 floors again. Internet and phone where working in the office, but my wifes phone was not working (also Softbank) and my home phone number was not working because it had no power. (My wife told me later she switched the breaker switch off when she left, due to the risk of fire).
So I did what I can and send out E-Mails to my wife and parents, so that they do not worry about me.
At around 17:00 a co-worker, who happens to be also from Saitama, and I started walking throughwards   home. Before we left, we bought ourself a little bit to eat and drink (I went for Snickers, because it has quite a lot calories and is not heave and GreenTea, because it's good against thirst).
We where expecting that the trains would start working soon, but we wanted to escape the peak a little. There was quite a crowd on the street and the car traffic was totally jammed. We where much faster walking
We walked along the JR tracks, so we would notice when the trains started running, but nothing moved.
By the time we reached Ueno, I finally got a SMS from my wife, telling me she and the kids are fine and waiting in the car, as we discussed just a few days before.

It was quite surreal walking in an endless looking stream of people through the night to direction Saitama. In Nishi-Nippori we took a Dinner Break at a Ramen place. After a while I started to have Internet again (phone was still dead) so in my desperation I tried Skype and reached my wife.
At some point (I think it was Oji), we noticed that the Nanboku-sen was running. So we took a train out direction Saitama, in the hope that we would be able to catch a bus or taxi from Urawa-Misono. But unfortunately there was neither. So we decided to walk to Omiya. Many buses passed us empty, because it was end of normal operation time and apparently it was not much of an event to make an exception. After an endless walk and several stops at various convenient stores we finally made it to Omiya, where I could stay at my Co-Workers home. At that point I could not walk another kilometer. I think I went to bed at 2 o clock and slept like a rock until 7 o'clock. Only one mayor quake woke me up - because my wife called to ask if I am fine.

So this is getting a bit longer than I expected, so I'll take a break here and write the rest later.

Samstag, 12. März 2011

Smartphone in emergency situation

So since I had the great opportunity to test the usefulness of a smartphone (HTC Desire HD in my case) during an emergency situation, here are some of my conclusions:


Good things:
  • FM-Tuner (works without Internet)
  • Compass (using GPS) when Internet is down
  • Skype (was very useful for me as Softbank voice communication was completly down but Internet was somewhat working)
  • Google maps - once Internet was up, guiding the way home.
  • App for train delays. Since all trains where stopped not that much of a help, but at least I knew that I had to keep on walking. So I wasted less time on getting information about trains.
  • Internet in general (Finding Bus lines, schedules, news etc)
Bad things:
  • no digital TV tuner (which my old phone has). Because it's a national thing and most smart-phones are created for worldwide market it's mostly not included.
  • Battery. Especially under those kind of condition the battery drains very quickly. I should get a spare battery.
  • SMS this was (in my case, Softbank) working surprisingly bad. I had my gmail mails in and out before ever getting any SMS. But then, people on NTT might have had a different experience, so I guess in general it's good to have both.

Dienstag, 8. März 2011

build a perl to put in your home

Sometimes I want to have my custom perl. Mostly because I need a different version, or because I need some modules I cannot get installed on the system perl.

So installing perl to your home is easy. Just get the source and run something like:


perl Configure -Dprefix=${HOME}/linux/x86/


You might want to add "-de" to speed things up (answer all questions with default).

Then just run
make && make test && make install

Then add your new perl path to PATH.