How to edit the hosts file in Mac OS X 10.8 – Mountain Lion

The hosts file is a text file that maps hostnames to IP addresses. Upon typing a url address in the browser, the system first checks if there is a relevant entry in the hosts file and if exists gets the corresponding IP address. If no entries exists it resolves the IP via the active connection’s DNS servers.

The hosts file can be edited to block certain hostsnames, like ad-serving/malicious hosts, or used for web development purposes, i.e. to redirect domains to local addresses.

Continue reading

Disable the Sudden Motion Sensor on a Mac Laptop

The Sudden Motion Sensor is designed to protect your Mac hard drive in the event of a computer being dropped or an unusually strong vibration. Essentially what it does is park the hard drive head when movement is detected, which prevents it from potentially scooting across the disk surface and scratching or otherwise damaging the drive or drive head.

Continue reading

View Source of a web page on iPad, iPhone or iPod Touch (using mobile Safari)

After recently implementing WPTouch Pro for mobile devices, I was curious to know what HTML it generated when viewed from my iPhone and iPad. Surprisingly the mobile Safari browser does not have an option to view source, even more surprising is that I’ve just found this out after owning a iPhone for over 3 years!. This little guide shows you how to view the source code for the HTML, CSS and JavaScript code of a web page from Safari on the iPad, iPhone or iPod touch.

Continue reading