<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Code Dreamer : Nitin Hayaran &#187; Tips &amp; Tricks</title>
	<atom:link href="http://www.nitinh.com/category/tips-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nitinh.com</link>
	<description>Nitin Hayaran&#039;s Blog</description>
	<lastBuildDate>Sun, 29 Jan 2012 07:28:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>GitHub Setup on Webfaction : How To ?</title>
		<link>http://www.nitinh.com/2011/02/github-setup-on-webfaction-how-to/</link>
		<comments>http://www.nitinh.com/2011/02/github-setup-on-webfaction-how-to/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 08:00:47 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[revision]]></category>
		<category><![CDATA[versioning]]></category>
		<category><![CDATA[webfaction]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/?p=521</guid>
		<description><![CDATA[Git is a very popular distributed revision control system with an emphasis on speed. Recently for my projects I need to setup up a private Git Setup on Webfaction Server. So here is the way to Install and start using Git on Webfaction. How to Install Git on Webfaction Log into your Webfaction Control Panel [...]]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"></div><p><a href="http://git-scm.com/">Git</a> is a very popular distributed revision control system with an emphasis on speed. Recently for my projects I need to setup up a private Git Setup on <a href="http://www.webfaction.com/">Webfaction</a> Server. So here is the way to Install and start using Git on Webfaction.<span id="more-521"></span></p>
<h3>How to Install Git on Webfaction</h3>
<ol>
<li>Log into your Webfaction Control Panel</li>
<li>Navigate to <strong>Domains/Websites » Applications</strong></li>
<li>Click <strong>Add New</strong></li>
<li>Enter <em>git</em> as the application name in the <strong>Name</strong> field</li>
<li>Select <em>git</em> from the <strong>App category</strong> menu</li>
<li>Enter a password for the default user in the <strong>Extra Info</strong> field</li>
<li>Click the <strong>Create</strong> button</li>
</ol>
<p>The Git application provides a subdirectory, <tt>bin</tt>, which contains the Git executables. It also provides a subdirectory, <tt>repos</tt>, to store your Git repositories. <tt>repos/proj.git</tt> has been created automatically as an example.</p>
<p>Later you'll have to create a Website (Domain/Website -&gt; Website, in Control Panel), which maps this newly created Git application to some subdomain. For further explanation i'll assume this domain to be <em><strong>"git.domain.com"</strong></em></p>
<p>If you want you can delete existing proj.git by simply deleting this directory.<br />
<code>rm -r ~/webapps/<em>git</em>/repos/<em>proj</em>.git</code></p>
<h3>Create a new Git Repository</h3>
<ol>
<li>Open an SSH session to your webfaction account: <code>ssh username@username.webfactional.com</code></li>
<li><code>cd ~/webapps/git/</code></li>
<li><code>./bin/git init --bare ./repos/<em>reponame</em>.git</code><br />
This will create a new repository, where <em>reponame</em>is the name of your repository</li>
<li><code>cd repos/<em>repo</em>.git</code></li>
<li><code>../../bin/git config http.receivepack true</code><br />
This will enable HTTP push to repository</li>
</ol>
<h3>Pushing local code to this repository</h3>
<ol>
<li><code>cd /path/to/your/local/repository/</code></li>
<li><code>git init</code> If it’s not already under version control</li>
<li><code>git add .</code></li>
<li><code>git commit -a -m 'Initial commit.'</code></li>
<li>If you want to use <strong>SSH mode</strong> then<br />
<code>git remote add origin ssh://username@git.domain.com/~/webapps/git/repos/reponame.git</code><br />
For <strong>HTTP Mode</strong><br />
<code>git remote add origin http://username@git.domain.com/reponame.git</code></li>
<li><code>git push origin master</code></li>
<li><code>git push</code></li>
</ol>
<p>Final Command should give you <code>Everything up-to-date</code> message.</p>
<h3>Introduce Yourself to Git Server</h3>
<p>It is a good idea to introduce yourself to git with your name and public email address before doing any operation. The easiest way to do so is:<br />
<code>git config --global user.name "Nitin Hayaran"</code><br />
<code>git config --global user.email you@yourdomain.example.com</code></p>
<h4>Troubleshooting</h4>
<p>On giving <code>git push origin master</code> command git may throw error <code>error: RPC failed; result=22, HTTP code = 411</code>. It will show you message like this:</p>
<blockquote><p>Compressing objects: 100% (792/792), done.<br />
error: RPC failed; result=22, HTTP code = 411<br />
Writing objects: 100% (1148/1148), 18.79 MiB | 13.81 MiB/s, done.<br />
Total 1148 (delta 356), reused 944 (delta 214)</p></blockquote>
<p>This error comes when either your code size is big, or there is any file with big size. To solve this problem you need to increase buffer size in Git configuration.<br />
<code>git config http.postBuffer 524288000</code></p>
<h3>Clone Your Repository Somewhere New</h3>
<p>With SSH Mode Setup<br />
<code>git clone username@git.domain.com:webapps/git/repos/reponame.git</code><br />
For HTTP Push Mode<br />
<code>git clone http://username@git.domain.com/reponame.git</code></p>
<h4>Further Information</h4>
<ul>
<li><a href="http://docs.webfaction.com/software/git.html">Webfaction’s Git Documentation</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2011/02/github-setup-on-webfaction-how-to/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RegEx to Convert String in TitleCase (Python / Django)</title>
		<link>http://www.nitinh.com/2010/11/regex-to-convert-string-in-titlecase-python-django/</link>
		<comments>http://www.nitinh.com/2010/11/regex-to-convert-string-in-titlecase-python-django/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 16:16:43 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[capitalization]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[title case]]></category>
		<category><![CDATA[titlecase]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/?p=504</guid>
		<description><![CDATA[TweetShareDuring web development I very often come across a problem to convert any string into TitleCase. Those who don't know title case is the style of writing having first letter as a majuscule (upper-case letter) and the remaining letters in minuscules (lower-case letters). So here is the python function to do that: def title&#40;value&#41;: &#34;&#34;&#34;Converts [...]


Related posts:<ol><li><a href='http://www.nitinh.com/2009/02/django-orm-what-to-do-when-the-memory-requirement-goes-high/' rel='bookmark' title='Permanent Link: Django ORM : What to do when the memory requirement goes high?'>Django ORM : What to do when the memory requirement goes high?</a></li>
<li><a href='http://www.nitinh.com/2009/10/implementing-search-in-django-site-using-haystack-and-xapian-whoosh/' rel='bookmark' title='Permanent Link: Implementing Search in Django Site using HayStack and Xapian / Whoosh'>Implementing Search in Django Site using HayStack and Xapian / Whoosh</a></li>
<li><a href='http://www.nitinh.com/2009/02/installing-memcached-for-django-application-on-windows-xp/' rel='bookmark' title='Permanent Link: Installing Memcached for Django Application on Windows XP'>Installing Memcached for Django Application on Windows XP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button-left"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="socializeWP" data-url="http://www.nitinh.com/2010/11/regex-to-convert-string-in-titlecase-python-django/">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="socialize-in-button-left"><a name="fb_share" type="box_count" share_url="http://www.nitinh.com/2010/11/regex-to-convert-string-in-titlecase-python-django/" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div></div><p>During web development I very often come across a problem to convert any string into <a href="http://en.wikipedia.org/wiki/Capitalization">TitleCase</a>. Those who don't know title case is the style of writing having first letter as a majuscule (upper-case letter) and the remaining letters in minuscules (lower-case letters).</p>
<p><span id="more-504"></span></p>
<p>So here is the python function to do that:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> title<span style="color: black;">&#40;</span>value<span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;Converts a string into titlecase.&quot;&quot;&quot;</span>
    t = <span style="color: #dc143c;">re</span>.<span style="color: black;">sub</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;([a-z])'([A-Z])&quot;</span>, <span style="color: #ff7700;font-weight:bold;">lambda</span> m: m.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>.<span style="color: black;">lower</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>, value.<span style="color: black;">title</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">sub</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\d</span>([A-Z])&quot;</span>, <span style="color: #ff7700;font-weight:bold;">lambda</span> m: m.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>.<span style="color: black;">lower</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>, t<span style="color: black;">&#41;</span></pre></div></div>

<p>Happy Coding</p>


<p>Related posts:<ol><li><a href='http://www.nitinh.com/2009/02/django-orm-what-to-do-when-the-memory-requirement-goes-high/' rel='bookmark' title='Permanent Link: Django ORM : What to do when the memory requirement goes high?'>Django ORM : What to do when the memory requirement goes high?</a></li>
<li><a href='http://www.nitinh.com/2009/10/implementing-search-in-django-site-using-haystack-and-xapian-whoosh/' rel='bookmark' title='Permanent Link: Implementing Search in Django Site using HayStack and Xapian / Whoosh'>Implementing Search in Django Site using HayStack and Xapian / Whoosh</a></li>
<li><a href='http://www.nitinh.com/2009/02/installing-memcached-for-django-application-on-windows-xp/' rel='bookmark' title='Permanent Link: Installing Memcached for Django Application on Windows XP'>Installing Memcached for Django Application on Windows XP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2010/11/regex-to-convert-string-in-titlecase-python-django/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Make Your Firefox Even Better by tweaking its looks</title>
		<link>http://www.nitinh.com/2010/01/make-your-firefox-even-better-by-tweaking-its-looks/</link>
		<comments>http://www.nitinh.com/2010/01/make-your-firefox-even-better-by-tweaking-its-looks/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 11:09:28 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[Hack]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Customize]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/?p=423</guid>
		<description><![CDATA[TweetShareFirefox is my favorite browser. The biggest reason for this is its repository of useful plugins. The only problem which I see in its default installation is the screen usage. With this I mean, Firefox wastes a lot of screen real estate in unnecessary menus, buttons. The good news is that it also provides flexibility [...]


Related posts:<ol><li><a href='http://www.nitinh.com/2010/03/beautiful-nag-screen-using-mootools-css3/' rel='bookmark' title='Permanent Link: Beautiful Nag Screen using Mootools &amp; CSS3'>Beautiful Nag Screen using Mootools &amp; CSS3</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button-left"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="socializeWP" data-url="http://www.nitinh.com/2010/01/make-your-firefox-even-better-by-tweaking-its-looks/">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="socialize-in-button-left"><a name="fb_share" type="box_count" share_url="http://www.nitinh.com/2010/01/make-your-firefox-even-better-by-tweaking-its-looks/" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div></div><p><img class="alignleft" style="margin: 0 10px 10px 0;" src="http://imgur.com/5omFL.png" alt="Firefox logo" width="148" height="148" />Firefox is my favorite browser. The biggest reason for this is its repository of  useful plugins. The only problem which I see in its default installation is the screen usage. With this I mean, Firefox wastes a lot of screen real estate in unnecessary menus, buttons. The good news is that it also provides flexibility to customize its overall look and feel.</p>
<p><span id="more-423"></span></p>
<p>I have to tried to optimize my Firefox, and I am pretty happy with the new look. It gives more space for webpage. More emphasis on stuff that is important.</p>
<h3>Previous Look</h3>
<p><img src="http://imgur.com/YePcq.jpg" alt="Firefox Original" /></p>
<h3>New Look</h3>
<p><img src="http://imgur.com/ID71j.jpg" alt="Firefox New Look" /></p>
<h4>Changes</h4>
<p>In new look there are following changes:</p>
<ol>
<li><strong>Hide Menu Bar</strong> : As I have seen from my usage I don't really access menus. I simply use its <a href="http://support.mozilla.com/en-US/kb/Keyboard+shortcuts">keyboard shortcuts</a>. So it is actually not needed for me.</li>
<li><strong>Show Small Icons</strong> : Fairly decent visibility for buttons even when they are smal.</li>
<li><strong>Place Firebug and Web Developer buttons before search bar</strong> : Being a web developer these two plugins are my best friends. So, I have kept their button on the top bar.</li>
<li><strong>Hide Status bar</strong> : After placing Firebug in top bar I realized there is no need for a status bar. I only use it to access Firebug.</li>
<li><strong>Hide Web-Developer Toolbar</strong> : After placing Web Developer Icon in top bar I realized there is no need for a separate menu bar. I can always simple show/hide it on clicking this button.</li>
</ol>
<h4>Analysis</h4>
<p>I have reclaimed 75px from Firefox for my Web Pages. Initially webpage client area was 581px now it is 656px. </p>
<p>I really liked these changes in my browser. Hope you'll also like them.</p>


<p>Related posts:<ol><li><a href='http://www.nitinh.com/2010/03/beautiful-nag-screen-using-mootools-css3/' rel='bookmark' title='Permanent Link: Beautiful Nag Screen using Mootools &amp; CSS3'>Beautiful Nag Screen using Mootools &amp; CSS3</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2010/01/make-your-firefox-even-better-by-tweaking-its-looks/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Drop Shadow in Images : No extra markup</title>
		<link>http://www.nitinh.com/2010/01/drop-shadow-in-images-no-extra-markup/</link>
		<comments>http://www.nitinh.com/2010/01/drop-shadow-in-images-no-extra-markup/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 15:01:49 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[box-shadow]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[shadow]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/?p=367</guid>
		<description><![CDATA[TweetShareDrop Shadows adds extra glare to any design. They can be easily accomplished in any graphic editor, however its a little tricky in web programming. In this post I'll walk you through various ways in which you can add shadows to images without any extra markup used. In all cases i'll use the same HTML [...]


Related posts:<ol><li><a href='http://www.nitinh.com/2010/03/sexy-tooltip-using-css3/' rel='bookmark' title='Permanent Link: Sexy Tooltip using CSS3 (no images)'>Sexy Tooltip using CSS3 (no images)</a></li>
<li><a href='http://www.nitinh.com/2009/10/beautiful-thumbnail-hover-effect-using-mootools/' rel='bookmark' title='Permanent Link: Beautiful Thumbnail Hover Effect : Using Mootools'>Beautiful Thumbnail Hover Effect : Using Mootools</a></li>
<li><a href='http://www.nitinh.com/2009/11/another-beautiful-thumbnail-hover-effect-using-mootools/' rel='bookmark' title='Permanent Link: Another Beautiful Thumbnail Hover Effect : Using Mootools'>Another Beautiful Thumbnail Hover Effect : Using Mootools</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button-left"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="socializeWP" data-url="http://www.nitinh.com/2010/01/drop-shadow-in-images-no-extra-markup/">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="socialize-in-button-left"><a name="fb_share" type="box_count" share_url="http://www.nitinh.com/2010/01/drop-shadow-in-images-no-extra-markup/" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div></div><p><img class="alignleft" style="margin:0 10px 10px 0;" src="http://imgur.com/KYga8.jpg" alt="Image with shadow" width="150" height="149" />Drop Shadows adds extra glare to any design. They can be easily accomplished in any graphic editor, however its a little tricky in web programming. In this post I'll walk you through various ways in which you can add shadows to images without any extra markup used.<span id="more-367"></span><br />
In all cases i'll use the same HTML code for showing Image.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;image.jpg&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;thumbnail&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<h3>CSS 3</h3>
<p>In the latest <a href="http://www.w3.org/TR/2005/WD-css3-background-20050216/#the-box-shadow">public working draft</a> we have a box-shadow property. This property can be used to draw a drop-shadow for a CSS box. </p>
<p>
<img style="padding:4px;border:1px solid #DDD;-moz-box-shadow: 5px 5px 7px #999;box-shadow: 5px 5px 7px #999;-webkit-box-shadow: 5px 5px 7px #999;" src="/static/Thumbnails/1_thumb.jpg" />
</p>
<p>The CSS for the above example is :</p>
<pre language="css">.thumbnail{
    padding:4px;
    border:1px solid #DDD;
    -moz-box-shadow: 5px 5px 7px #999;
    box-shadow: 5px 5px 7px #999;
    -webkit-box-shadow: 5px 5px 7px #999;
}</pre>
<p>Good naa !!!<br/><br />
But the problem with this implementation is that it doesn't work in IE. The Box Shadow property is supported by only :<br />
+ Firefox 3.5<br />
+ Safari (3.2.1)<br />
+ Google Chrome 2<br />
So its up to you whether you want to ignore IE users or not.</p>
<p>Now lets see other approach.</p>
<h3>Using Background Shadow Image</h3>
<p>In this approach we'll be using an extra image in background that will give shadow effect. This technique is also illustrated here "<a href="http://www.alistapart.com/articles/cssdropshadows/">CSS Drop Shadows</a>".<br />
<img style="width:250px;height:250px;padding:8px 13px 14px 10px;background:transparent url('/static/css-shadow/image-bg.png') no-repeat 0 0;border:0px;" src='/static/css-shadow/1.jpg' /><br />
In this case the CSS used is:</p>
<pre language="css">
.thumbnail{
    width:250px;
    height:250px;
    padding:4px 14px 14px 4px;
    background:transparent url('image-bg.png') no-repeat 0 0;
}
</pre>
<p>Some other implementations are </p>
<p><a target="_blank" class='button' href='/static/css-shadow/index1.html'>Demo 1</a></p>
<p><a target="_blank" class='button' href='/static/css-shadow/index.html'>Demo 2</a></p>
<p>Hope this article will give more ideas for similar implementation. </p>
<p>Happy Coding!!!!</p>


<p>Related posts:<ol><li><a href='http://www.nitinh.com/2010/03/sexy-tooltip-using-css3/' rel='bookmark' title='Permanent Link: Sexy Tooltip using CSS3 (no images)'>Sexy Tooltip using CSS3 (no images)</a></li>
<li><a href='http://www.nitinh.com/2009/10/beautiful-thumbnail-hover-effect-using-mootools/' rel='bookmark' title='Permanent Link: Beautiful Thumbnail Hover Effect : Using Mootools'>Beautiful Thumbnail Hover Effect : Using Mootools</a></li>
<li><a href='http://www.nitinh.com/2009/11/another-beautiful-thumbnail-hover-effect-using-mootools/' rel='bookmark' title='Permanent Link: Another Beautiful Thumbnail Hover Effect : Using Mootools'>Another Beautiful Thumbnail Hover Effect : Using Mootools</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2010/01/drop-shadow-in-images-no-extra-markup/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Goo.gl : Google URL Shortner Bookmarklet</title>
		<link>http://www.nitinh.com/2010/01/goo-gl-google-url-shortner-bookmarklet/</link>
		<comments>http://www.nitinh.com/2010/01/goo-gl-google-url-shortner-bookmarklet/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 10:17:17 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[url shortner]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/?p=355</guid>
		<description><![CDATA[TweetShare Google URL Shortener at goo.gl is a service that takes long URLs and squeezes them into fewer characters to make a link that is easier to share, tweet, or email to friends. [official announcement] Presently Google allows URL shortening service only through its toolbar. However, If you are looking for a way to create [...]


Related posts:<ol><li><a href='http://www.nitinh.com/2009/03/12-must-have-bookmarklets-google-chrome-and-ie/' rel='bookmark' title='Permanent Link: 12 Must Have Bookmarklets : Google Chrome and IE'>12 Must Have Bookmarklets : Google Chrome and IE</a></li>
<li><a href='http://www.nitinh.com/2009/03/readability-making-reading-pleasant/' rel='bookmark' title='Permanent Link: Readability : Making reading pleasant'>Readability : Making reading pleasant</a></li>
<li><a href='http://www.nitinh.com/2009/02/dictionary-on-double-click-bookmarklet/' rel='bookmark' title='Permanent Link: Dictionary on double click : BookMarklet'>Dictionary on double click : BookMarklet</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button-left"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="socializeWP" data-url="http://www.nitinh.com/2010/01/goo-gl-google-url-shortner-bookmarklet/">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="socialize-in-button-left"><a name="fb_share" type="box_count" share_url="http://www.nitinh.com/2010/01/goo-gl-google-url-shortner-bookmarklet/" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div></div><p><img class="alignleft" style="margin: 0 10px 10px 0;" src="http://www.google.com/images/logo_sm.gif" alt="Google" width="150" height="55" /> Google URL Shortener at <a href="http://goo.gl/">goo.gl</a> is a service that takes long URLs and squeezes them into fewer characters to make a link that is easier to share, tweet, or email to friends. [<a href="http://googleblog.blogspot.com/2009/12/making-urls-shorter-for-google-toolbar.html">official announcement</a>]</p>
<p><span id="more-355"></span></p>
<p>Presently Google allows URL shortening service only through its toolbar. However, If you are looking for a way to create your own short URLs with goo.gl but without installing the Google Toolbar, here’s a bookmarklet for you.</p>
<p><a class="button" href="javascript:window.googl_callback = function(response){if(response.error_message){alert(&quot; An error occured: &quot; + response.error_message);}else{var div=document.createElement('div');div.style.position='fixed';div.style.zIndex=1000;div.style.top='100px';div.style.left='100px';div.style.fontSize='18px';div.style.fontFamily='Arial';div.style.color='#CF0000';div.style.padding='10px';div.style.border='1px solid #000';div.style.backgroundColor='#efefef';div.innerHTML=response.short_url;document.body.appendChild(div);}}; var s = document.createElement(&quot;script&quot;); s.src = &quot;http://ggl-shortener.appspot.com/?url=&quot; + encodeURIComponent(window.location.href) + &quot;&amp;jsonp=googl_callback&quot;; void(document.body.appendChild(s));">Goo.gl This Page!</a></p>
<p>Simply drag this link into your browser’s bookmark toolbar (or add to favorites in IE) and you’re done. The goo.gl bookmarklet will even work in Safari and Opera browsers that are otherwise not supported by the Google Toolbar.</p>
<div class="wp-caption alignnone" style="width: 510px"><img class=" " title="Google URL Shortner : Bookmarklet" src="http://imgur.com/9SJ0E.jpg" alt="Google URL Shortner : Bookmarklet" width="500" /><p class="wp-caption-text">Google URL Shortner : Bookmarklet</p></div>


<p>Related posts:<ol><li><a href='http://www.nitinh.com/2009/03/12-must-have-bookmarklets-google-chrome-and-ie/' rel='bookmark' title='Permanent Link: 12 Must Have Bookmarklets : Google Chrome and IE'>12 Must Have Bookmarklets : Google Chrome and IE</a></li>
<li><a href='http://www.nitinh.com/2009/03/readability-making-reading-pleasant/' rel='bookmark' title='Permanent Link: Readability : Making reading pleasant'>Readability : Making reading pleasant</a></li>
<li><a href='http://www.nitinh.com/2009/02/dictionary-on-double-click-bookmarklet/' rel='bookmark' title='Permanent Link: Dictionary on double click : BookMarklet'>Dictionary on double click : BookMarklet</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2010/01/goo-gl-google-url-shortner-bookmarklet/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>how to be Invisible In Gtalk : Gtalk Hacks</title>
		<link>http://www.nitinh.com/2009/04/how-to-be-invisible-in-gtalk-gtalk-hacks/</link>
		<comments>http://www.nitinh.com/2009/04/how-to-be-invisible-in-gtalk-gtalk-hacks/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 16:21:27 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[gtalk]]></category>
		<category><![CDATA[idle]]></category>
		<category><![CDATA[invisible]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/?p=189</guid>
		<description><![CDATA[TweetShareOne of the most awaited feature is to set invisible status in gtalk. Just like yahoo messenger invisible status in gtalk will allow you to be online without being bugged by gtalk friends when you are at work or don’t feel like to be annoyed by your gtalk friends. Although in Chat inside gmail you [...]


Related posts:<ol><li><a href='http://www.nitinh.com/2009/03/news-twitter-friendfeed-and-many-more-in-gtalk-are-chat-client-becoming-new-browsers/' rel='bookmark' title='Permanent Link: News, Twitter, FriendFeed and Many more in GTalk : Are Chat Client Becoming new Browsers ?'>News, Twitter, FriendFeed and Many more in GTalk : Are Chat Client Becoming new Browsers ?</a></li>
<li><a href='http://www.nitinh.com/2009/03/cleartrip-launches-chat-bot-booking-agent-for-trains/' rel='bookmark' title='Permanent Link: Cleartrip Launches Chat Bot Booking Agent For Trains'>Cleartrip Launches Chat Bot Booking Agent For Trains</a></li>
<li><a href='http://www.nitinh.com/2009/03/chat-client-for-naukari-job-search/' rel='bookmark' title='Permanent Link: Chat Client for Naukari Job Search'>Chat Client for Naukari Job Search</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button-left"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="socializeWP" data-url="http://www.nitinh.com/2009/04/how-to-be-invisible-in-gtalk-gtalk-hacks/">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="socialize-in-button-left"><a name="fb_share" type="box_count" share_url="http://www.nitinh.com/2009/04/how-to-be-invisible-in-gtalk-gtalk-hacks/" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div></div><p><img src="http://www.google.com/talk/images/talk_logo.gif" alt="gTalk" style='float:left; margin:5px  10px 10px 0;' />One of the most awaited feature is to set invisible status in gtalk. Just like yahoo messenger invisible status in gtalk will allow you to be online without being bugged by gtalk friends when you are at work or don’t feel like to be annoyed by your gtalk friends.
</p>
<p><span id="more-189"></span></p>
<p>
Although in Chat inside gmail you can set status to invisible, but not in GTalk.</p>
<p>There are <strong>two approaches</strong> to be invisible in google chat, lets discuss about both of them.</p>
<h4>Using GTalk Labs Edition</h4>
<p>Google Talk, Labs Edition is an experimental release of the Google Talk client. It has many of the same great features as the Google Talk Gadget, including instant messaging, emoticons, and group chat. Google Talk Labs Edition also includes new desktop notifications from Gmail, Calendar and Orkut.</p>
<p>You will need to first download <a href="http://www.softpedia.com/progDownload/Google-Talk-Labs-Edition-Download-97358.html">gtalk labs edition</a>, and install it.</p>
<h4>Using PSI : Jabber Based Chat Client</h4>
<p>Gtalk is Jabber based IM tool. Although Gtalk supports invisible mode on server side, Gtalk team did not include this function on client side which all of us are using. If you’d like to get that option that you will need to go back to Gtalk’s ancestors which is Jabber client. Some says “use Jabber client instead of crappy Google Talk client.” So you have the option of using PSI or Pidgin (originally gaim). You can download those clients from:<br />
PSI: http://psi-im.org/<br />
Pidgin: http://www.pidgin.im/</p>
<p>For more details follow video below:<BR><br />
<embed src="http://www.metacafe.com/fplayer/1083191/invisible_in_gtalk.swf" width="400" height="345" wmode="transparent" allowFullScreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"> </embed><BR><BR></p>
<h3>Always Idle in Gtalk</h3>
<p>By the way there is a software using which you can set your status to idle permanently. This software is<br />
<a href="/static/gAlwaysIdleSetup.exe">galwaysidle</a>, just download and install this software.<BR><br />
Hope these techniques will save you some time, and your so called friends will stop bugging you.</p>


<p>Related posts:<ol><li><a href='http://www.nitinh.com/2009/03/news-twitter-friendfeed-and-many-more-in-gtalk-are-chat-client-becoming-new-browsers/' rel='bookmark' title='Permanent Link: News, Twitter, FriendFeed and Many more in GTalk : Are Chat Client Becoming new Browsers ?'>News, Twitter, FriendFeed and Many more in GTalk : Are Chat Client Becoming new Browsers ?</a></li>
<li><a href='http://www.nitinh.com/2009/03/cleartrip-launches-chat-bot-booking-agent-for-trains/' rel='bookmark' title='Permanent Link: Cleartrip Launches Chat Bot Booking Agent For Trains'>Cleartrip Launches Chat Bot Booking Agent For Trains</a></li>
<li><a href='http://www.nitinh.com/2009/03/chat-client-for-naukari-job-search/' rel='bookmark' title='Permanent Link: Chat Client for Naukari Job Search'>Chat Client for Naukari Job Search</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2009/04/how-to-be-invisible-in-gtalk-gtalk-hacks/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>News, Twitter, FriendFeed and Many more in GTalk : Are Chat Client Becoming new Browsers ?</title>
		<link>http://www.nitinh.com/2009/03/news-twitter-friendfeed-and-many-more-in-gtalk-are-chat-client-becoming-new-browsers/</link>
		<comments>http://www.nitinh.com/2009/03/news-twitter-friendfeed-and-many-more-in-gtalk-are-chat-client-becoming-new-browsers/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 19:46:42 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[gtalk]]></category>
		<category><![CDATA[services]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/2009/03/news-twitter-friendfeed-and-many-more-in-gtalk-are-chat-client-becoming-new-browsers/</guid>
		<description><![CDATA[TweetShareFollowing my previous posts about cleartrip train search engine and naukari.com job search engine this post is regarding various other services available on GTalk Client. Here are various other usefull services being offered on Gtalk/Jabber Clients. Other Services Chat in multiple Languages 1. Add a transliteration bot to your friend list. There are 5 of [...]


Related posts:<ol><li><a href='http://www.nitinh.com/2009/04/how-to-be-invisible-in-gtalk-gtalk-hacks/' rel='bookmark' title='Permanent Link: how to be Invisible In Gtalk : Gtalk Hacks'>how to be Invisible In Gtalk : Gtalk Hacks</a></li>
<li><a href='http://www.nitinh.com/2009/03/chat-client-for-naukari-job-search/' rel='bookmark' title='Permanent Link: Chat Client for Naukari Job Search'>Chat Client for Naukari Job Search</a></li>
<li><a href='http://www.nitinh.com/2009/03/cleartrip-launches-chat-bot-booking-agent-for-trains/' rel='bookmark' title='Permanent Link: Cleartrip Launches Chat Bot Booking Agent For Trains'>Cleartrip Launches Chat Bot Booking Agent For Trains</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button-left"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="socializeWP" data-url="http://www.nitinh.com/2009/03/news-twitter-friendfeed-and-many-more-in-gtalk-are-chat-client-becoming-new-browsers/">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="socialize-in-button-left"><a name="fb_share" type="box_count" share_url="http://www.nitinh.com/2009/03/news-twitter-friendfeed-and-many-more-in-gtalk-are-chat-client-becoming-new-browsers/" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div></div><p>Following my previous posts about <a href="http://www.nitinh.com/2009/03/cleartrip-launches-chat-bot-booking-agent-for-trains/">cleartrip train search engine</a> and <a href="http://www.nitinh.com/2009/03/chat-client-for-naukari-job-search/">naukari.com job search engine</a> this post is regarding various other services available on GTalk Client. Here are various other usefull services being offered on Gtalk/Jabber Clients.<span id="more-142"></span></p>
<h4>Other Services</h4>
<ul>
<li>
<h5>Chat in multiple Languages</h5>
<p> 1. Add a transliteration bot to your friend list. There are 5 of them available currently: (en2hi.translit@bot.talk.google.com for Hindi, en2kn.translit@bot.talk.google.com for Kannada, en2te.translit@bot.talk.google.com for Telugu, en2ta.translit@bot.talk.google.com for Tamil and en2ml.translit@bot.talk.google.com for Malayalam)<BR> 2. Start chatting with your friend.<BR> 3. Convert the chat session to a group chat and invite the particular bot (you added in step 1) to the group chat.<BR><BR>
<p><img src="http://varunkashyap.files.wordpress.com/2008/08/gtalk.png?w=375&amp;h=380"></p>
<p> <BR><BR> </li>
<li>
<h5>Lattest news from IBN Live</h5>
<p>To get the lattest and hot news directly on your Gtalk add im@ibnalerts.com in your buddy list in Gtalk. Send help as instant message and you can get the list of accepted keywords. The keywords are like sports, ent and top. You receive news stories snippet along with link to the news story. By using IBNlive Gtalk buddy you can also search for stories on IBNlive.com, just send search “your query” (without quotes) as your message and you will receive links for your search related stories (for e.g. search Beijing Olympics )</li>
<li>
<h5>imfeeds@gmail.com</h5>
<p>Add this IM Feeds bot as your Google Talk buddy and you’ll be able to read any blog or website that syndicates content via RSS feeds.  To subscribe to a website in GTalk, simply send a new IM message that says "sub labnol.org" where labnol.org is the site address that you want to read inside Google Talk.</li>
<li>
<h5>friendfeed@bot.im</h5>
<p>This secret bot lets you post to FriendFeed from Google Talk. You may submit either hyperlinks or text messages.</li>
<li>
<h5>imified@imified.com</h5>
<p>This imified bot turns Google Talk into a real powerhouse.  You can post bookmarks to delicious, send messages to Twitter, submit blog entries to WordPress, Tumblr or Blogger, manage events in Google Calendar, shorten long URLs, run whois and so on. </li>
<li>
<h5>inezhabot@gmail.com</h5>
<p>Like IM Feeds, iNezha bot helps you read feeds inside Google Talk but this is slightly more versatile. For instance, you can simply say "digg" and it will show a list of all feeds that match that search term so you don’t have to type (or copy-paste) feed addresses. </li>
<li>
<h5>Translation</h5>
<p>This is a free service from Google that helps you translate words from a foreign language into your native language. Just add the relevant bot (e.g. hi2en@bot.talk.google.com for Hindi to English or en2hi@bot.talk.google.com for English to Hindi) as your buddy, send him a message and it will get translated instantly. </li>
<li>
<h5>Use Google Talk with Twitter</h5>
<p>Invite twitter@twitter.com to become your friend in Google Talk and verify your account. Now whenever you IM this new friend, the message will automatically publish on your twitter account. </LI>
<li>
<h5>Set Task Reminders</h5>
<p>If you need to remember something important, Google Talk can send you reminders for that event.  Just add timer to your Twitter friend’s list and then add twitter@twitter.com to your buddy list in Gtalk. Now if you want to get a reminder after 50 minutes, send a direct message to twitter like "d timer 50 pick kids from school" and a reminder will automatically pop up in your Google Talk after 50 minutes. </li>
<li>
<h5>Transliteration</h5>
<p>If you want to chat in your mother tongue (like Hindi or Tamil) but feel more comfortable using the English keyboard, Google Transliteration bot will come in handy.  For instance, add en2hi.translit@bot.talk.google.com to you friend’s list in GTalk and all messages you type in English will get transliterated in the language of your choice. Available only for a few Indian languages. </li>
<li>
<h5>Xpenser</h5>
<p>With xpenser, you can record travel expenses via email, SMS or even Google talk. Add xpenserbot@gmail.com as your buddy and send a message like "lunch 33.2 with Bill Gates" and that will be added as an expense to your online spreadsheet that can be accessed from anywhere. </li>
<li>
<h5>Ping.fm</h5>
<p>Like Imified, ping.fm is one of the most useful Google bots out there especially if you are a social networking or micro-blogging addict.  Add pingdotfm@gmail.com to Gtalk and you can communicate with twitter, jaiku, wordpress, identi.ca, facebook, myspace, bebo, friendfeed, linkedin, tumblr, plaxo, friendster, delicious and more. </li>
<li>
<h5>Meshly</h5>
<p>Add meshly@gmail.com as your friend and you’ll be able to post web link to your Meshly account via Google Talk. You can also add tags, categories and description to your hyperlink via Gtalk itself.</li>
<li>
<h5 style='color:RED'>Update : 17.03.09</h5>
</li>
<li>Want to get instant cricket scores &#8211; add instacricket@askme.im</li>
<li>Want to know your daily horoscope &#8211; add astro@askme.im</li>
<li>Want to know the latest prices of stocks &#8211; add stocks@askme.im</li>
<li>Want to get jokes &#8211; add jokes@askme.im</li>
<li>Want to get quotable quotes &#8211; add quotes@askme.im</li>
<li>Want to convert between currencies &#8211; add fx@askme.im</li>
<li>Want to do simple calculations &#8211; add calc@askme.im</li>
<li>Information on pending criminal cases against sitting MPs (Indian parliamentarians) &#8211; add nc@askme.im</li>
</ul>
<p>  After knowing so many services available on Gtalk/Jabber Clients you must have agreed that its usage is expanding. So here i ask you a question "are chat client really becoming new browsers?" . </p>
<h4>New Addition in List</h4>
<ul>
<li><strong>Everything related to Cricket</strong>: <strong>SEEKER@OCRICKET.COM </strong>:  It'll help you get information on Cricket &#8211; score, articles, photos, videos and much more. Type 'help' (without the quotes) to list available options
</li>
</ul>


<p>Related posts:<ol><li><a href='http://www.nitinh.com/2009/04/how-to-be-invisible-in-gtalk-gtalk-hacks/' rel='bookmark' title='Permanent Link: how to be Invisible In Gtalk : Gtalk Hacks'>how to be Invisible In Gtalk : Gtalk Hacks</a></li>
<li><a href='http://www.nitinh.com/2009/03/chat-client-for-naukari-job-search/' rel='bookmark' title='Permanent Link: Chat Client for Naukari Job Search'>Chat Client for Naukari Job Search</a></li>
<li><a href='http://www.nitinh.com/2009/03/cleartrip-launches-chat-bot-booking-agent-for-trains/' rel='bookmark' title='Permanent Link: Cleartrip Launches Chat Bot Booking Agent For Trains'>Cleartrip Launches Chat Bot Booking Agent For Trains</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2009/03/news-twitter-friendfeed-and-many-more-in-gtalk-are-chat-client-becoming-new-browsers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Scaling Your Frontend: Far-Futures Expire Headers</title>
		<link>http://www.nitinh.com/2009/03/scaling-your-frontend-far-futures-expire-headers/</link>
		<comments>http://www.nitinh.com/2009/03/scaling-your-frontend-far-futures-expire-headers/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 08:21:14 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[expire header]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[scaling]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/2009/03/scaling-your-frontend-far-futures-expire-headers/</guid>
		<description><![CDATA[TweetShareTo optimize our website load times we must optimize the frontend by setting far-futures headers. This simply means that media has an Expires tag of sometime in the distant future (maybe a year), and when we make changes, the filename needs to change. The easiest way to do this, is by adding a simple GET [...]


Related posts:<ol><li><a href='http://www.nitinh.com/2009/02/django-example-filefield-and-imagefield/' rel='bookmark' title='Permanent Link: Django Example: FileField and ImageField'>Django Example: FileField and ImageField</a></li>
<li><a href='http://www.nitinh.com/2009/03/compress-css-jsjavascript-files-using-php/' rel='bookmark' title='Permanent Link: Compress CSS / JS(Javascript) files Using PHP'>Compress CSS / JS(Javascript) files Using PHP</a></li>
<li><a href='http://www.nitinh.com/2009/10/implementing-search-in-django-site-using-haystack-and-xapian-whoosh/' rel='bookmark' title='Permanent Link: Implementing Search in Django Site using HayStack and Xapian / Whoosh'>Implementing Search in Django Site using HayStack and Xapian / Whoosh</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button-left"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="socializeWP" data-url="http://www.nitinh.com/2009/03/scaling-your-frontend-far-futures-expire-headers/">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="socialize-in-button-left"><a name="fb_share" type="box_count" share_url="http://www.nitinh.com/2009/03/scaling-your-frontend-far-futures-expire-headers/" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div></div><p>To optimize our website load times we must optimize the frontend by setting far-futures headers. This simply means that media has an Expires tag of sometime in the distant future (maybe a year), and when we make changes, the filename needs to change. The easiest way to do this, is by adding a simple GET parameter.</p>
<p><span id="more-138"></span></p>
<p><BR>
<p>We can do this by using a simple template tag (or a global object as it’s known in Jinja), to output the URL to the file, as well as the revision.</p>
<p><BR>
<pre class='brush: python'>
import os, os.path
from django.conf import settings
from jinja.contrib.djangosupport import register

def mediaurl(value):
    fname = os.path.abspath(os.path.join(settings.MEDIA_ROOT, value))
    if not fname.startswith(settings.BASE_PATH):
        raise ValueError("Media must be located within MEDIA_ROOT.")
    return '%s%s?%s' % (settings.MEDIA_URL, value, unicode(int(os.stat(fname).st_mtime)))
register.object(mediaurl)
</pre>
<p>Now to link our media files it’s quick and painless:</p>
<pre class='brush: html'>
&lt;link rel="stylesheet" type="text/css" href="{{ mediaurl('styles/screen.css') }}" /&gt;

<!-- JavaScript -->
<script type="text/javascript">BASE_URL = '{{ BASE_URL|escape }}';</script>
<script type="text/javascript" src="{{ mediaurl('common/scripts/mootools-1.2.js') }}"></script>
<script type="text/javascript" src="{{ mediaurl('common/scripts/global.js') }}"></script>
</pre>
<p>Although this is a nice way to do it with django, But its far better to set Expire Header at <strong>apache level only.</strong> This way the request won't come to django and server load will be far less.<br />
To set expire header from apache do proper settings in "httpd.conf" or "htaccess".</p>
<pre>
	&lt;Location "/flicks/thumbs500"&gt;
                SetHandler None
                Header unset ETag
                FileETag None
<strong>                Header set Expires "Thu, 15 Apr 2020 20:00:00 GMT"</strong>
        &lt;/Location&gt;
</pre>
<p>Hope this will make your website load faster.</p>


<p>Related posts:<ol><li><a href='http://www.nitinh.com/2009/02/django-example-filefield-and-imagefield/' rel='bookmark' title='Permanent Link: Django Example: FileField and ImageField'>Django Example: FileField and ImageField</a></li>
<li><a href='http://www.nitinh.com/2009/03/compress-css-jsjavascript-files-using-php/' rel='bookmark' title='Permanent Link: Compress CSS / JS(Javascript) files Using PHP'>Compress CSS / JS(Javascript) files Using PHP</a></li>
<li><a href='http://www.nitinh.com/2009/10/implementing-search-in-django-site-using-haystack-and-xapian-whoosh/' rel='bookmark' title='Permanent Link: Implementing Search in Django Site using HayStack and Xapian / Whoosh'>Implementing Search in Django Site using HayStack and Xapian / Whoosh</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2009/03/scaling-your-frontend-far-futures-expire-headers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Chat Client for Naukari Job Search</title>
		<link>http://www.nitinh.com/2009/03/chat-client-for-naukari-job-search/</link>
		<comments>http://www.nitinh.com/2009/03/chat-client-for-naukari-job-search/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 06:34:04 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[chatbot]]></category>
		<category><![CDATA[job search]]></category>
		<category><![CDATA[naukari]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/2009/03/chat-client-for-naukari-job-search/</guid>
		<description><![CDATA[TweetShareFollowing a train search ChatBot from cleartrip, Now Naukari.com has come up with a new chatbot to search Jobs. For this all you need is to add jobs@chat.naukri.com to your GTalk Client and start searching jobs. This hady tool will definetly make job search a little easier, although i doubt if there are any good [...]


Related posts:<ol><li><a href='http://www.nitinh.com/2009/03/news-twitter-friendfeed-and-many-more-in-gtalk-are-chat-client-becoming-new-browsers/' rel='bookmark' title='Permanent Link: News, Twitter, FriendFeed and Many more in GTalk : Are Chat Client Becoming new Browsers ?'>News, Twitter, FriendFeed and Many more in GTalk : Are Chat Client Becoming new Browsers ?</a></li>
<li><a href='http://www.nitinh.com/2009/03/cleartrip-launches-chat-bot-booking-agent-for-trains/' rel='bookmark' title='Permanent Link: Cleartrip Launches Chat Bot Booking Agent For Trains'>Cleartrip Launches Chat Bot Booking Agent For Trains</a></li>
<li><a href='http://www.nitinh.com/2009/04/how-to-be-invisible-in-gtalk-gtalk-hacks/' rel='bookmark' title='Permanent Link: how to be Invisible In Gtalk : Gtalk Hacks'>how to be Invisible In Gtalk : Gtalk Hacks</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button-left"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="socializeWP" data-url="http://www.nitinh.com/2009/03/chat-client-for-naukari-job-search/">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="socialize-in-button-left"><a name="fb_share" type="box_count" share_url="http://www.nitinh.com/2009/03/chat-client-for-naukari-job-search/" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div></div><p>Following a <a href="http://www.nitinh.com/2009/03/cleartrip-launches-chat-bot-booking-agent-for-trains/">train search ChatBot from cleartrip</a>, Now <a href="http://naukari.com">Naukari.com</a> has come up with a new chatbot to search Jobs. <BR> For this all you need is to add jobs@chat.naukri.com to your GTalk Client and start searching jobs. This hady tool will definetly make job search a little easier, although i doubt if there are any good job in this recession. <BR><span id="more-132"></span></p>
<h4>How to Use</h4>
<p> Please enter the following commands to search for jobs:
<ol>
<li>js -> to search for jobs&#8230;e.g. js project manager delhi 3 yrs, js sales manager Mumbai 5 yrs&#8230;You can enter your experience and preferred location to search for jobs.</li>
<li> next -> to view more jobs from your search</li>
<li>jd -> to view job in detail&#8230;e.g. jd ab0c1&#8230;where ab0c1 is a jobID mentioned at the end of each job in search result</li>
</ol>
<p> <BR>
<div style="width:425px;text-align:left" id="__ss_1120300"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/prashantk18/how-to-use-naukri-on-chat-through-gtalk-1120300?type=powerpoint" title="How To Use Naukri On Chat Through Gtalk">How To Use Naukri On Chat Through Gtalk</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=howtousenaukrionchatthroughgtalk-090309042532-phpapp01&amp;rel=0&amp;stripped_title=how-to-use-naukri-on-chat-through-gtalk-1120300" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=howtousenaukrionchatthroughgtalk-090309042532-phpapp01&amp;rel=0&amp;stripped_title=how-to-use-naukri-on-chat-through-gtalk-1120300" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/prashantk18">Naukri Team</a>.</div>
</div>


<p>Related posts:<ol><li><a href='http://www.nitinh.com/2009/03/news-twitter-friendfeed-and-many-more-in-gtalk-are-chat-client-becoming-new-browsers/' rel='bookmark' title='Permanent Link: News, Twitter, FriendFeed and Many more in GTalk : Are Chat Client Becoming new Browsers ?'>News, Twitter, FriendFeed and Many more in GTalk : Are Chat Client Becoming new Browsers ?</a></li>
<li><a href='http://www.nitinh.com/2009/03/cleartrip-launches-chat-bot-booking-agent-for-trains/' rel='bookmark' title='Permanent Link: Cleartrip Launches Chat Bot Booking Agent For Trains'>Cleartrip Launches Chat Bot Booking Agent For Trains</a></li>
<li><a href='http://www.nitinh.com/2009/04/how-to-be-invisible-in-gtalk-gtalk-hacks/' rel='bookmark' title='Permanent Link: how to be Invisible In Gtalk : Gtalk Hacks'>how to be Invisible In Gtalk : Gtalk Hacks</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2009/03/chat-client-for-naukari-job-search/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>12 Must Have Bookmarklets : Google Chrome and IE</title>
		<link>http://www.nitinh.com/2009/03/12-must-have-bookmarklets-google-chrome-and-ie/</link>
		<comments>http://www.nitinh.com/2009/03/12-must-have-bookmarklets-google-chrome-and-ie/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 08:37:19 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[google chrome]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/2009/03/12-must-have-bookmarklets-google-chrome-and-ie/</guid>
		<description><![CDATA[TweetShareAs we all know that Google took Chrome out of beta almost a month back, but still there is a strong feeling that there is a long way to go for the browser if it has to compete with other browers such as Firefox. The biggest feature that is missing in Chrome/IE is lack of [...]


Related posts:<ol><li><a href='http://www.nitinh.com/2010/01/goo-gl-google-url-shortner-bookmarklet/' rel='bookmark' title='Permanent Link: Goo.gl : Google URL Shortner Bookmarklet'>Goo.gl : Google URL Shortner Bookmarklet</a></li>
<li><a href='http://www.nitinh.com/2009/10/show-imdb-ratings-on-torrentzcom-using-greasemonkey-script/' rel='bookmark' title='Permanent Link: Show IMDB Ratings on Torrentz.com using GreaseMonkey Script'>Show IMDB Ratings on Torrentz.com using GreaseMonkey Script</a></li>
<li><a href='http://www.nitinh.com/2009/03/readability-making-reading-pleasant/' rel='bookmark' title='Permanent Link: Readability : Making reading pleasant'>Readability : Making reading pleasant</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button-left"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="socializeWP" data-url="http://www.nitinh.com/2009/03/12-must-have-bookmarklets-google-chrome-and-ie/">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="socialize-in-button-left"><a name="fb_share" type="box_count" share_url="http://www.nitinh.com/2009/03/12-must-have-bookmarklets-google-chrome-and-ie/" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div></div><p>As we all know that Google took Chrome out of beta almost a month back, but still there is a strong feeling that there is a long way to go for the browser if it has to compete with other browers such as Firefox. The biggest feature that is missing in Chrome/IE is lack of addons support. So in place of using addons I am using bookmarklets a lot more now. </p>
<p><span id="more-130"></span></p>
<p> If you don’t know, bookmarklets are just bookmarks that can perform an action (thanks to javascript) such as sharing something on Facebook, digging an article, adding something to your Amazon wish list, etc. </p>
<p> Bookmarklets are usually saved or dragged to your browsers’ bookmarks toolbar but,  you can also create a folder on your bookmarks toolbar &#038; then add each bookmarklet to that folder. This helps organize your bookmark toolbar so that you don’t have a long, never-ending row of bookmarlets. To cover all my bases, here is what you do &#8211; depending on the browser you use:
<ul>
<li>Firefox &#8211; Drag and drop the above link to your bookmarks toolbar or right-click the link and select "bookmark this link".</li>
<li>Internet Explorer &#8211; Right click on the link above, and select "add to favorites".</li>
<li>Chrome / Safari &#8211; Drag and drop the link to your bookmarks toolbar.</li>
</ul>
<h4>12 Must have Bookmarklets</h4>
<ol>
<li> <a href="javascript:(function(){f='http://delicious.com/save?url='+encodeURIComponent(window.location.href)+'&amp;title='+encodeURIComponent(document.title)+'&amp;v=5&amp;';a=function(){if(!window.open(f+'noui=1&amp;jump=doclose','deliciousuiv5','location=yes,links=no,scrollbars=no,toolbar=no,width=550,height=600'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()"><strong>Bookmark to Delicious</strong></a> &#8211; Bookmark the current page on Delicious</a></li>
<li><a href="javascript:(function(){var t = document.createElement('script');t.src = 'http://site.answers.com/main/js/web_answertip.js?ANSW.nafid=8';document.body.appendChild(t);t = document.createElement('span');t.id='answerTipEnabled';document.body.appendChild(t);})()"><strong>Dictionay:Dbl-Click</strong></a> &#8211; Just click on this bookmarklet, and then dictionary will be shown on double clicking any word.</li>
<li> <a href="javascript:(function(){readStyle='style-ebook';readSize='size-medium';readMargin='margin-wide';_readability_script=document.createElement('SCRIPT');_readability_script.type='text/javascript';_readability_script.src='http://lab.arc90.com/experiments/readability/js/readability-0.1.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(_readability_script);_readability_css=document.createElement('LINK');_readability_css.rel='stylesheet';_readability_css.href='http://lab.arc90.com/experiments/readability/css/readability.css';_readability_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_css);_readability_print_css=document.createElement('LINK');_readability_print_css.rel='stylesheet';_readability_print_css.href='http://lab.arc90.com/experiments/readability/css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_print_css);})();"><strong>Readability</strong></a> &#8211; Its an awesome script, increases <a href="http://www.nitinh.com/2009/03/readability-making-reading-pleasant/" target="_blank">readability of a page</a>.</li>
<li> <a href="javascript:window.location=%22http://news.ycombinator.com/submitlink?u=%22+encodeURIComponent(document.location)+%22&amp;t=%22+encodeURIComponent(document.title)"><strong>Post to News.YC</strong></a> &#8211; Post an article to news.ycombinator.com</li>
<li> <a href="javascript:(function(){m='http://mail.google.com/mail/?ui=1&amp;view=cm&amp;fs=1&amp;tf=1&amp;to=&amp;su='+encodeURIComponent(document.title)+'&amp;body='+encodeURIComponent(document.location);w=window.open(m,'addwindow','status=no,toolbar=no,width=575,height=545,resizable=yes');setTimeout(function(){w.focus();},%20250);})();"><strong>Gmail This</strong></a> &#8211; Allows you to email the current web page you’re on via your Gmail account.</li>
<li> <a href="javascript:(function(){function R(w){try{var d=w.document,j,i,t,T,N,b,r=1,C;for(j=0;t=[&quot;object&quot;,&quot;embed&quot;,&quot;applet&quot;,&quot;iframe&quot;][j];++j){T=d.getElementsByTagName(t);for(i=T.length-1;(i+1)&amp;&amp;(N=T[i]);--i)if(j!=3||!R((C=N.contentWindow)?C:N.contentDocument.defaultView)){b=d.createElement(&quot;div&quot;);b.style.width=N.width; b.style.height=N.height;b.innerHTML=&quot;&lt;del&gt;&quot;+(j==3?&quot;third-party &quot;+t:t)+&quot;&lt;/del&gt;&quot;;N.parentNode.replaceChild(b,N);}}}catch(E){r=0}return r}R(self);var i,x;for(i=0;x=frames[i];++i)R(x)})()"><strong>Adblock+</strong></a> &#8211; Ad block removes “java, flash, background music, and third-party iframes.” Thus it does a handy job of blocking the ads on a webpage. who says only firefox addon block ads ? Chrome too has a Adblock type addon now!</li>
<li> <a href="javascript:document.location.href='http://www.stumbleupon.com/submit?url='+document.URL+'&amp;title='+document.title.replace(/%20/g,'+');"><strong>Stumble it</strong></a> &#8211; Add this link and click on it whenever you want to Stumble a page you liked. I like this bookmarklet better than the toolbar as it gives me more space.Another way of stumbling a webpage can be found here.</li>
<li> <a href="javascript:location='http://translate.google.com/translate?u=' + encodeURIComponent(location);"><strong>Translate</strong></a> &#8211; Landed on a page that seems Greek to you ? No worry anymore, just click it and see the translation in English. YOu dont even need to know the source language.</li>
<li> <a href="javascript:var d=document,f='http://www.facebook.com/share',l=d.location,e=encodeURIComponent,p='.php?src=bm&amp;v=4&amp;i=1236238689&amp;u='+e(l.href)+'&amp;t='+e(d.title);1;try{if (!/^(.*\.)?facebook\.[^.]*$/.test(l.host))throw(0);share_internal_bookmarklet(p)}catch(z) {a=function() {if (!window.open(f+'r'+p,'sharer','toolbar=0,status=0,resizable=1,width=626,height=436'))l.href=f+p};if (/Firefox/.test(navigator.userAgent))setTimeout(a,0);else{a()}}void(0)"><strong>Facebook Share Bookmarklet</strong></a> &#8211; The Share Bookmarklet will recognize when you share videos and music, making them easy to play within Facebook.</li>
<li> <a href="javascript:location.href='http://www.myspace.com/Modules/PostTo/Pages/?c='+encodeURIComponent(location.href)+'&amp;t='+encodeURIComponent(document.title)"><strong>Add to MySpace Bookmarklet</strong></a></li>
<li> <a href="javascript:(function()%7Bfor(var%20i=0;i%3Cdocument.links.length;i++)%7Bvar%20a=document.links%5Bi%5D;if(a.href.indexOf('.user.js')%3E0)%7Ba.href=%22javascript:(function()%7Bvar%20s='%22+a.href+%22',t='text/javascript',d=document,n=navigator,e;(e=d.createElement('script')).src=s;e.type=t;d.getElementsByTagName('head')%5B0%5D.appendChild(e)%7D)();doIt('');void('');%22;with(a.style)%7Bborder=%222px%20groove%20%23000%22;padding=%220px%205px%202px%22;backgroundColor=%22%23ddd%22;color=%22black%22;fontFamily=%22sans-serif%22;textDecoration=%22none%22;fontSize=%2210pt%22;marginTop=%225px%22;%7D%7D%7D%7D)()"><strong>Install Greasemonkey</strong></a> &#8211; Firefox users will know how useful Greasemonkey is. The good thing is, with a simple tweak, you can also get Greasemonkey to work in Google Chrome.</li>
<li><a href="javascript:(%7BaddURL:function(aURL)%7Bvar%20url=%22http://feeds.ramisp.org/preview.php?utf=y&amp;src=%22+encodeURIComponent(aURL);location.href=url;%7D,getFeedURL:function(e,aDocument)%7Bvar%20j=e;var%20c=aDocument.location;if(e.indexOf(%22/%22)!=0)%7Bvar%20d=c.pathname.split(%22/%22);d%5Bd.length-1%5D=e;j=d.join(%22/%22)%7Dreturn%20c.protocol+%22//%22+c.hostname+j;%7D,checkForFeeds:function()%7Bvar%20f=false;var%20m=document.getElementsByTagName(%22link%22);for(var%20g=0,a;a=m%5Bg%5D;g++)%7Bvar%20h=a.getAttribute(%22type%22);var%20i=a.getAttribute(%22rel%22);if(h&amp;&amp;h.match(/%5B%5C+%5C/%5Dxml%24/)&amp;&amp;i&amp;&amp;i==%22alternate%22)%7Bvar%20b=a.getAttribute(%22href%22);if(b.indexOf(%22http%22)!=0)%7Bb=this.getFeedURL(b,document);%7Dthis.addURL(b);f=true;break%7D%7Dif(!f)alert(%22Oops.%20Can't%20find%20a%20feed.%22);%7D%7D).checkForFeeds();"><strong>Feed views in Chrome</strong></a> &#8211; Drag the following links to your bookmarks bar</li>
</ul>
<p> <BR><BR>  Keep Browsing : Keep Chroming</p>


<p>Related posts:<ol><li><a href='http://www.nitinh.com/2010/01/goo-gl-google-url-shortner-bookmarklet/' rel='bookmark' title='Permanent Link: Goo.gl : Google URL Shortner Bookmarklet'>Goo.gl : Google URL Shortner Bookmarklet</a></li>
<li><a href='http://www.nitinh.com/2009/10/show-imdb-ratings-on-torrentzcom-using-greasemonkey-script/' rel='bookmark' title='Permanent Link: Show IMDB Ratings on Torrentz.com using GreaseMonkey Script'>Show IMDB Ratings on Torrentz.com using GreaseMonkey Script</a></li>
<li><a href='http://www.nitinh.com/2009/03/readability-making-reading-pleasant/' rel='bookmark' title='Permanent Link: Readability : Making reading pleasant'>Readability : Making reading pleasant</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2009/03/12-must-have-bookmarklets-google-chrome-and-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
