Archive for March, 2011

Importing something of a bit of a value for personal use in Turkey

0

I have ordered some nerd stuff worth of a bit more than €500 to be shipped from UK. From package tracking, I can tell that it arrived to Istanbul the very next day after the purchase but guess what. It needed clearance for customs. I’ve been told that if the package worths more than €150, it is highly likely to be stuck at the customs.

So what can I do ?

  1. Get the package myself
  2. Pay a commission to UPS to get it for me (aprox. €83)
I chose the first one to get the whole thing done in one day (boy could I be any more wrong), latter one requires a few business days. I’ve called UPS to get some information about the procedure and they’ve told me that I’d go to cargo terminal make the tax payment, come by their building and get the package. I went to cargo terminal only to find out that the procedure includes one more roundtrip. Here’s the actual procedure.
  1. Go to the place called cargo terminal (next to the airport, a government facility) to get a paper signed by the manager that tells you want to get your package as a personal package.
  2. Take that paper to UPS antrepot so the government inspector can inspect your package and writes a paragraph of text that it is OK for you to pay the tax for it and get it.
  3. You go back to cargo terminal again to pay the tax (%18).
  4. You go back to UPS antrepot again and get your package.
OK, I’ve made a mistake and as manly tears of sorrow was running down my face I knew that I had to take it like a man! I started following the procedure.
  1. I’ve drove to the cargo terminal (47km from my office). I got on the road at around 14:00 and I was there in 30 minutes.
  2. Got the paper and paid €3 for parking in the terminal. I’d guess it took something around 30 minutes too.
  3. I’ve went to the antrepot (20 km), I went to wrong address first so it was 15:40 when I was at the antrepot.
  4. I got the government inspector to inspect my package and like 10 minutes but it took her 30 minutes to write one paragraph of text for me.
  5. So, I was back at the cargo terminal (10km) at 17:00, their office hours ends in 17:30.
  6. Long story short, with the delicate design of bureaucracy at the cargo terminal, I couldn’t make it on time. Now I need to go there again.
  7. I drove back to home (65km).
Aftermath:
  1. Wasted time: 4.5h
  2. Distance: 150km of driving = 20lt of gas = €38 (yes, you’ve read it right, gas is €1.91/lt in Turkey)
  3. Parking: €6 :)
Like all these are not enough, there’s this government officers’ culture in Turkey. Given the little authority, they act like little gods of their domains. Maybe, that’s because they get ridiculous salaries, do nothing useful in general and can be replaced with a few lines of code :) only god would know.
*sigh*
Oh, and for the curious ones among you, I’m getting a Crucial C300 256G SSD drive and 8gb RAM upgrade for my Vaio-Z790 and also for my Macbook.

Running an HTTP server in default port 80 on Windows

0

I tried to run a HTTP server on my Vista box. It couldn’t bind to that port. So I looked around a bit.

From Process Explorer I can tell that it is System process. So why does such a core part of my OS listening on port 80. A rather easy way to find out is to simply netcat to that port.

Server: Microsoft-HTTPAPI/2.0 hmm. A little bit googling told me that this is due to SQL Server Reporting Services. When you stop this service, port 80 will be available again.

Restoring MySQL Databases from an HDD Image

1

UPDATE: There’s an update to this MySQL Workbench fetching… problem solved

I don’t know what is the proper way of handling this but this is rather a cumbersome process apparently.

You can see your datadir by issuing:

Replace this directory with your backed up datadir. Datadir can also be found in my.ini (or my.cnf in GNU/Linux I guess).

When I did, I got the following error while trying to start the MySQL server:

I’ve added “innodb_log_file_size = 53M” parameter to my my.cnf and the server started just fine. You see the 55574528 in the above error log ? That is precisely 53M (55574528/(1024*1024)=53). Though MySQL Workbench still can’t browse the databases in the UI, it tells me

Though I can use the databases as below:

Even though Workbench is not happy with this, it works. I’ll update if I find anything useful.

Update to SharkIt

0

My brother told me SharkIt stopped working, I’ve updated it to work again.

Changes include:

  1. Again compatible with Grooveshark
  2. Faster session retriving, hence you can log in faster!
  3. Handles bad file names
  4. More cross platform file handling.

Download the update.

Wireless module of Sony VAIO VGN-Z790 broken

0

Me and my partner got two Sony VAIO VGN-Z790DIB notebooks 1.5 years ago. Admittedly, I still think it is the best PC notebook out there (P9700 CPU, 4G RAM, 1.47kg, ~6h battery). Though, wireless module of my partner’s notebook stopped working in the first month. The wireless module got physically broken, completely disappeared from system as it is not connected at all.

Today, it turned out that these notebooks have some kind of design fault, as mine also got broken. It literally disappeared all of a sudden. It is not a software problem as it is not seen by GNU/Linux or anything.

I tried to order another Wireless Module for VGN-Z790 but all my searches failed. Then, I decided to disassemble it, in hope that I could find a part number etc. After all, I have changed broken parts of my previous notebooks anyway.

It is a very painful task to disassemble this notebook. It took almost 1h to disassemble and assemble the notebook back. Here’s the service manual for VGN-Z series, it is almost impossible to work on this notebook without this. I’d expect a much better service manual from a company such as Sony, but it was quite low quality if you ask me. Dell’s service manuals were way better.

Anyway, I got it! The wireless module of VGN-Z790 is 512AN_HMW. You can see the pictures below.

Luckily, if you search with this model number you can find this part from ebay. I’ll order one soon and see if it is the module that is getting broken or it is something else that is affecting it — only if I don’t get a new notebook! This is a pretty damn good excuse to get one, amarite ?

TIM: Time Is Money! Standalone meeting calculator in HTML/Javascript

0

This is my take on TIM calculator, you can download, modify and run it in any browser (I’ve tested with IE8, Chrome, FF). View, download or use it online.

Modify the currency to your liking. Oh, and of course, best viewed with Chrome.

DHCP Servers: Stock routers’, Microsoft Windows ICS’s, Mac OS X’s

0

MS Windows and Mac OS X let’s you share your internet from one network interface to another one. i.e. You can share your Wireless internet to your Ethernet port. In Windows it is called ICS (Internet Connection Sharing). In Mac OS X, you can do it in the Sharing section for your settings. Not surprisingly, Mac OS X UI is much more intuitive.

In a few days, we’ll be in an industrial automation fair and only available internet connection there will be Wireless. We want to connect our devices to internet there but our devices only have Ethernet port. So we’ll rely on connection sharing of one of these OSes. The problem is that their DHCP servers are acting a bit different than a stock router you’d have.

Windows does not give responses quickly, after my DHCP REQUEST message, it takes a like 1-2 seconds to get ACK message back. And Windows’s DHCP server keeps sending OFFERs and ACKs like crazy for the previously received messages even though an IP address is acquired already. Tweaking the timeouts and making sure my client does not honor OFFERs once that state is passed fixed the issues with Windows’ DHCP server.

However the issue with the Mac was a more subtle one. My device couldn’t acquire IP address at all. I checked if my Windows laptop could get an IP from it and, not surprisingly, it could! My device couldn’t even get an OFFER for its DISCOVER message. I compared Windows’ DISCOVER message with mine to find the differences. There were two differenes:

  1. Seconds field
  2. Options field
First I tried to make the Options field identical. Of course, Murphy’s laws applied and it turned out that it is because of Seconds field. When I changed my Seconds field from 0 to 4 (like Windows do) it all worked out with Mac’s DHCP server.
According to RFC 2131‘s Section 2, page 10, the Seconds field is for:

secs 2 Filled in by client, seconds elapsed since client began address acquisition or renewal process.

I don’t see how this affects the behavior but it fixes the issue.

See also previous mistake I made about DHCP.

Cheers

Go to Top