Visit my site @ mugunthkumar.com


Tags » ‘tips n tricks’

How to deploy on iPhone OS 3.1.3 without downloading the 2GB SDK

February 3rd, 2010 by Mugunth Kumar

Like most of you, I too downloaded the 3.2 beta and was playing around with some iPad stuff. Today when iPhone OS 3.1.3 is released, without second thought, I immediately updated my iPhone. My iPhone being a development device, I understood that I can no longer use the current XCode installation to run apps on device. When I launched XCode, the Organizer reported,


“The version of iPhone OS on “ABC’s iPhone” does not match any of the versions of iPhone OS supported for development with this installation of the iPhone SDK”

So does that mean, you should re-install the SDK? Just like me, you will probably have confusions like,

Will installing it corrupt or overwrite your 3.2 beta?

Should I re-install 3.2 beta again?

I too had these. Fortunately, I decided to hack things myself and got the 3.1.3 working without downloading the entire SDK. This is how I did. Type the following command into your terminal.


ln -s /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.2\ \(7D11\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.3

Now quit and restart XCode. Voila! you have effectively “fooled” XCode! and you have saved countless hours which you can effectively use on programming another cool app!

Note that this hack will work *any* minor OS updates. However, if you are using a feature specific to the new version you will probably find yourself in trouble. In other words, don’t try to apply the same technique when 3.2 or 4.0 launches.


Mugunth

Help your visitors with a *useful* 404 Error page

August 5th, 2009 by Mugunth Kumar

A 404 Error page usually informs visitors that something they were looking for is not found. I wanted to create a useful 404 error page for my blog and site. If it is only for a blog, I would have done with a multitude of plugins available for Wordpress like smart 404, AskApache’s Google 404. A quick search for “404″ in wordpress extension site will reveal atleast 6 pages of extensions.
But much to my bad luck, they didn’t fit my “requirements” properly. I needed a redirection page that would show related search results straight on the page itself.


[ad#AdBrite-Post]

Google’s creating useful 404 pages didn’t work out either as it offered only to show me a text box with keywords pre-populated. I wanted something similar, but with the results of the search in the 404 error page itself, just like the AskApache’s Google 404 plugin. The smart 404 plugin didn’t work for me and many others as well after 2.7.1 upgrade. The askapache needed some .htaccess tweaking which is handled very poorly by godaddy’s Windows hosting. So I decided to write one myself and the result is what you can see here

The first thing I did was to change godaddy’s default error behaviour to redirect to a custom error page titled 404.html just under my root. After about one hour or so, my site got updated and all the 404 behaviours were directed to my page.

[ad#AdBrite-Post]

There are two ways (atleast that which is handled by my 404) in which one would come to your site. One is by typing the URL wrongly or from a old outdated bookmark. Or from one of your old blog redirection. In my case, my old blog was at blogger.com and I’ve set it up to redirect to my new domain. However, because I changed my permalink settings to avoid showing the classic year/month in the URL, all my redirection from blogspot.com were hitting 404’s… :( If smart 404 worked as promised, i would have been happier. But unfortunately, even after the release of 2.8.3 (at the time of writing this), the plugin didn’t work. So the first thing I did was to extract keywords from the referrer url, document.referrer. In case the document.referrer is empty, it means the user has typed a wrong url in the address bar or followed a old bookmark. In that case I extract keywords from document.location.href, which is the wrongly entered url. I strip of everything except the post name which by far has the most keywords related to the URL and pass it to Google AJAX Search API.

Based on inputs from various other sources including my favourite Jakob Nielsen’s suggestions, I decided that my 404 should look like a real *error* page rather than a blog post. It should possibly have a sitemap if it’s a website or links to popular posts in case of a blog. It should take your users to important places in your website as in my 404 page offers links to my homepage and blog. Above all, it should have a search box where user could search for what he was looking for without hitting the browser back button.

My version of 404 error page looks like this.

404 Error page @ mugunthkumar.com

404 Error page @ mugunthkumar.com

It uses plain html and javascript. It’s not a server scripted file like PHP of ASPX. You can go ahead and copy the file (Cmd click -> View Page Source) from my error page and use it in your own site. I would be glad if you could attribute me by linking to this post or blog, though it’s purely optional and I leave it to you.

Tip: Displaying a banner (or crash IE) when people visit your site using IE6

July 28th, 2009 by Mugunth Kumar

You must be knowing that Youtube, displays a subtle warning when users visit it from IE6 browser. Though everyone knows that IE6 is the most crappy browser on planet Earth, corporates are still hesistant to migrate to other Microsoft browsers or from other Vendors like Mozilla/Google/Apple.

To make more and more people aware of the security risks involved with IE, a whole lot of campaign started on Twitter, including  adding a Twibbon to support a cause, “IE 6 must die

You as a wordpress self-hosted user can also help the cause, by installing this plugin.


http://www.incerteza.org/blog/projetos/shockingly-big-ie6-warning/

Thanks to incerteza.org

PS: I have added it to this blog. Try visiting it from IE6. You will see somthing like this.

IE6 Warning

Warn IE6 users about it's pathetic security holes...

The plugin can also be configured to crash your visitor’s browser if they visit from IE6!!! Super cool!!!

incerteza.org rocks..! Doom to IE6…


Mugunth


11 visitors online now
11 guests, 0 members
Max visitors today: 13 at 12:58 am SGT
This month: 58 at 03-01-2010 02:57 am SGT
This year: 59 at 02-12-2010 06:23 am SGT
All time: 59 at 12-19-2009 09:48 pm SGT