Ehsanul Haque

Welcome to my personal site & blog

18 July
0Comments
15 May
2Comments

Setup sub-domain on the localhost

When I work on my local machine on a website, I usually setup the virtual host on a sub-domain setup on the localhost. I feel comfortable using a sub-domain rather than setting up an Alias. I’ve seen many people know about it, but there are many who don’t, and this is for them.

So what do you have to do to setup a sub-domain on the localhost? It is not a rocket science but one must know where to do it, especially on a Windows box.

On Windows OS browse to {Drive on which your Windows OS is installed}:/{WINDOWS/WINNT}/system32/drivers/etc/. Open “hosts” file into a text editor, and you will see something similar to this:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost

The last line represents the hop any request to http://localhost/ will go through. The IP 127.0.0.1 is used (usually) for you localhost, and going to http://localhost/ will access the files under the root of directory setup for it. Now if you want to setup a sub-domain called “myself”, i.e. http://myself.localhost/, then you add the following line at the end of the file.

127.0.0.1       myself.localhost

On a Linux box, “hosts” file is located under /etc/. You will require “root” access to edit this file or the user access who has priviledge to edit this file. Similar to Windows system, add the following line into the file:

127.0.0.1       myself.localhost

You don’t have to restart your web server for this change to take effect. But you will have to setup the virtual host to point to this sub-domain, which will require you to restart the web server.

Thank You.

31 August
1Comment

Image Menu using Moo Tools

It is called Image Menu and uses Moo Tools. I found this example on AjaxRain.com which is a vault for Ajax, Javascript and DHTML examples. The demo is located at PhatFusion.net and it also lists the features, usages and options.

After I downloaded the Javascript and CSS I changed the menu of my own site. With the new funky looking menu, I’ve decided to change the whole theme of the site and now it looks like this. I am not sure how long this will last, as I’ve tried many funky stuff before but eventually I turn back to my old and simple looking site. Try it yourself and have fun.

28 July
4Comments

What is our news reporters’ standard?

Today I was reading news on The Daily Ittefaq site and when I scrolled down to IT Corner section the first article caught my eyes. It was titled “Hariye gelo cyber jouno oporadhider tothho” (Cyber sex offenders’ data was lost). I was on Google News this morning and I could not recall reading such news there.

After I read the article I searched for a long time on Google, BBC News and everywhere I could but could not find such news! In short TDI reported that out of 29,000 sex offenders found on MySpace.com profile data of 700 offenders were lost. It also reports that it was published more than four times in past two months on the company’s website.

From what I have found so far is some relevance with the numbers mentioned in the article. From BBC, Google, MSN and few other places I have found that MySpace.com has barred 29,000 sex offenders found on their social networking site. This number is four times higher than it was reported about couple of months earlier. Previously in May the site found 7,000 offenders.

I did not try to match every bits and pieces of the report made by TDI but so far only only number of offenders matches against the report made by worldwide media. It is really sad to see such bad reporting. Even though I could not find anything relevant that TDI reports, I will be happy to see anything that proves their report is correct. I do not know the editorial process of our newspaper and who approves all these news without making sure it is correct but it is really bad for people in our country! They are given wrong information and that is just not because someone found it wrong. But the person failed to translate or understand what was being reported on millions of news sites and newspapers.

All these raises a question “What is our news reporters’ standard?” I am not being rude to anyone and I know there are many excellent news reporters in our country who are giving their 100% effort in finding the correct news for Bangladeshi people. But these kind of weired and wrong news really puts a bad impression.

Please improve the quality of news published and let people know the right thing. Do not just publish for the sake of running your business!

20 July
3Comments

Where have I been?

It has been a long time since I last posted anything on the blog. Thanks to those who cared to email me for not writing anything. Well I have been very busy for last few months. In May I was preparing to go to Bangladesh. Initially my parents were supposed to go back to Bangladesh but unfortunately they could not go. Due to the accident that my father had few moths back doctor asked him to stay for few more months. Well I left on June 9th with my eldest brother, who migrated to Canada with us (my parents and me) last year.

After a shocking and disappointing 41 hours flight back to Bangladesh on Etihad Airways I had to start shopping from very next day! I didn’t even have time to contact anyone. Everyone had to come and wait for me at Kolahal (my house’s name in Dhaka). I would like to apologize to many of you whom I should have contacted and met. I promise to do so next time I visit.

Well on 22nd June a reception party was held. Some pictures from the party is on my Flickr.com account. After that Tithi (my wife), Shakhhar (my cousin), Pia (Shakkhar’s wife) and Mishuk (my another cousin) decided to visit our village at Shahjadpur. We had only one night to stay there and two whole days to spend. We had most out of our time there. Took around 832 pictures during that trip. Few of the pictures are on Flickr.com now.

Well as we all know time goes by just like that. It was a good trip, yet was so short. I feel I should have done a lot more than what I have done this time. I wish I had more time to spend there. On 3rd July I took the flight back to Canada with Tithi. Now she is here with me. She is doing good here but misses her family, friends and funs. Hope we can fulfill our hopes and dreams.

It was really good to be back to my own land. I hope to return to it for good, very soon!