Skip to content

How to revive a dead hard drive

Aug 2008
Mac [03 Aug 2008]

If you are one of a numerous victims of MacBook and MacBook Pro hard drive failures, there is a glimpse of hope that you can still have your data recovered. It involves removing the hard drive from its enclosure, from the computer in this case.

Removing the hard drive from a MacBook is a breeze, it takes good part of a few minutes.  However, MacBook Pro owners will need some bravery, surgical precision and, of course, lots of time. Be aware that opening the MacBook Pro will definitely void your warranty.

Sometimes the drive heads get stuck in a parking bay and consequently your hard drive fails to read or boot. There is no clear indication that would help distinguish between this and the genuinely dead hard drive, but since it’s not working anyway, you can still give it a try. Often this fixes the issue.

Remove the hard drive from your computer and hold it on the palm of one hand. Give it one flat-handed brisk slap on the top of the drive. Just one. Then place it back into your computer and see if it worked.

If it’s still dead then it’s bad news. If it works – you have a decision to make; leave it as it is, and continue with your life like nothing ever happened, or get the data off the drive as soon as possible and get a replacement drive. It’s really up to you.

You’ve also learned about the benefits of backing up, so go on and get that external drive, they’re cheap as chips now, and back-up, back-up, back-up …

Blocking referer spam

Jul 2008
Internet [26 Jul 2008]

Referer spam is a technique that involves making repeated web site requests using a fake referer url that points to the site the spammer wishes to advertise. Sites that publicize their access logs, including referer statistics, will then end up linking to the spammer’s site, which will in turn be indexed by the search engines as they crawl the access logs.

This benefits the spammer because of the free link, and also gives the spammer’s site improved search engine placement due to link-counting algorithms that search engines use. [Wikipedia]

I have tried using several WordPress plugins but without much luck. However blocking the referer in the htaccess file has surely done the trick.

I have added the following to the .htacess file

SetEnvIfNoCase Via pinappleproxy spammer=yes
SetEnvIfNoCase Referer doobu.com spammer=yes
SetEnvIfNoCase Referer poker spammer=yes
SetEnvIfNoCase Referer casino spammer=yes
SetEnvIfNoCase Referer cazino spammer=yes
SetEnvIfNoCase Referer kasino spammer=yes
SetEnvIfNoCase Referer medici spammer=yes
SetEnvIfNoCase Referer medica spammer=yes
SetEnvIfNoCase Referer insur spammer=yes
SetEnvIfNoCase Referer roulet spammer=yes
SetEnvIfNoCase Referer virtuel spammer=yes
SetEnvIfNoCase Referer pharma spammer=yes
SetEnvIfNoCase Referer adult spammer=yes

Order allow,deny
allow from all
deny from env=spammer

… and the amount of referer spam has gone from several hundred hits per day to zero in three days. Fingers crossed.

Why there are no viruses for OS X

Jul 2008
Mac [19 Jul 2008]

Just came across an interesting discussion on Whirlpool, where a poster asks why there are no viruses for OS X. The quick and obvious answer by a few “enthusiast experts” was that the market share of OS X is so small that nobody really bothers writing any malware for Mac.

Yes, this is the most common answer you get from people who also answer “right-click” when asked what Macs can’t do that Windows can. Sigh!

I liked the reply by the user TwoFruits, so I thought I’d share his very down-to-earth analysis of the malware absence phenomenon on Macs.

There is no silver bullet answer as to why not, its a combination of reasons :-

1. OS X is built on UNIX. UNIX was a multi user system with a security architecture built into it at the beginning. WINDOWS came from a single user architecture with security and multi user capability as an after thought.

2. UNIX had networking built into it from the beginning, again in Windows this was bolted in at a later date.

3. Windows built Internet Explorer into the O/S at a very deep level, and allowed code execution within the browser. In OS X the browser is a completely separate application, its not a integral part of the OS. IMHO, this is the fundamental screw-up Microsoft made, as they created so many hooks into which someone can attack the OS.

4. In earlier Windows everything ran as the system user, so the capability to compromise an entire system was easier. (see reason 1)

5. Microsoft’s backward compatibility mantra doesn’t do them any favours as to run old software they need so many old APIs, all of which can have holes in them.

6. OS X has no registry. IMHO, second fundamental flaw Microsoft made.

7. OS X asks for your password before allowing you to run new software or install something. Not fool proof, but at least fool resistant.

Personally I don’t buy the “lack of market share” reason. Consider that in pre OS X days Macs did have viruses. Also interesting, that at that stage Macs were suffering point 1 & 2.

No system is totally safe, but Macs have a lot of architecture working in their favor.

After returning a new 24 inch iMac two times and getting the replacements I figured out that the problem is not related to the particular machine, but rather to all of them. I read tons of forums and the issue is so widespread that it leaves no doubt it’s a design fault. A design fault that Apple is leading us to believe they are not aware of, despite hundreds and thousands of calls to their customer support asking for help.

The problem is essentially this, the display is brighter on the left than it is on the right. Much brighter. Below is an illustration of how the brightness is distributed across the screen.

imac screen gradient

There are three areas of interest here:

1 – The display gets darker closer to the left edge of the screen
2 – The display brightness is constant
3 – The display gets darker towards the right side of the screen

Apple tries to compensate for this with ridiculously high level of brightness, which to be honest masks the problem rather well. The screen is simply so bright by default that any normal human being either needs to have sunglasses while using the iMac or turn the screen brightness down. The problem is, you can turn the brightness down only so far. And that is very little. Even the lowest setting is still way way too bright for most of us.

Here is the drill – the lower the brightness, the lower the panel temperature. The lower the temperature, the darker the edges of screen, hence the gradient. I am sure Apple is aware of this and this is exactly the reason why they keep the thing so bright.

I tested a few free utilities that will let you darken the screen further, and the one that best suits my needs is (or are) Shades.  Shades actually doesn’t darken the screen by reducing the brightness, but rather applies a transparent overlay of specific colour. The default colour is black but you can change it to any other colour in the preferences window (not that I could imagine someone using a pink overlay).

The slider, that you can have either in the menu bar or on the desktop, doesn’t really change the brightness but the transparency of the overlay, which in turn makes your screen to appear darker.


What I did was to reduce iMac brightness to the minimum, then apply Shades  to darken it a bit further. This made my display reasonably dark, but also produced even heavier gradient.

My wife, having heard me talking loudly to myself about the panel temperature and being frustrated with the gradient, came up with a brilliant idea… and not so brilliant solution. She laughed and said “If you need the temperature, why don’t you put the blow heater next to the screen, on the right end”.

This actually made me thinking and, of course ,brought up the answer to the problem. Turn up the iMac’s brightness control all the way up to generate enough temperature, then darken up the display with the Shades overlay.

The display brightness  is now flat across the screen. When I wake up the computer in the morning there is a little of gradient along the right edge, about 2 inches, but within a few minutes this is gone.

One thing that may work against this is the screen calibration. I have noticed that some custom calibrations I have made have resulted in an unusual pink-ish tint towards the right edge, but Adobe RGB and sRGB work perfectly fine.

Boy, can it be frustrating when your wireless network starts dropping every few minutes!

First it works fine, then the traffic stops even though the Airport indicator shows the full signal. When I click on it, the status shows as “Airport: Scanning” then after a few seconds it’s “On” and the traffic goes fine. Minute later it stalls again.

Endless reboots, change from Airport Extreme base station back to my old WGR614 Netgear router, changes and tweaks at both ends, dozens of tips and tricks in different forums, all tried, and nothing helps.


Then a friend of mine suggested to delete a few preference files and the things are working perfectly fine now.

Here is what to do: go to your user preferences folder (~/Library/Preferences) and delete all files containing com.apple.internet… I found only two files – com.apple.internetconfig.plist and com.apple.internetconfigpriv.plist, backed them up and then deleted both.

The wireless connection works like a charm now.

Recent items in Leopard Dock

May 2008
Mac [16 May 2008]

I just found this nice little feature to show recent items in Dock. The choice is: recent documents, servers, volumes, items and my all favourite – recent applications.

recent.jpg

To enable it you will need to use Onyx. What, you don’t have Onyx? Alright, shhhhh… I won’t tell anyone, go quickly to Titanium software website and get it. It’s free.

onyx.jpg

Open Onyx, select Parameters > Dock and click on Add next to Recent/Favorite items Stack.  Enjoy!