Monday, January 30, 2012

Customizing The Mongodb Interactive Shell

When the shell is launched, it checks the user's home directory for a javascript file named .mongorc.js.
If this file is found, its contents are interpreted and run by the shell prior to displaying the prompt for the first time.
This allows the user to define variables, customize the prompt, or update information that they would like updated every time they launch a shell.

Here is my .mongorc.js

Tuesday, January 24, 2012

Show file history in git

There are two amazing tools to show a history of a file in git.

gitk /path/of/file
or
tig /path/of/file

Saturday, January 21, 2012

Google Chrome 'Confirm to Quit' on Lion

To avoid accidentally closing the browser, executing this line in Terminal makes Google Chrome require
Shift + Cmd + Q to quit.

Thursday, January 19, 2012

localStorage in iOS5 Private Browsing mode

Attempting to use localStorage.setItem in iOS5 Private Browsing mode will throw the exception

QUOTA_EXCEEDED_ERRROR DOM Exception 22.

But getItem and removeItem calls do not throw.

You can see some details about that in the jStorage discussion

Monday, January 16, 2012

Font smoothing on Webkit

I’m not a big fan of the default text rendering in WebKit, it looks heavy. Fortunately there is a solution.


You can find here more examples on Christoph Zillgen's site.

Friday, January 6, 2012

Sluggish scroll in MacVim

There can be several reasons for sluggish scroll.
For me setting up 'ttyfast' solved the problem.

Delete all trailing whitespace in VIM


You can find more information about VIM and whitespaces here

Remove app from sale in iTunes Connect

It is not trivial.

1. Select your app

2. Click on Rights and Pricing

3. There is a link 'Unless you select specific stores, your app will be for sale in all App Stores worldwide.', click on the 'specific stores'

4. Deselect all locations

5. Save

Now, after removing the app form sale, you can remove it.