– Blog about the travel, information technology, business, and other... About | Contact

Comment or decomment source code with only 1 byte

Sometimes for debuggin purposes, we need to quickly comment or decomment many lines of source code. In programming languages, which are based on C-syntax (like PHP, Java, Java Script, C++, C#,...), you can do this using the following trick:
print("This line is not commented");

print("But this line is commented");
As you can see, we need to change only 1 character.
  Write the first comment... programming   


How to travel from Bangkok to Sihanoukville via Koh Kong border

Herewith I describe how to travel by bus from Bangkok to Sihanoukville via the Koh Kong border.
1. Bus trip from Bangkok to Trat
In Bangkok, drive to the Ekamai Bus Terminal.
Ekamai Bus Terminal:

1  |  2  |  3

From there, you need to take a bus to Trat. The trip by bus to Trat takes about 6 hours and costs 214 THB. Because the Koh Kong border closes at 8pm, you should take a night bus. Otherwise, you must stay in Trat, which costs additional money.
Trat Bus Terminal:

1  |  2

2. Bus from Trat to Koh Kong border
From Trat, you have to take a minibus to the Koh Kong border. I paid 120 THB for the ticket, and travel to the border takes about 1 hour.
Departure to the Koh Kong border:

3. Koh Kong border
First, you need to show your passport at the Thai border to obtain an exit stamp. At the Cambodian border, everything is not so easy. In various internet forums, this border is called "The Gateway to Hell". There is some truth to this statement because this border is the scene of much criminal activity.
When you enter the border, on the left side there is a "Quarantine" stand.

Officials check for fever with a toy thermometer that shows a constant 36.6°C even at a body temperature of 41°C. For this check, they will request 1 USD as a fee. However, there is no law in Cambodia that requires this "Quarantine" check, so you can simply ignore it.
If you do not already hava a visa (like eVisa), then you have to buy one at the border. Normal tourist visas cost 20 USD. However, at the border you have to pay a higher price, usually about 30 USD. However, I also know people who have paid 50 USD for this visa. The price must be negotiated.

By the way, if your enter Cambodia only for a short time because of Visa-Run, then you have to pay 5 USD to get the exit stamp on the same day.
Koh Kong border:

4. After the Koh Kong border
To take the bus to Sihanoukville, first you have to go to Koh Kong City, which is 15km from the border. I recommend walking for 50m and then taking a Tuk-Tuk, because Tuk-Tuks are more expensive closer to the border. For a Tuk-Tuk (in Khmer, "Moto Romok") to Koh Kong City I paid 3 USD.

In the city center, you must purchase a ticket to Sihanoukville at the ticket sales office.
Ticket sales office:


I paid 7.50 USD for the bus ticket. The last bus to Sihanoukville departs at around 1pm. This is another reason why it is better to cross the border in the morning. You can also take a taxi. The normal price for a taxi trip to Sihanoukville is 50 USD. However, in the afternoon it is almost impossible to get a taxi, because at night the road is very dangerous and populated by criminals.
5. The trip to Sihanoukville
The bus starts from the central bus station.
Central bus station in Koh Kong:

Bus companies also offer a free pick up service from the guest house, but this must be arraged in advance. The trip to Sihanoukville takes about 4 hours.
  1 comment travel  thailand  cambodia   


Easily accessing internet from IP-address of specified country

Some internet services, like PayPal, can be accessed only from an IP-address of a specified country (in the case of PayPal the country where your business is located). But, what do you do when you are traveling in another country?
I will show you a simple solution: First, you need a Linux-based VPS server with SSH-access in your country. You also need a Unix-based notebook operating system. I use MacOS. But, if you use Windows, you can install Linux in a virtualisation environment, like VirtualBox. Then, you need to open a Unix-terminal window and input the following command:
This will start a tunnel and SOCKS proxy on the client side.
Now, you need to change the configuration of your browser so that it can access the internet via this proxy.

In Firefox, you need to open the "Preferences" window and click on "Connection settings". After selecting "Manual proxy configuration", input the value "localhost" in the "SOCKS Host" field, and then in the "Port" field, enter the value "9999". Now, you can access webpages via the IP of your VPS server.
  Write the first comment... travel   


About this blog

My name is Eduard and at the moment I live in Sihanoukville. This is my personal blog about travel in Cambodia, Thailand, Europe, and other places in the world. I work as a software developer and business executive. Therefore, I will also write about information technology and other topics related to technology and business.
I would be happy to have you leave a comment on my postings. All links in the comments are DoFollow-links. My blog is about absolute freedom of opinion and expression. However, I will delete all SPAM-related comments.
I hope you will enjoy reading my blog! Wink
PS: This blog is based on my own software, Nanoblog. At the moment this blog engine is still in development. In the future, I plan to make Nanoblog available as free open source software.
  Write the first comment...


© 2013–2018   Powered by Nanoblog