Mac: Take a screenshot in different ways

In Mac OS X, there are 3 ways to take a screenshot.

1. Cmd+Shift+3 : Capture the entire screen.

2. Cmd+Shift+4 : Capture a selected area of your screen. The cursor will turn into a crosshair and you can drag around the area you want to capture.

3. Cmd+Shift+4+Spacebar : Capture a specific window or Dock or menu bar. The crosshair will turn into a little camera and highlight the window or objects you can capture. Left Click to capture.
You can use Expose shortcut to switch between windows. After you switch press alt or cmd key to get the little camera. Left Click to capture.

jQuery: get specific list item by id

Consider the following html snippet

<div id="fruits">  
      <ul>  
           <li id="5">Apples</li>  
           <li id="29">Oranges</li>  
           <li id="32">Peaches</li>  
           <li id="47">Bananas</li>  
           <li id="30">Grapes</li>  
      </ul>  
 </div>  

You can get a specific list item using jQuery
 $jq("#fruits ul li[id=32]");  

Mac: Mac OS X 10.6.8 Printing Issue, and a Fix

With the recent update to Mac OS X 10.6.8, the printing does not work.
After updating to 10.6.8, you might be Getting “paused printer” message

Download Fix Here

For More details, View This Post 

Python contextlib for Timing Python code

If you've ever found yourself needing to measure the execution time of specific portions of your Python code, the `contextlib` module o...