<?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>Syntax</title>
	<atom:link href="http://ershadk.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://ershadk.com/blog</link>
	<description>A blog on life and technology</description>
	<lastBuildDate>Thu, 17 May 2012 06:01:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Fix for Rails 3.x.x error &#8220;[FATAL] failed to allocate memory&#8221; in OS X Lion</title>
		<link>http://ershadk.com/blog/2012/05/10/fix-for-rails-3-x-x-error-fatal-failed-to-allocate-memory-in-os-x-lion/</link>
		<comments>http://ershadk.com/blog/2012/05/10/fix-for-rails-3-x-x-error-fatal-failed-to-allocate-memory-in-os-x-lion/#comments</comments>
		<pubDate>Thu, 10 May 2012 04:51:46 +0000</pubDate>
		<dc:creator>ershad</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[RubyonRails]]></category>

		<guid isPermaLink="false">http://ershadk.com/blog/?p=552</guid>
		<description><![CDATA[This error happens when mysql2 gem is either installed for some other version of mysql or when it cannot find required dynamic library. To fix this error, uninstall mysql2 gem and install as follows Please change &#8216;/usr/local/mysql&#8217; to your mysql installation path. Thank you.]]></description>
			<content:encoded><![CDATA[<p>This error happens when mysql2 gem is either installed for some other version of mysql or when it cannot find required dynamic library. To fix this error, uninstall mysql2 gem and install as follows</p>
<pre class="snippet-code">$ env ARCHFLAGS="-arch x86_64" gem install mysql2 -v='0.3.11' -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/mysql/bin/mysql_config</pre>
<p>Please change &#8216;/usr/local/mysql&#8217; to your mysql installation path. Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://ershadk.com/blog/2012/05/10/fix-for-rails-3-x-x-error-fatal-failed-to-allocate-memory-in-os-x-lion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set up Rails 3.2.2 with Passenger, rvm and ngnix</title>
		<link>http://ershadk.com/blog/2012/04/05/set-up-rails-3-2-2-with-passenger-rvm-and-ngnix/</link>
		<comments>http://ershadk.com/blog/2012/04/05/set-up-rails-3-2-2-with-passenger-rvm-and-ngnix/#comments</comments>
		<pubDate>Thu, 05 Apr 2012 19:38:55 +0000</pubDate>
		<dc:creator>ershad</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[rvm]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ershadk.com/blog/?p=513</guid>
		<description><![CDATA[Ruby on Rails is becoming more feature rich and powerful by every release. Naturally the steps to get it working in production environment are also being changed. I&#8217;ve been trying to set up Rails 3.2.2 for a while and here&#8217;s the method that finally worked. This method should work for the new Rails release, 3.2.3 too. Install<a href="http://ershadk.com/blog/2012/04/05/set-up-rails-3-2-2-with-passenger-rvm-and-ngnix/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>Ruby on Rails is becoming more feature rich and powerful by every release. Naturally the steps to get it working in production environment are also being changed. I&#8217;ve been trying to set up Rails 3.2.2 for a while and here&#8217;s the method that finally worked. This method should work for the new Rails release, 3.2.3 too.</p>
<p><strong>Install Server Operating System</strong></p>
<p>We have a large pool of operating systems to select for our server. Though Debian Squeeze and CentOS have proved their stability in serving rails applications, I would prefer a LTS version of Ubuntu Server edition. I did a small survey, Many experienced programmers said they are using Ubuntu server as it&#8217;s easy to maintain, Packages are in plenty and has better stability. Also Canonical promises to give us 5 years of support for LTS edition operating systems. Current LTS edition is Ubuntu Server 10.04</p>
<p><strong>Install RVM</strong></p>
<p>Ruby Version Manager(RVM) helps to manage multiple ruby versions in a single machine. RVM helps us to quickly switch Ruby/Rails versions. Before installing RVM, we need to install git, curl and autoconf. Use the following command to do it:</p>
<pre class="snippet-code">$ sudo apt-get -y install git curl autoconf</pre>
<p>Then install and configure RVM,</p>
<pre class="snippet-code">

$ bash -s stable &lt; &lt;(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" # Load RVM function' &gt;&gt; ~/.bash_profile
</pre>
<p>Source ~/.bash_profile to add rvm as a function to shell</p>
<pre class="snippet-code">$ source ~/.bash_profile</pre>
<p><strong>Install Ruby</strong></p>
<p>Before installing Ruby, we need to install all dependency packages. The following command lists the dependency packages.</p>
<pre class="snippet-code">$ rvm requirements </pre>
<p>We can see a line with lots of package names, something like the following. Execute it directly with sudo in shell to install packages:</p>
<pre class="snippet-code">

sudo /usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion </pre>
<p>Next step is to install Ruby. Current latest version of Ruby 1.9.3. Let&#8217;s install it</p>
<pre class="snippet-code">$ rvm install 1.9.3</pre>
<p>It will take a few minutes to fetch source, configure and compile.</p>
<p>After completing installation, we can set 1.9.3 as the default version:</p>
<pre class="snippet-code">$ rvm use 1.9.3 --default</pre>
<p><strong>Install passenger</strong></p>
<p>Passenger is a free module for Apache and nginx to run Ruby applications. Luckily it&#8217;s available as a Ruby gem and it&#8217;s easy to install and configure it.</p>
<p>Install passenger gem</p>
<pre class="snippet-code">$ gem install passenger</pre>
<p>Install and configure nginx</p>
<pre class="snippet-code">$ rvmsudo passenger-install-nginx-module</pre>
<p>This command downloads nginx source code, builds it and finally configures passenger for us. Default location of ngnix is /opt/nginx and we can find the configuration in /opt/nginx/conf/nginx.conf</p>
<p>If you open nginx configuration, you can see the following lines have been already added into it in &#8216;http&#8217; configuration:</p>
<pre class="snippet-code">

passenger_root /home/ershad/.rvm/gems/ruby-1.9.3-p125/gems/passenger-3.0.11;
passenger_ruby /home/ershad/.rvm/wrappers/ruby-1.9.3-p125/ruby;
</pre>
<p><strong>Install Rails</strong></p>
<p>Before installing rails, we will create a gemset. Gemset is feature of RVM where we can create multiple gemset to store different gems of different versions.</p>
<p>Let&#8217;s create a gemset for Rails 3.2.2</p>
<pre class="snippet-code">

$ rvm gemset create rails322

$ rvm gemset use rails322
</pre>
<p>Installing rails is pretty straight forward.</p>
<pre class="snippet-code">$ gem install rails -v 3.2.2</pre>
<p>If you are not interested in the documentation that comes along with rails gem, use the following command instead</p>
<pre class="snippet-code">$ gem install rails -v 3.2.2  --no-ri --no-rdoc </pre>
<p><strong>Install nginx init script</strong></p>
<p>nginx init script by Jason Giedymin helps us to administer web server easily.</p>
<pre class="snippet-code">
$ cd
$ git clone git://github.com/jnstq/rails-nginx-passenger-ubuntu.git
$ sudo mv rails-nginx-passenger-ubuntu/nginx/nginx /etc/init.d/nginx
$ sudo chown root:root /etc/init.d/nginx
</pre>
<p><strong><span style="font-family: monospace;">Deploying application</span></strong><br />
Let&#8217;s store all rails applications under /var/rails_apps/ directory. Let&#8217;s make such a folder</p>
<pre class="snippet-code">
$ sudo mkdir -p /var/rails_apps
$ sudo chmod 777 /var/rails_apps/ #giving full file permissions
</pre>
<p>Let&#8217;s create a sample rails application in rails_apps directory</p>
<pre class="snippet-code">
$ cd /var/rails_apps
$ rails new helloworld
$ cd helloworld
$ vim Gemfile # and uncomment the line to include 'therubyracer' gem. We need a javascript runtime
$ bundle install
$ bundle exec rake assets:precompile #Precompile assets to public/ dir
</pre>
<p>Next step is point ngnix to this location. Add the following snippet in /opt/nginx/conf/nginx.conf</p>
<pre class="snippet-code">

server {
listen 80;
server_name example.com;
rails_env production;
root /var/rails_apps/helloworld/public; # &lt;--- be sure to point to 'public'!
passenger_enabled on;
}
</pre>
<p>Restart the server</p>
<pre class="snippet-code"> sudo /etc/init.d/nginx restart</pre>
<p>Your application must be alive and running now! <img src='http://ershadk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Points to remember</strong></p>
<p>1) Rails application doesn&#8217;t get updated when we change the code. This is because we need to restart passenger explicitly</p>
<p>Restarting passenger is easy, we just have to create a file &#8216;restart.txt&#8217; in tmp/ dir of the application. For example</p>
<pre class="snippet-code">

$ cd /var/rails_apps/helloworld

$ touch tmp/restart.txt
</pre>
<p>2) Always precompile assets after generating controller or scaffold</p>
<p>3) Make sure you are migrating in &#8216;production&#8217; environment. This can be done using the following command.</p>
<pre class="snippet-code"> rake db:migrate RAILS_ENV=production</pre>
<p>4) When you get errors related to routes, check the list of all routes</p>
<pre class="snippet-code"> $ rake routes </pre>
<p>5) When something goes wrong, see log/production.log</p>
<p>6) If you happen to get passenger errors related to missing gems, just add those gems in Gemfile and use the following command</p>
<pre class="snippet-code"> $ bundle install --path vendor/bundle </pre>
<p>That&#8217;s it. Happy hacking with Ruby on Rails. Thank you.</p>
<pre></pre>
]]></content:encoded>
			<wfw:commentRss>http://ershadk.com/blog/2012/04/05/set-up-rails-3-2-2-with-passenger-rvm-and-ngnix/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Python script for automatic synchronisation of &#8216;Read it later&#8217; list and webpage</title>
		<link>http://ershadk.com/blog/2011/11/16/python-script-for-automatic-synchronisation-of-read-it-later-list-and-webpage/</link>
		<comments>http://ershadk.com/blog/2011/11/16/python-script-for-automatic-synchronisation-of-read-it-later-list-and-webpage/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 14:58:28 +0000</pubDate>
		<dc:creator>ershad</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://ershadk.com/blog/?p=458</guid>
		<description><![CDATA[One of the powerful features of firefox is that it has thousands of useful addons. We are going to deal with such an addon &#8211; Read it later. It allows us to book mark page to read later with just a click. I was happy living with it. But on one fine day, Hrishiettan told<a href="http://ershadk.com/blog/2011/11/16/python-script-for-automatic-synchronisation-of-read-it-later-list-and-webpage/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_461" class="wp-caption alignright" style="width: 239px"><a href="http://ershadk.com/blog/wp-content/uploads/2011/11/Screenshot.png"><img class="size-full wp-image-461 " title="Read it later" src="http://ershadk.com/blog/wp-content/uploads/2011/11/Screenshot.png" alt="" width="229" height="66" /></a>
<p class="wp-caption-text">Adding to &#39;Read it later&#39; list</p>
</div>
<p>One of the powerful features of firefox is that it has thousands of useful addons. We are going to deal with such an addon &#8211; <a href="http://readitlaterlist.com/" target="_blank">Read it later</a>. It allows us to book mark page to read later with just a click. I was happy living with it.</p>
<p>But on one fine day, <a href="http://2x3idiots.blogspot.com/" target="_blank">Hrishiettan</a> told me about sharing the links we read and its advantages. Sharing links will help many people to find interesting articles easily and it will also act as a link-index in case if we want to refer it again. The idea is really good and he told he would start working on a php app.</p>
<p>On another day, I told about this to <a href="http://raghesh.wordpress.com/" target="_blank">Raghesh sir</a>. He told there&#8217;s an option to export our list to html in &#8216;Read it later&#8217;. That&#8217;s it! They have an API too! Got the API key from their website, cleared all existing links as they contain irrelevant news links, and wrote following script. It now updates the links in <a href="http://ershadk.com/links/" target="_blank">http://ershadk.com/links/</a> every 5 minutes automatically from my &#8216;Read it later&#8217; list.  Thank you <img src='http://ershadk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>ps: The standard way of xml parsing didn&#8217;t work, that&#8217;s why I wrote it rude <img src='http://ershadk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><script type="text/javascript" src="http://gist-it.appspot.com/github/ershad/Snippets/raw/master/readsync.py"></script></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://ershadk.com/blog/2011/11/16/python-script-for-automatic-synchronisation-of-read-it-later-list-and-webpage/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A python script to generate SQL queries for importing links/blogroll in another wordpress blog</title>
		<link>http://ershadk.com/blog/2011/11/13/a-python-script-to-generate-sql-queries-for-importing-linksblogroll-in-another-wordpress-blog/</link>
		<comments>http://ershadk.com/blog/2011/11/13/a-python-script-to-generate-sql-queries-for-importing-linksblogroll-in-another-wordpress-blog/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 07:47:13 +0000</pubDate>
		<dc:creator>ershad</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://ershadk.com/blog/?p=439</guid>
		<description><![CDATA[Here&#8217;s the problem: There are 30 precious links in my old blog under blogroll. Exporting feature of wordpress does not export the contents in blogroll/links. The task is to import those links in this new blog with minimum effort. Well, Adding 30 links manually ain&#8217;t difficult &#8211; it may take a maximum of 15 minutes<a href="http://ershadk.com/blog/2011/11/13/a-python-script-to-generate-sql-queries-for-importing-linksblogroll-in-another-wordpress-blog/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the problem: There are 30 precious links in my <a href="http://ershadk.wordpress.com">old blog</a> under blogroll. Exporting feature of wordpress does not export the contents in blogroll/links. The task is to import those links in this new blog with minimum effort.</p>
<p>Well, Adding 30 links manually ain&#8217;t difficult &#8211; it may take a maximum of 15 minutes to complete the task. But it&#8217;s too repetitive and boring. The best way is obviously writing a script.</p>
<p>Here&#8217;s a small python script that generates SQL queries to insert old blogroll items in new database. It will ask for old blog URL and new database name &#8211; that&#8217;s it, it will search your old blog for blogroll links and print INSERT statements in stdout suitable for executing in phpmyadmin or directly in mysql shell <img src='http://ershadk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Hope you like it, Thank you <img src='http://ershadk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><script src="http://gist-it.appspot.com/github/ershad/Snippets/raw/master/blogrollSQLGenerator.py"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://ershadk.com/blog/2011/11/13/a-python-script-to-generate-sql-queries-for-importing-linksblogroll-in-another-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New home!</title>
		<link>http://ershadk.com/blog/2011/11/12/new-home/</link>
		<comments>http://ershadk.com/blog/2011/11/12/new-home/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 12:18:22 +0000</pubDate>
		<dc:creator>ershad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ershadk.com/blog/?p=435</guid>
		<description><![CDATA[It was one of my dreams to have an own domain. With god&#8217;s grace, It&#8217;s cherished now. Thank a lot to Manuettan and his firm Coolwrks for kindly hosting this website. If he hadn&#8217;t provided me free hosting, I wouldn&#8217;t have even registered this domain Please update your feed /email subscriptions from old blog to<a href="http://ershadk.com/blog/2011/11/12/new-home/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>It was one of my dreams to have an own domain. With god&#8217;s grace, It&#8217;s cherished now.</p>
<p>Thank a lot to <a href="http://www.bizzard.info/" target="_blank">Manu</a>ettan and his firm <a href="http://www.coolwrks.com/" target="_blank">Coolwrks</a> for kindly hosting this website. If he hadn&#8217;t provided me free hosting, I wouldn&#8217;t have even registered this domain <img src='http://ershadk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Please update your feed /email subscriptions from old blog to this one. Thank you <img src='http://ershadk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ershadk.com/blog/2011/11/12/new-home/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tathva memories @ NITC</title>
		<link>http://ershadk.com/blog/2011/10/23/tathva-memories-nitc/</link>
		<comments>http://ershadk.com/blog/2011/10/23/tathva-memories-nitc/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 09:24:58 +0000</pubDate>
		<dc:creator>ershad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Memories]]></category>

		<guid isPermaLink="false">http://ershadk.wordpress.com/?p=429</guid>
		<description><![CDATA[&#8220;.. I&#8217;m leaving this campus today. I will miss the late-night hangouts with Kartik and Pankaj.. I will miss the stay in Kartik&#8217;s room with Arjun and Rohit (If you are reading this, All the best for your IAS, brother). I will miss Ramnath, Arnab and all my  friends here and this great institution.. I&#8217;m sure<a href="http://ershadk.com/blog/2011/10/23/tathva-memories-nitc/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p><em>&#8220;.. I&#8217;m leaving this campus today. I will miss the late-night hangouts with <a href="http://k4rtik.wordpress.com/" target="_blank">Kartik</a> and Pankaj.. I will miss the stay in Kartik&#8217;s room with Arjun and Rohit (If you are reading this, All the best for your IAS, brother). I will miss Ramnath, Arnab and all my  friends here and this great institution.. I&#8217;m sure I will be back here for the next event.. With a million beautiful memories in 4 days.. Adieu NITC..&#8221;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://ershadk.com/blog/2011/10/23/tathva-memories-nitc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anagram Solver in C</title>
		<link>http://ershadk.com/blog/2011/09/18/anagram-solver-in-c/</link>
		<comments>http://ershadk.com/blog/2011/09/18/anagram-solver-in-c/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 05:58:26 +0000</pubDate>
		<dc:creator>ershad</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[GPL]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://ershadk.wordpress.com/?p=420</guid>
		<description><![CDATA[Hi, Here&#8217;s a small anagram solver written in C. It works based on generating permutations of given string and comparing them using a dictionary. For fast search in dictionary, the program first creates an index of the starting location of each alphabet. It takes a few minutes to process long words. Here&#8217;s the source code.<a href="http://ershadk.com/blog/2011/09/18/anagram-solver-in-c/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>Hi, Here&#8217;s a small anagram solver written in C. It works based on generating permutations of given string and comparing them using a dictionary. For fast search in dictionary, the program first creates an index of the starting location of each alphabet. It takes a few minutes to process long words.</p>
<p><a href="https://github.com/ershad/Snippets/blob/master/anagramSolver.c" target="_blank">Here&#8217;s the source code</a>. Suggestions are always welcome, Greetings <img src='http://ershadk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Update: There&#8217;s a little problem in using the term &#8216;anagram solver&#8217; here. An anagram solver finds words from another valid word &#8211; But this program finds words from the characters of given valid/invalid word.  Thanks to <a href="http://technikhil.wordpress.com">technikhil</a> for the info <img src='http://ershadk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Note: Realized that this implementation of anagram solver is inefficient. Will post a better one soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://ershadk.com/blog/2011/09/18/anagram-solver-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I started loving Archlinux</title>
		<link>http://ershadk.com/blog/2011/08/12/why-i-started-loving-archlinux/</link>
		<comments>http://ershadk.com/blog/2011/08/12/why-i-started-loving-archlinux/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 05:29:45 +0000</pubDate>
		<dc:creator>ershad</dc:creator>
				<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Distro]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[Operating System]]></category>

		<guid isPermaLink="false">http://ershadk.wordpress.com/?p=378</guid>
		<description><![CDATA[We like simplicity. We like everything new. It&#8217;s been some years since I switched completely to GNU/Linux. I always wondered at its stability, security, features, community and at the people who use it. GNU/Linux helped me to have exciting computing experience all the time filled with wonders and fun. I forgot about the existence of<a href="http://ershadk.com/blog/2011/08/12/why-i-started-loving-archlinux/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>We like simplicity. We like everything new.</p>
<p>It&#8217;s been some years since I switched completely to GNU/Linux. I always wondered at its stability, security, features, community and at the people who use it. GNU/Linux helped me to have exciting computing experience all the time filled with wonders and fun. I forgot about the existence of Antivirus software. Forgot the time I feared autorun.inf and weird executable files. Forgot BSOD and EULA. Now, everything is open. Met many new people, similar interests bonded us. People who use GNU/Linux have always been very helpful. They share knowledge instead of pirated software. They teach us to fish. A kind of special relationship rooted between us, in a world connected by computer networks and its underlying complex abstractions. At this moment, I would like to thank everyone who made lives of people like me colourful.</p>
<p>I had been using Debian Squeeze for a while and was happy with that. Had its complete repo offline which helped me to install any package in spite of the very slow internet connection I had then. Though the things went smooth, I faced some issues during that time with the compilation of new software from source. Fixing dependency issues were pain. The new source of package requires new version of dependencies which were not available in repo. Compiling them from source always created new pains. Updating software/repo was not possible because of the slow speed of internet. Taking laptop to college and updating from there also didn&#8217;t work due to various technical and non-technical reasons. I felt like I was completely forbidden from trying new versions of software. I was in a kind of lock then. Suddenly, one fine day, I got a broadband internet connection!</p>
<p>I don&#8217;t have words to express how much happiness I felt. Now the scenario has completely changed. I can now change the Debian repo to testing or sid, try new packages, configure backports or update what ever I want. But, I thought it was time for a change. Changes are the spices of life, indeed.</p>
<p>I wanted to install another distro from the mainstream. First, I thought of Fedora 15 which is a very good OS and hacks by <a href="http://rajeeshknambiar.wordpress.com" target="_blank">Rajeeshettan</a> in it always inspired me. Also I had used Fedora 14 for several months. But in Fedora too, I missed an element of simplicity and playfulness. The point with these type of operating system is that it comes with all basic packages preconfigured and giving us less opportunities to play with those.</p>
<p>Next choice was obviously <a href="http://archlinux.org" target="_blank">Archlinux</a>. I have been hearing about it since I met my another GNU/Linux guru &#8211; <a href="http://aashiks.in/" target="_blank">Ashikettan</a>. He blogs about Arch much and talks about it often. Also, I had tried it once months before when I had speedy internet connection. The best thing about Archlinx is that it is a rolling distro, and new packages are always readily available!</p>
<p><a href="http://ershadk.com/blog/wp-content/uploads/2011/08/500px-archlinux-official-fullcolour-svg.png"><img class="size-full wp-image-390 aligncenter" title="Archlinux" src="http://ershadk.com/blog/wp-content/uploads/2011/08/500px-archlinux-official-fullcolour-svg.png" alt="" width="500" height="166" /></a>To install, I got the 64bit iso image from Arch website and made thumb bootable with <a href="https://github.com/abock/image-usb-stick/" target="_blank">abock</a>. The installation went smooth and had a nice time configuring various things along with my favourite desktop environment &#8211; KDE. I was not really able to use KDE since the version in Debian Squeeze was a bit buggy and it crashed often. I was using Gnome 2.x then. Now, I&#8217;m really happy with KDE 4.7.0 with a distro which can be updated easily using its sweet package manager &#8211; pacman. Arch also has a wonderful knowledge base &#8211; The <a href="https://wiki.archlinux.org/index.php/Main_Page">ArchWiki</a>. ArchWiki has many tutorials to play with for beginners and for expert users.</p>
<p>To talk about packages in Archlinux, I don&#8217;t have words! I remember trying to install new version of Ipython in debian which comes with a new tool called qtconsole. Qtconsole can show the outputs of matplotlib embedded inside the window instead of showing as a pop-up. It was a bit pain fixing various python modules that depended upon on other packages in debian. But in Archlinux, a simple &#8216;pacman -S ipython&#8217; after a system upgrade with &#8216;pacman -Syu&#8217; solved the issue. (Please note that though &#8216;pacman -Sy ipython&#8217; alone installs new version of Ipython, it may lead to dependency issues sometimes. Always install with &#8216;-S&#8217; and have an system upgrade with &#8216;-Syu&#8217; often). Upgrading the system obviously updates kernel, now Arch has kernel 3.0 in repo!</p>
<p>Please do not have a feeling that I&#8217;m saying other distro/package managers are bad or less useful than Arch/pacman, I was simply having a comparison under special conditions &#8211; Indeed, every GNU/Linux thing is great and well developed!</p>
<p>Another great feature I found in Archlinux is the rc.conf file. We can easily configure various system wide things in /etc/rc.conf file, like which all kernel modules to load, which all daemons to run at start, hostname, timezone, network interfaces, gateways and so on. There&#8217;s also an application called &#8216;rc.d&#8217; which is similar to &#8216;service&#8217; in debian/ubuntu using which we can start various services like sshd, etc. Also, the support in IRC channel (#archlinux @ irc.freenode.net) and in Arch forums are very helpful.</p>
<p>Finally, as a student, I find Archlinux very useful and informative, Also it&#8217;s so much of fun using it. I humbly recommend this sweet GNU/Linux distro to everyone who likes to add more spice to their GNU/Linux computing. I just started with Archlinux and hope I could post more about it in future. Thank you so much for reading. Greetings!</p>
]]></content:encoded>
			<wfw:commentRss>http://ershadk.com/blog/2011/08/12/why-i-started-loving-archlinux/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>It was really a wonderful experience at MES :)</title>
		<link>http://ershadk.com/blog/2011/07/16/it-was-really-a-wonderful-experience-at-mes/</link>
		<comments>http://ershadk.com/blog/2011/07/16/it-was-really-a-wonderful-experience-at-mes/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 03:59:07 +0000</pubDate>
		<dc:creator>ershad</dc:creator>
				<category><![CDATA[Talks]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[mesce]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[talk]]></category>
		<category><![CDATA[unforgettable]]></category>

		<guid isPermaLink="false">http://ershadk.wordpress.com/?p=365</guid>
		<description><![CDATA[Yesterday, I went to MES College of Engineering to deliver a small talk on programming and free software, it was entirely a new experience for me. A bigger crowd than expected was present. It went fine Thanks to Raghesh sir, Raju sir, S@IT and to friends there I&#8217;m happy to share my little slides. It<a href="http://ershadk.com/blog/2011/07/16/it-was-really-a-wonderful-experience-at-mes/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I went to <a href="http://mesce.ac.in" target="_blank">MES College of Engineering</a> to deliver a small talk on programming and free software, it was entirely a new experience for me. A bigger crowd than expected was present. It went fine <img src='http://ershadk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Thanks to <a href="http://raghesh.wordpress.com/" target="_blank">Raghesh sir</a>, Raju sir, S@IT and to friends there <img src='http://ershadk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;m happy to <a href="http://www.slideshare.net/ershadk/programming-is-fun-an-intro-to-free-software" target="_blank">share my little slides</a>. It was created according to numerous suggestions by Raghesh sir. For fun, the presentation was started with a SMS trigger from audience <img src='http://ershadk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The code for that is like &#8216;get-thing-done&#8217; and doesn&#8217;t have the quality to upload. It&#8217;s developed using python with gammu module. Please feel free to tell me if you want to have a look at the code.</p>
<p>Attribution: &#8216;Input -&gt; Fun -&gt; Output&#8217; is an idea got from Niyam Bhushan during his talk at NIT Calicut on FOSS Meet day.</p>
<p>Thank you <img src='http://ershadk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ershadk.com/blog/2011/07/16/it-was-really-a-wonderful-experience-at-mes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A cryptographic tool that converts weak password into a strong password before encrypting</title>
		<link>http://ershadk.com/blog/2011/06/10/a-cryptographic-tool-that-converts-weak-password-into-a-strong-password-before-encrypting/</link>
		<comments>http://ershadk.com/blog/2011/06/10/a-cryptographic-tool-that-converts-weak-password-into-a-strong-password-before-encrypting/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 10:26:51 +0000</pubDate>
		<dc:creator>ershad</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://ershadk.wordpress.com/?p=358</guid>
		<description><![CDATA[Here&#8217;s a small encryption/decryption tool that works based on AES algorithm. No matter how weak your password is, the program converts it to a  32 digits hexadecimal number  before encrypting. This is achieved by finding the MD5 hash of the password using hashlib python module. This hash is used to encrypt the file. The source<a href="http://ershadk.com/blog/2011/06/10/a-cryptographic-tool-that-converts-weak-password-into-a-strong-password-before-encrypting/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a small encryption/decryption tool that works based on AES algorithm. No matter how weak your password is, the program converts it to a  32 digits hexadecimal number  before encrypting. This is achieved by finding the MD5 hash of the password using hashlib python module. This hash is used to encrypt the file.</p>
<p><a href="https://github.com/ershad/Snippets/blob/master/crypto.py" target="_blank">The source file is here</a></p>
<p>The idea in my mind while writing this program was this:</p>
<p>Suppose a cracker gets an encrypted file and he figures out it&#8217;s encrypted using AES somehow. Then he starts brute force attack on it to find the key and extract information. If the password used to encrypt that file is weak and if it&#8217;s based on a dictionary word, the cracker can easily figure out the password. Hence the password  given by the user must be made stronger by the encrypting program. And the best way to make a password strong is by using  digest algorithms since it&#8217;s unique to a string.</p>
<p>What do you think? Am I wrong? Thank you <img src='http://ershadk.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://ershadk.com/blog/2011/06/10/a-cryptographic-tool-that-converts-weak-password-into-a-strong-password-before-encrypting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

