Archive for August, 2007

Linksys WAG54GS lost wi-fi when power cable disconnected

Tuesday, August 14th, 2007
Linksys WAG54GSI hope you have not make the same mistake with me, that is, to purchase one of the Linksys WAG54GS wireless modem/routers. This device really has a mind of its own.

Yesterday, I finally decided to clean up my desk. All the equipment was disconnected, blowed and wiped out. When I reassembled everything, all seems to work well, except the fact that I was not able to connect to the wireless network, from two different computers. Of course, these computers had successfully been connected to wireless before the clean-up, the very same day.

I tried to power off and on, again and again. Nothing. I checked if it had lost any settings, but no, they were all there. Besides, the device was working, as for the rest.

What finally fixed the problem, was to reset the modem/route by pressing the reset button on the back, using a thin pin, for at least 15 seconds. After that, all settings is gone away. I configured the router and, guess what: I had wireless again! Now, I would really like to hear a logical explanation for this...

Thanks to my best friend Nikos for his advice. If it wasn't him probably I would have thrown this piece of crap right out of the window, this time.

Truncating the SQL Server's transaction log

Thursday, August 9th, 2007
If you end up with a full transaction log in your SQL Server's database, you can fix the problem by truncating the transaction log using this small script:

DUMP TRANSACTION dbname WITH NO_LOG;
DUMP TRANSACTION dbname WITH TRUNCATE_ONLY;
DBCC SHRINKDATABASE (dbname, TRUNCATEONLY);


Make sure to replace dbname with your database's name. Thanks to "gel" for the tip. You may need to run the script once or twice (...), that was the exact instructions I was given...

The Artifact and Living

Thursday, August 9th, 2007

snapshot from Ford Mondeo’s TV commercial


I spent several days looking for the song played in a recent Ford Mondeo TV spot, the one that features cars being lift up by colorful balloons and floating across London. I finally remembered that I had heard the music in the film Donnie Darko, some years ago. The song is entitled The Artifact and Living, composed by Michael Andrews.

Forcing hostname in Apache-based websites

Sunday, August 5th, 2007
Assume that you have a website, name it www.website.com. Because users tend to omit the www. prefix when typing a URL, it's reasonable that you want any requests to website.com to be served as well, instead of returning a 404 Not Found error. Obviously, you think you just have to add a ServerAlias in your virtual host's configuration, and you are right. But, that's only half of the story.

By only adding a server alias, you ensure that misspelled URLs are served, but you leave no clue to the client to let her know that the URL is deprecated. You can solve this by using Apache's rewrite module. Make sure that you have enabled mod_rewrite in your Apache web server and add the following in the apache's configuration file (inside your <VirtualHost> section is a good spot):

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.website.com [NC]
RewriteRule ^(.*) http://www.website.com$1 [L,R=301]


The code above will force all requests with a hostname other than www.website.com to be redirected to http://www.website.com, retaining the path-part of the URL. The client will be redirected using a 301 HTTP response code (Moved Permanently), which informs the client that the URL is not valid any more, and encourages her to update any bookmarks or permanent links to this page.

preventing pages from being indexed: the robots meta tag

Friday, August 3rd, 2007
The simplest way to prevent search engine robots from indexing a certain page is to use the "robots" META tag. This is an example:

<meta name="robots" content="noindex,follow">

This informs search engine robots not to index the page, yet to follow any contained links. You have to make sure that you put the robots meta tag inside your head tag.

There are also two additional directives you can use: "index" which explicitly tells the robot to index the page, and "nofollow" which instructs the robot not to follow links. The default behaviour is: "index the page and follow links."

This method is simpler to implement than using a /robots.txt file and also it does not require web-master's privileges on the server, but there is also a major drawback: only few search engine robots support this meta tag. Googlebot is one of the few.

There are several reasons for not wanting a page to be indexed. There are pages that act more like passages to other pages in a deeper level, than actually content containers. A typical example is the front page of news coverage website, which contains mostly the headlines of the latest news, rather than the stories themselves.