
<?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>Ankit Ahuja &#187; Development</title>
	<atom:link href="http://ankitahuja.com/blog/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://ankitahuja.com</link>
	<description>Personal Website and Blog of Ankit Ahuja</description>
	<lastBuildDate>Sun, 04 Dec 2011 01:39:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>git Cheatsheet</title>
		<link>http://ankitahuja.com/blog/development/git-cheatsheet/</link>
		<comments>http://ankitahuja.com/blog/development/git-cheatsheet/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 11:00:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[git]]></category>
		<guid isPermaLink="false">http://ankitahuja.com/?p=462</guid>
		<description><![CDATA[When you&#8217;re new to git, it can get difficult to wrap your head around it at first. This is especially true if you&#8217;re migrating from subversion or when you&#8217;d rather spend more time writing your code than trying to learn git. Git requires some learning, and you might as well spend the time doing it [...]]]></description>
			<content:encoded><![CDATA[<p>When you&#8217;re new to git, it can get difficult to wrap your head around it at first. This is especially true if you&#8217;re migrating from subversion or when you&#8217;d rather spend more time writing your code than trying to learn git.</p>
<p>Git requires some learning, and you might as well spend the time doing it rather than wondering what just happened after running a command. <a href="http://learn.github.com">Learn.github</a> is a good place to start to learn the basics.</p>
<p>But even after spending some time learning git, there are going to be times that you&#8217;ve to painfully search the web/manual for basic stuff like working with remote branches or more complex stuff like handling a failed merge.</p>
<p>For the same reason, I&#8217;m creating this post as a reference point for myself to avoid repetitive searches. I&#8217;ll keep adding new commands here if and when I use them.</p>
<p>This is no way near to a complete reference for git and there might be better ways to do the things listed here. These are just the commands I use the most, in the manner I prefer to use them.</p>
<h2>Basics</h2>
<ul>
<li>
		Commit and Stage all changes
<pre class="brush: bash; light: true; title: ;">git commit -am &quot;log message&quot;</pre>
</li>
<li>
		Push Changes to remote repo
<pre class="brush: bash; light: true; title: ;">git push</pre>
</li>
<li>
		Pull Changes to local repo
<pre class="brush: bash; light: true; title: ;">git pull</pre>
</li>
<li>
		Check current status of working tree
<pre class="brush: bash; light: true; title: ;">git status</pre>
</li>
<li>
		View diff
<pre class="brush: bash; light: true; title: ;">git diff</pre>
</li>
<li>
		Discard local uncommitted changes to a file (in this case, abc.txt)
<pre class="brush: bash; light: true; title: ;">git checkout -- abc.txt</pre>
</li>
</ul>
<h2>Branches <span style="font-size: 14px; font-weight: normal; font-style: italic;"> ( Branch name is assumed to be &#8216;abc&#8217; )</span></h2>
<p><strong>Working with local branches</strong></p>
<ul>
<li>
		Create a branch
<pre class="brush: bash; light: true; title: ;">git branch abc</pre>
</li>
<li>
	Switch to a branch
<pre class="brush: bash; light: true; title: ;">git checkout abc</pre>
</li>
<li>
	View all existing branches
<pre class="brush: bash; light: true; title: ;">git branch</pre>
</li>
<li>
Remove a branch
<pre class="brush: bash; light: true; title: ;">git branch -d abc</pre>
</li>
<li>
Merge a branch</p>
<pre class="brush: bash; title: ;">
# In this case, merging abc into master
git checkout master
git merge abc
</pre>
</li>
</ul>
<p><strong> Working with remote branches </strong></p>
<ul>
<li>
Push a local branch to remote repo
<pre class="brush: bash; light: true; title: ;">git push origin abc</pre>
</li>
<li>
Delete a remote branch
<pre class="brush: bash; light: true; title: ;">git push origin :abc</pre>
</li>
<li>
Setup a local branch to track a remote branch
<pre class="brush: bash; light: true; title: ;">git branch --track abc origin/abc</pre>
</li>
<li>
Create a local branch, push it to remote repo. and then pull changes from it</p>
<pre class="brush: bash; title: ;">
# Creating the new branch and switching to it
git checkout -b abc;
# Pushing the changes
git push
# Meanwhile someone else made changes to the remote version
# Pulling those changes
git pull origin abc
# if you want to simply use 'git pull' to get the changes, do the following
git config branch.abc.remote origin
git config branch.abc.merge refs/heads/abc
</pre>
<p>Alternative methods listed <a href="http://djwonk.com/blog/2009/04/18/tracking-remote-git-branches/">here</a>.
</li>
</ul>
<h2>Tags <span style="font-size: 14px; font-weight: normal; font-style: italic;"> ( Tag name is assumed to be v1.0 here )</span></h2>
<ul>
<li>
View all tags
<pre class="brush: bash; light: true; title: ;">git tag</pre>
</li>
<li>
Create a tag referencing a particular commit using its checksum (annotated)</p>
<pre class="brush: bash; title: ;">
# here commit checksum is assumed to be 98eda02.
# to view the checksum of a commit, you can do
git log --pretty=oneline
git tag -am &quot;v1.0&quot; 98eda02
</pre>
</li>
<li>
Push tags to remote repo
<pre class="brush: bash; light: true; title: ;">git push --tags</pre>
</li>
<li>
	Delete a local tag</p>
<pre class="brush: bash; title: ;">git tag -d v1.0</pre>
</li>
<li>
	Rename a local tag</p>
<pre class="brush: bash; title: ;">
	git tag NEW_TAG OLD_TAG
	git tag -d OLD_TAG</pre>
</li>
<li>
	Delete a remote tag</p>
<pre class="brush: bash; title: ;">git push origin :refs/tags/v1.0</pre>
</li>
</ul>
<p><strong>Useful Git References</strong></p>
<ul>
<li>
		<a href="http://learn.github.com">Learn.github</a>
	</li>
<li>
		<a href="http://github.com/guides/git-cheat-sheet">Github&#8217;s git cheat sheet</a>
	</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ankitahuja.com/blog/development/git-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How gleeBox makes browsing the web faster and more fun</title>
		<link>http://ankitahuja.com/blog/development/how-gleebox-makes-browsing-the-web-faster-and-more-fun/</link>
		<comments>http://ankitahuja.com/blog/development/how-gleebox-makes-browsing-the-web-faster-and-more-fun/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 07:17:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[gleebox]]></category>
		<guid isPermaLink="false">http://ankitahuja.com/?p=501</guid>
		<description><![CDATA[gleeBox started out as a weekend hack project for me and Sameer. But, we ended up spending a lot more time working on it. Not that I&#8217;m complaining, I think we managed to build a tool that is really useful once you get used to it. We made our last major release (1.0) a couple [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;">
<p><a href="http://thegleebox.com">gleeBox</a> started out as a weekend hack project for me and <a href="http://sameerahuja.com">Sameer</a>. But, we ended up spending a lot more time working on it. Not that I&#8217;m complaining, I think we managed to build a tool that is really useful once you get used to it. We made our last major release (<a href="http://thegleebox.com/releases.html">1.0</a>) a couple of weeks back. From now on, gleeBox development will be carried out at ease (and not the <a href="http://github.com/glee/glee">20 commits/day</a> rate at which it was being carried out earlier ^^ )</p>
<p>If you&#8217;re not familiar with gleeBox, you should take a look at this <a href="http://vimeo.com/7987369">screencast</a> or read the <a href="http://thegleebox.com/manual.html">user manual</a>.</p>
<p>After continually using gleeBox for some time, I&#8217;ve discovered several ways in which it makes browsing and doing stuff on the web quicker and more fun. Here are some of them:</p>
<p><strong>ESP Visions</strong>:</p>
<p>This is my favorite feature of gleeBox. What this means is, you can specify <a href="http://api.jquery.com/category/selectors/">jQuery selectors</a> for specific URLs and when you visit that particular page and open gleeBox, that selector will automatically be executed and all the matching elements will be highlighted on the page. You can TAB through them and press enter to execute a link.</p>
<p>This is especially useful on pages like the Google search results page, where all you would ever want to do is to go through the results. You don&#8217;t need to scroll using the mouse. This makes searching a lot more fun and less tiresome for the fingers.</p>
<p>This is also really useful for automating stuff, especially for pages where you have to click the same link everytime you visit them.</p>
<p>Several useful ESP Visions are listed on <a href="http://tipjar.thegleebox.com/category/esp/">TipJar</a>.</p>
<p><strong>Default Link Search:</strong></p>
<p>You start typing something and gleeBox highlights all the links on the page that match the text. This means you don&#8217;t need to take your hands off the keyboard to navigate the web.</p>
<p><strong>Page commands and bookmarklet execution:</strong></p>
<p>You can execute any bookmarklet by typing in
<pre class="brush: plain; title: ;">!bookmarklet-name</pre>
<p>. There are also some inbuilt-commands. A couple of examples are:</p>
<p>Open the RSS feed of the current page in Google Reader so that you can easily subscribe to it</p>
<pre class="brush: plain; title: ;">!rss</pre>
<p>Share current page through mail, gmail, facebook, twitter, etc.</p>
<pre class="brush: plain; title: ;">!share m / g / fb / t / ...</pre>
<p>All of them are listed in the <a href="http://thegleebox.com/manual.html">user manual</a>.</p>
<p><strong>Bookmark Search:</strong></p>
<p>If turned on, gleeBox searches browser bookmarks if no links are found matching the entered text. This is useful, instead of manually going through a long list of sites in the bookmarks menu.</p>
<p><strong>Yubnub commands:</strong></p>
<p>You can execute <a href="http://yubnub.org">yubnub</a> or <a href='http://quixapp.com'>quix</a> commands preceded by
<pre class="brush: plain; title: ;">:</pre>
<p>A couple of examples are:</p>
<p>Search twitter for gleeBox</p>
<pre class="brush: plain; title: ;">:tw gleebox</pre>
<p>Search IMDb for avatar</p>
<pre class="brush: plain; title: ;">:imdb avatar</pre>
<p><strong>Scraper commands:</strong></p>
<p>Select Linked Images </p>
<pre class="brush: plain; title: ;">?img</pre>
<p>You can also define custom scrapers. Example: This will select all shared links on twitter.com</p>
<pre class="brush: plain; title: ;">?t - a.web </pre>
<p>If you&#8217;re an advanced gleeBox user, you should go ahead and share tips on <a href="http://tipjar.thegleebox.com">Tipjar</a>. You can login using your Twitter / Facebook / other accounts and start posting right away from the main page.</p>
]]></content:encoded>
			<wfw:commentRss>http://ankitahuja.com/blog/development/how-gleebox-makes-browsing-the-web-faster-and-more-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitkut v2.0 to be an OAuth Gadget</title>
		<link>http://ankitahuja.com/blog/development/twitkut-v2-0-to-be-an-oauth-gadget/</link>
		<comments>http://ankitahuja.com/blog/development/twitkut-v2-0-to-be-an-oauth-gadget/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 07:58:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[twitkut]]></category>
		<category><![CDATA[twitter]]></category>
		<guid isPermaLink="false">http://ankitahuja.com/?p=289</guid>
		<description><![CDATA[I&#8217;ve been working on the next version of Twitkut in whatever little free time I&#8217;ve had in the past couple weeks ( mostly weekends ). The next version of Twitkut will feature a number of new and exciting features, the most major one being support for OAuth. Some of the features have already been deployed [...]]]></description>
			<content:encoded><![CDATA[<p style="clear: both">I&#8217;ve been working on the next version of Twitkut in whatever little free time I&#8217;ve had in the past couple weeks ( mostly weekends ). The next version of Twitkut will feature a number of new and exciting features, the most major one being support for OAuth. Some of the features have already been deployed on Orkut:</p>
<p style="clear: both">1. <strong>Displaying user tweets in the Orkut profile page (</strong><em><strong>deployed</strong></em><strong>)</strong>: I had to rewrite the whole code for this due the new <a href="http://orkutdeveloper.blogspot.com/2009/05/posted-by-rahul-kulkarni-product.html">server-side templates and data-pipelining standards enforced by Orkut</a>. It has certain limitations in that you cannot click on any link that links to any external source. Clicking on the user&#8217;s pic or username leads you to the application page.</p>
<p style="clear: both">2. <strong>OAuth Support</strong>: Twitkut will now enable you to authorize it with your Twitter account via OAuth. Doing this will enable you to post updates from Twitkut, add your Orkut friends as your Twitter friends and many more things (listed as separate features). I chose OAuth since then you won&#8217;t have to worry about me storing your Twitter passwords.</p>
<p style="clear: both">3.<strong> Post updates from Twitkut</strong>: If you enable OAuth, you&#8217;ll be able to post updates to your Twitter account from within Twitkut.</p>
<p style="clear: both">4. <strong>Follow your Orkut friends on Twitter</strong>: Enabling OAuth will enable you to follow your Orkut friends on Twitter from within Twitkut.</p>
<p style="clear: both">5. <strong>Selective Updates</strong>: This will be similar to the &#8220;Selective Twitter Updater&#8221; Facebook app. You will able to selectively display updates on Twitkut by adding a hashtag to the end of updates similar to &#8220;#orktw&#8221; or &#8220;#orkut&#8221;. I&#8217;ve still to decide upon the hashtag. Only the updates containing the hashtag will be displayed on Twitkut.</p>
<p style="clear: both">Unfortunately, the popular demand for automatic updates to the user&#8217;s activity stream ( without the user having to visit the application page ) won&#8217;t be possible due to the limitations enforced by Orkut. If Orkut ever allows it, it&#8217;ll be the first feature I&#8217;ll add.</p>
<p style="clear: both">I cannot promise if and when I&#8217;ll add all these features. There are too many variables, time being the biggest one. You can keep abreast with the latest updates to Twitkut by following <a title="Twitkut on twitter" href="http://twitter.com/twitkut">@twitkut</a>.</p>
<p style="clear: both">You can also suggest features that you&#8217;ll like to be added to Twitkut as comments to this blogpost or as @replies to <a title="Twitkut on twitter" href="http://twitter.com/twitkut">@twitkut</a>.</p>
<p style="clear: both">Enabling Twitkut with OAuth has been/will be a complicated task. I&#8217;ll probably write a separate blog on writing an Opensocial OAuth Gadget.</p>
<p><br class="final-break" style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://ankitahuja.com/blog/development/twitkut-v2-0-to-be-an-oauth-gadget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PollBol, a Polling Web App</title>
		<link>http://ankitahuja.com/blog/development/pollbol/</link>
		<comments>http://ankitahuja.com/blog/development/pollbol/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 15:53:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Webapps]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[web app]]></category>
		<guid isPermaLink="false">http://ankitahuja.com/?p=17</guid>
		<description><![CDATA[Update: PollBol is currently down due to server deployment issues. Take a look at the screenshots instead. PollBol is an exciting web app that adds a twist to conventional polling by adding an additional social aspect to it. After making FriendComparé, which was a mashup making use of the Last.fm API, I wanted to make [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="Create, share and vote on polls with friends" href="http://pollbol.icedlabs.com"><img class="size-full wp-image-18 aligncenter" src="http://ankitahuja.com/wp-content/uploads/2008/10/pollbol.png" alt="PollBol" /></a></p>
<p style="text-align: left;"><strong>Update</strong>: PollBol is currently down due to server deployment issues. Take a look at the <a href="#pollbol_screenshots">screenshots</a> instead.</p>
<p style="text-align: left;"><a title="Create, share and vote on polls with friends" href="http://pollbol.icedlabs.com">PollBol</a> is an exciting web app that adds a twist to conventional polling by adding an additional social aspect to it. After making <a title="FriendCompare" href="http://ankitahuja.com/apps/lastfm">FriendComparé</a>, which was a mashup making use of the <a title="Last.fm" href="http://last.fm">Last.fm</a> API, I wanted to make a more independent app that maintained its own data.</p>
<p>Even so, I fully support the idea of making use other apps&#8217; APIs. It makes it easier for the users to adopt since it builds on the functionality of the more popular app. And so, FriendComparé has had comparatively far more visitors as compared to PollBol due to the popularity of Last.fm.</p>
<p>With PollBol, I had to think of a development platform that would allow me to complete the project within my summer vacations. And what better for agile development than <a title="Ruby on Rails" href="http://www.rubyonrails.org/" target="_blank">Ruby On Rails</a>. It was exciting to use Rails as it divides the entire project into three parts: <a title="MVC" href="http://en.wikipedia.org/wiki/Model-view-controller" target="_blank">Models, Views and Controllers</a>. And this makes it easier to plan on the various modules of the project.</p>
<p><span id="more-17"></span>I started out with the basic models of <em>Questions, Answers and Users</em> and then added modules as I started getting more comfortable with Rails. It makes it very easy to create models through migrations. You don&#8217;t need to know much of Sql in order to be able to manage data in a database.</p>
<p>Rails also makes it dead simple to create views for your app, though eventually to make your app look better, you need to have decent CSS skills. Usually, for each Controller, there is a corresponding View. The controller acts as a glue between the model and the view. The Controller performs all the programming part whereas all the formatting information is contained in the View. Rails also provides Helpers, which help to make Views even more simple and less complicated.</p>
<p><a title="Google Charts API" href="http://code.google.com/apis/chart/" target="_blank">Google Charts API</a> came in handy to display the results of polls.</p>
<p>Though <a title="PollBol" href="http://pollbol.icedlabs.com" target="_blank">PollBol</a> hasn&#8217;t had as many users as <a title="FriendCompare" href="http://ankitahuja.com/apps/lastfm" target="_blank">FriendComparé</a>, only a handful of people who I really had to convince to help me test the app :p ( thanks <a title="Sameer" href="http://www.sameerahuja.com" target="_blank">Sameer</a>, Neha, etc.), it was a fascinatingly learning and fun experience developing it.</p>
<p>Some of the unique features in PollBol are:</p>
<p>1. You can add additional answers/choices to a poll if you don&#8217;t like the available ones</p>
<p>2. You can be friends with other users so you can follow their activity</p>
<p>3. RSS Feeds for public activity, latest polls, popular polls, etc.</p>
<p>4. Commenting on Polls</p>
<p>PollBol hasn&#8217;t been tried by too many people yet. Maybe its because I haven&#8217;t tweeted or blogged about it. Also, unless its an app as popular as <a title="Twitter" href="http://www.twitter.com" target="_blank">twitter</a> or <a title="Last.fm" href="http://last.fm" target="_blank">last.fm</a>, with the social webapps overload, people normally cringe at the thought of registering at a new website ( including me ). Maybe in future, I will allow non-registered users to participate in polling as well as integrating it with OpenID.</p>
<p>Meanwhile, here are a few screenshots for you to chew on:</p>
<div id="pollbol_screenshots">
<a href="http://ankitahuja.com/wp-content/uploads/2008/10/PollBol.jpg"><img class="alignleft size-thumbnail wp-image-565" title="PollBol" src="http://ankitahuja.com/wp-content/uploads/2008/10/PollBol-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://ankitahuja.com/wp-content/uploads/2008/10/PollBol-Home.jpg"><img class="alignleft size-thumbnail wp-image-563" title="PollBol | Home" src="http://ankitahuja.com/wp-content/uploads/2008/10/PollBol-Home-150x150.jpg" alt="" width="150" height="150" /></a><a href="http://ankitahuja.com/wp-content/uploads/2008/10/PollBol-Polls.jpg"><img class="alignleft size-thumbnail wp-image-564" title="PollBol | Polls" src="http://ankitahuja.com/wp-content/uploads/2008/10/PollBol-Polls-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p><a href="http://ankitahuja.com/wp-content/uploads/2008/10/PollBol-Which-is-your-favorite-movie-among-the-following-Results.jpg"><img class="alignleft size-thumbnail wp-image-567" title="PollBol | Which is your favorite movie among the following | Results" src="http://ankitahuja.com/wp-content/uploads/2008/10/PollBol-Which-is-your-favorite-movie-among-the-following-Results-150x150.jpg" alt="" width="150" height="150" /></a><a href="http://ankitahuja.com/wp-content/uploads/2008/10/PollBol-Which-is-your-favorite-movie-among-the-following-Results-2.jpg"><img class="alignleft size-thumbnail wp-image-566" title="PollBol | Which is your favorite movie among the following | Results-2" src="http://ankitahuja.com/wp-content/uploads/2008/10/PollBol-Which-is-your-favorite-movie-among-the-following-Results-2-150x150.jpg" alt="" width="150" height="150" /></a><a href="http://ankitahuja.com/wp-content/uploads/2008/10/PollBol-Create-a-New-Poll1.jpg"><img class="alignleft size-thumbnail wp-image-568" title="PollBol | Create a New Poll" src="http://ankitahuja.com/wp-content/uploads/2008/10/PollBol-Create-a-New-Poll1-150x150.jpg" alt="" width="150" height="150" /></a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ankitahuja.com/blog/development/pollbol/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

