<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Kasun Herath</title>
	<atom:link href="http://kasunh.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://kasunh.wordpress.com</link>
	<description>Freedom for All</description>
	<lastBuildDate>Sat, 29 Oct 2011 17:24:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='kasunh.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Kasun Herath</title>
		<link>http://kasunh.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://kasunh.wordpress.com/osd.xml" title="Kasun Herath" />
	<atom:link rel='hub' href='http://kasunh.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Preserving Remote IP/Host while proxying</title>
		<link>http://kasunh.wordpress.com/2011/10/11/preserving-remote-iphost-while-proxying/</link>
		<comments>http://kasunh.wordpress.com/2011/10/11/preserving-remote-iphost-while-proxying/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 19:05:56 +0000</pubDate>
		<dc:creator>Kasun Herath</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mod_proxy]]></category>
		<category><![CDATA[mod_rpaf]]></category>
		<category><![CDATA[preserve IP]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[X-Forwarded-For]]></category>

		<guid isPermaLink="false">http://kasunh.wordpress.com/?p=175</guid>
		<description><![CDATA[You host your web application with a hosting provider. Your application log/access IP address of your users and you get 127.0.0.1 or some other private IP. Deja Vu? Most likely reason for the above scenario is your hosting provider is &#8230; <a href="http://kasunh.wordpress.com/2011/10/11/preserving-remote-iphost-while-proxying/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=175&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">You host your web application with a hosting provider. Your application log/access IP address of your users and you get 127.0.0.1 or some other private IP. Deja Vu? Most likely reason for the above scenario is your hosting provider is using a proxy and the proxy server sits in the same machine or in the same network. Under a such situation we end up using X-Forwarded-For header.</p>
<p style="text-align:justify;">I am aware of two solutions to be used in such a proxy setup so the developer doesn&#8217;t have to end up using X-Forwarded-For header.</p>
<p style="text-align:justify;">1.) When the proxy server is an Apache, using ProxyPreserveHost directive in mod_proxy.<br />
This can be used to preserve the remote host not the remote ip. This is useful for situations where name based virtual hosting is used and the backend server needs to know the virtual name of host.<br />
Open mod_proxy configuration file of your proxy server and enter directive, <a href="http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#proxypreservehost" target="_blank">ProxyPreserveHost On</a>, and restart your apache instance.</p>
<p style="text-align:justify;">2.) When backend server is apache, use mod_rpaf<br />
This <a href="http://stderr.net/apache/rpaf/" target="_blank">apache module</a> can be used to preserve both remote IP/HOST. Internally it uses X-Forwarded-For header to detect a proxy in it&#8217;s list of known proxies and reset the headers accordingly. This works with any proxy server in the front end provided that the proxy server sets X-Forwarded-For header. To use mod_rpaf, install and enable it in the backend server and add following directives in the module&#8217;s configuration.<br />
RPAFenable On<br />
RPAFsethostname On<br />
RPAFproxy_ips 127.0.0.1</p>
<p style="text-align:justify;">Remote IP is automatically preserved when RPAFenable On directive is used. RPAFsethostname On directive should be used to preserve host and RPAFproxy_ips is the list of known proxy ips.</p>
<p style="text-align:justify;">Restart backend apache server and you are good to go.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kasunh.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kasunh.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kasunh.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kasunh.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kasunh.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kasunh.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kasunh.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kasunh.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kasunh.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kasunh.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kasunh.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kasunh.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kasunh.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kasunh.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=175&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kasunh.wordpress.com/2011/10/11/preserving-remote-iphost-while-proxying/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">kasunh</media:title>
		</media:content>
	</item>
		<item>
		<title>Git over http(s)</title>
		<link>http://kasunh.wordpress.com/2011/01/15/git-over-https/</link>
		<comments>http://kasunh.wordpress.com/2011/01/15/git-over-https/#comments</comments>
		<pubDate>Sat, 15 Jan 2011 16:11:33 +0000</pubDate>
		<dc:creator>Kasun Herath</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git-http-backend]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[https]]></category>

		<guid isPermaLink="false">http://kasunh.wordpress.com/?p=157</guid>
		<description><![CDATA[Traditionally git used to work only over ssh or git protocols while there was only a dumb version of git over http which was slow and inefficient. While this was ok for most of the time sometimes git needs to &#8230; <a href="http://kasunh.wordpress.com/2011/01/15/git-over-https/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=157&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Traditionally git used to work only over ssh or git protocols while there was only a dumb version of git over http which was slow and inefficient. While this was ok for most of the time sometimes git needs to be able to work over http. Now starting from git 1.7 both git servers and clients have support for smart http which works over http(s) and is supposed to be as efficient as the ssh version.</p>
<p>This functionality is made available by a cgi script called git-http-backend provided with git-core. So for git to work over http(s) there should be a web server already configured and as a result there won&#8217;t be any conflicts by both the web server and git trying acquire port 80.</p>
<p>The manual for the git-http-backend can be <a title="git-http-backend" href="http://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html" target="_blank">found here</a>.</p>
<p>The following steps can be used to configure git to work over http(s) with Apache.</p>
<p>1) First configure Apache</p>
<p>Make sure mod_cgi, mod_alias, and mod_env are enabled.</p>
<p>Open the Apache config file and append the following. Debian based system should have it under /etc/apache2/apache2.conf by default</p>
<p>SetEnv GIT_PROJECT_ROOT /home/user/git_pub<br />
SetEnv GIT_HTTP_EXPORT_ALL<br />
ScriptAlias /git/ /usr/lib/git-core/git-http-backend/</p>
<p>The GIT_PROJECT_ROOT should point to the root folder where git repositories would be hosted. Set this away from the document root of the web server. What the above do is direct any requests with /git/ to the git-http-backend and tell the script that the root of git repositories is GIT_PROJECT_ROOT.</p>
<p>That is all that needs to be done that is specific to git over http(s). The manual for for the git-http-backend explains these steps pretty thoroughly.</p>
<p>Now for some tit-bits that are not explained in the manual. Those who are experienced with Apache and Git would find the following very boring.</p>
<p>2) For authentication for both read and write accesses append the following to theApache config file</p>
<p>&lt;Location /git&gt;<br />
AuthType Basic<br />
AuthName &#8220;Private Git Access&#8221;<br />
AuthUserFile /etc/apache2/authusers<br />
Require valid-user<br />
&lt;/Location&gt;</p>
<p>What the above do is make requests to /git only accessible to valid users and tell valid users are listed on the file /etc/apache2/authusers. Make sure the file authusers is accessible by Apache.</p>
<p>If there is no AuthUserFile in your system the following command can be used to create the user list at /etc/apache2/authusers and add the user &#8216;username&#8217; to it. The command will prompt for a password for the user.</p>
<p>htpasswd -c /etc/apache2/authusers username</p>
<p>3) Restart Apache</p>
<p>On debian most probably, sudo /etc/init.d/apache2 restart</p>
<p>4) Create an empy bare git repository under the specified GIT_PROJECT_ROOT (/home/user/git_pub in our example)</p>
<p>cd to GIT_PROJECT_ROOT</p>
<p>mkdir project</p>
<p>cd project</p>
<p>git init &#8211;bare</p>
<p>5) Make the folder &#8216;project&#8217; and it&#8217;s children owned by the user which the web server is run from. This should be done for push requests by clients to work or otherwise the web server won&#8217;t be able to merge files. On debian based systems this user is usually www-data and is defined in a file called envvars under apache2 installation.</p>
<p>sudo chown -R www-data project/<br />
sudo chgrp -R www-data project/</p>
<p>Now the bare git repository should be pull-able and pushable by authorized users.</p>
<p>6) Clone the git repository over http(s) from another location</p>
<p>git clone http://username@host/git/project</p>
<p>7) Do the first commit</p>
<p>cd project<br />
touch readme<br />
git add readme<br />
git commit -m &#8220;first commit&#8221;<br />
git push origin master</p>
<p>It is as easy as that. From here the setuped git repository should work as normal.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kasunh.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kasunh.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kasunh.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kasunh.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kasunh.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kasunh.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kasunh.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kasunh.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kasunh.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kasunh.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kasunh.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kasunh.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kasunh.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kasunh.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=157&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kasunh.wordpress.com/2011/01/15/git-over-https/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">kasunh</media:title>
		</media:content>
	</item>
		<item>
		<title>Django cronjobs</title>
		<link>http://kasunh.wordpress.com/2010/05/25/django-cronjobs/</link>
		<comments>http://kasunh.wordpress.com/2010/05/25/django-cronjobs/#comments</comments>
		<pubDate>Tue, 25 May 2010 03:00:30 +0000</pubDate>
		<dc:creator>Kasun Herath</dc:creator>
				<category><![CDATA[Journey into Python]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[cronjobs]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[long running processes]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scheduled jobs]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://kasunh.wordpress.com/?p=150</guid>
		<description><![CDATA[In web applications sometimes you want to run processes that are seperated from the Request/Response cycle, like scheduled jobs that run at a specific time of a day. Scheduling such jobs in a unix environment is very easy with cronjobs. &#8230; <a href="http://kasunh.wordpress.com/2010/05/25/django-cronjobs/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=150&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In web applications sometimes you want to run processes that are seperated from the Request/Response cycle, like scheduled jobs that run at a specific time of a day. Scheduling such jobs in a unix environment is very easy with cronjobs. You just need to edit the crontab file and define a time and a command(a script to be run in this case) to execute at that time.</p>
<p>This post is about how to schedule such Django programs, that is python programs that import and use the Django framework.</p>
<p>This should be trivial because a Django program is another python program. But there is an important step to be done in about for Django modules to be discovered and run. That is to specify the Django settings file.</p>
<p>Let&#8217;s say there is a Django project called mysite and a Django app called myapp that has a method called runJob() in a python module called jobs.py that needs to be called every 30 mins.</p>
<p>let&#8217;s write a python script called thescript.py that will run every 30 minutes as a cronjob that will in turn call the runjob method.</p>
<p>thescript.py<br />
#######################################</p>
<p>import os</p>
<p>os.environ['DJANGO_SETTINGS_MODULE'] = &#8216;settings&#8217;</p>
<p>from myapp.jobs import runJob</p>
<p>runJob()</p>
<p>###################################</p>
<p>For easiness save the &#8216;thescript.py&#8217; in the mysite folder.</p>
<p>Then open a console and enter crontab -e to edit your cron file. Enter the following line.</p>
<p>*/30 * * * * python /path to mysite/thescript.py &gt; logfile 2&gt;&amp;1</p>
<p>This will run the &#8216;thescript.py&#8217; file every 30 minutes and any output would be directed to the logfile specified and the last &#8217;2&gt;&amp;1&#8242; tells that no email should be sent to the administrator. For more information on how to write the crontab file have a look at <a href="http://adminschoice.com/crontab-quick-reference">this</a>.</p>
<p>That is how easy it is to schedule a Django cronjob in an Unix environment.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kasunh.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kasunh.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kasunh.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kasunh.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kasunh.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kasunh.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kasunh.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kasunh.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kasunh.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kasunh.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kasunh.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kasunh.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kasunh.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kasunh.wordpress.com/150/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=150&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kasunh.wordpress.com/2010/05/25/django-cronjobs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">kasunh</media:title>
		</media:content>
	</item>
		<item>
		<title>Introducing Reegion</title>
		<link>http://kasunh.wordpress.com/2010/05/09/introducing-reegion/</link>
		<comments>http://kasunh.wordpress.com/2010/05/09/introducing-reegion/#comments</comments>
		<pubDate>Sun, 09 May 2010 14:45:04 +0000</pubDate>
		<dc:creator>Kasun Herath</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[sharing]]></category>
		<category><![CDATA[social]]></category>

		<guid isPermaLink="false">http://kasunh.wordpress.com/?p=144</guid>
		<description><![CDATA[Finally it is time to go public on a project I had been working on. Enter Reegion, a social platform for localized content. In the ocean of Information it is hard to find content with a regional significance. The content &#8230; <a href="http://kasunh.wordpress.com/2010/05/09/introducing-reegion/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=144&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Finally it is time to go public on a project I had been working on. Enter <a href="http://www.reegion.com" target="_blank">Reegion</a>, a social platform for localized content.</p>
<p>In the ocean of Information it is hard to find content with a regional significance. The content could be in the form of News articles, images, videos or just opinion of a person. The best way for this content to be unearthed is to let users share, rank and discuss content they discover. We are here with tools and solutions to facilitate this process.</p>
<p><a href="http://www.reegion.com" target="_blank">Reegion</a> is still on beta and works only for Sri Lanka for the time been. We want Reegion to be more featureful and our algorithms to be perfect, until then Reegion would remain on beta. Some features to be anticipated in the near future are popular contents made so by the interaction of the users, joining regions and support for more content types.</p>
<p>Our mission is to localize the Internet experience. We hope we be able to make social discovering and sharing much more fun and there by make the Internet much more useful in the local context. Try out <a href="http://www.reegion.com" target="_blank">Reegion</a>, flock to your region, promote it and help us localize the Internet.</p>
<p>The best way to follow the progress of Reegion would be to use it (just kidding) or alternatively you can follow us through our <a href="http://twitter.com/reegion_app" target="_blank">twitter updates</a>.</p>
<p>For the technically interested, the Reegion code is written in Python/Django and runs on a Apache/Nginx server.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kasunh.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kasunh.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kasunh.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kasunh.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kasunh.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kasunh.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kasunh.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kasunh.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kasunh.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kasunh.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kasunh.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kasunh.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kasunh.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kasunh.wordpress.com/144/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=144&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kasunh.wordpress.com/2010/05/09/introducing-reegion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">kasunh</media:title>
		</media:content>
	</item>
		<item>
		<title>Django-resolvetime</title>
		<link>http://kasunh.wordpress.com/2010/04/02/django-resolvetime/</link>
		<comments>http://kasunh.wordpress.com/2010/04/02/django-resolvetime/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 11:23:14 +0000</pubDate>
		<dc:creator>Kasun Herath</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[time formatting]]></category>

		<guid isPermaLink="false">http://kasunh.wordpress.com/?p=142</guid>
		<description><![CDATA[Django-resolvetime is a Django filter to convert a python datetime object into a format that specifies the time difference between the time of the datetime and now. I developed this for a personal project of mine and decided to opensource &#8230; <a href="http://kasunh.wordpress.com/2010/04/02/django-resolvetime/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=142&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Django-resolvetime is a Django filter to convert a python datetime object into a format that specifies the time difference between the time of the datetime and now. I developed this for a personal project of mine and decided to opensource since I could not find a filter available to get the job done.</p>
<p>The code is hosted at <a href="http://code.google.com/p/django-resolvetime/">http://code.google.com/p/django-resolvetime/</a>. Installation and usage of the filter is straight forward. Instructions are given in the README file.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kasunh.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kasunh.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kasunh.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kasunh.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kasunh.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kasunh.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kasunh.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kasunh.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kasunh.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kasunh.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kasunh.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kasunh.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kasunh.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kasunh.wordpress.com/142/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=142&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kasunh.wordpress.com/2010/04/02/django-resolvetime/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">kasunh</media:title>
		</media:content>
	</item>
		<item>
		<title>Configuring PyDev to work with Django</title>
		<link>http://kasunh.wordpress.com/2009/12/27/configuring-pydev-to-work-with-django/</link>
		<comments>http://kasunh.wordpress.com/2009/12/27/configuring-pydev-to-work-with-django/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 07:47:09 +0000</pubDate>
		<dc:creator>Kasun Herath</dc:creator>
				<category><![CDATA[Journey into Python]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[configuring]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[pydev]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://kasunh.wordpress.com/?p=135</guid>
		<description><![CDATA[Django is the most widely used if not the most popular web framework among those available for python. Have a look at this report by Jacob Kaplan-Moss the co-creator of Django, to get an idea about the current standing of &#8230; <a href="http://kasunh.wordpress.com/2009/12/27/configuring-pydev-to-work-with-django/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=135&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.djangoproject.com/" target="_blank">Django</a> is the most widely used if not the most popular web framework among those available for python. Have a look at <a href="http://jacobian.org/writing/django-community-2009/" target="_blank">this report</a> by Jacob Kaplan-Moss the co-creator of Django, to get an idea about the current standing of Django among the community.</p>
<p>One disadvantage for Django is the lack of IDE support it has. Here it holds a clear disadvantage against it&#8217;s rival web frameworks such as Ruby on Rails. Wing IDE looks impressive but is not free. I wasn&#8217;t much impressed with Komodo and it is not free either. The best bet seams to be Netbeans 7 which promises to have good python support. Hopefully it would have satisfactory Django support as well. Currently netbeans is having a <a href="http://wiki.netbeans.org/Python" target="_blank">python plugin</a> that is still in beta stage. The best alternative for me as of now is <a href="http://pydev.org/" target="_blank">PyDev</a> which I have been using with python for sometime now. Here I will explain how to configure PyDev to work with Django.</p>
<p>1.) First download and install Django<br />
2.) Add Django source folder to PYTHONPATH in pydev</p>
<ul>
<li> Go to windows &gt; preferences</li>
</ul>
<ul>
<li>In the opended dialog choose interpreter-python</li>
</ul>
<ul>
<li>Here under python interpreter a python interpreter should be available. If not add one by clicking new</li>
</ul>
<ul>
<li> In System PYTHONPATH add the downloaded source folder of Django by clicking New Folder</li>
</ul>
<p>3.) Create a new pydev project.</p>
<ul>
<li> Go to file &gt; new &gt; pydev project</li>
</ul>
<ul>
<li> Enter project name, path and importantly make sure the option &#8216;create default src folder and add it to PYTHONPATH?&#8217; is choosen. This is easiest way or you can manually add the source folder of the new project to PYTHONPATH by going to File &gt; properties &gt; PYTHONPATH</li>
</ul>
<p>4.) Start a new Django project</p>
<ul>
<li> Open a new console from the Operating System(console support inside pydev is avialable but is not very satisfactory)</li>
</ul>
<ul>
<li> Navigate to the newly create src folder inside the pydev project</li>
</ul>
<ul>
<li> type django-admin.py startproject &#8216;sitename&#8217; (sitename should be the name of your project). This how a new project is started in Django</li>
</ul>
<p>If your projects name is mysite the folder structure should be as follows<br />
mysite<br />
src<br />
mysite</p>
<p>Now pydev should be configured to work with Django. All the python feature that pydev supports should be now working with Django as well.</p>
<p>The standard features of a modern IDE works beautifully with pydev for Django but there are some major drawbacks. Django template tags are not supported in pydev. Also the console support inside pydev is not impressive. So for now I am forced to use pydev for Django coding, the OS console for giving Django commands and nothing for Django templates.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kasunh.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kasunh.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kasunh.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kasunh.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kasunh.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kasunh.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kasunh.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kasunh.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kasunh.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kasunh.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kasunh.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kasunh.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kasunh.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kasunh.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=135&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kasunh.wordpress.com/2009/12/27/configuring-pydev-to-work-with-django/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">kasunh</media:title>
		</media:content>
	</item>
		<item>
		<title>University of Moratuwa tops GSOC 2009</title>
		<link>http://kasunh.wordpress.com/2009/09/17/university-of-moratuwa-tops-gsoc-2009/</link>
		<comments>http://kasunh.wordpress.com/2009/09/17/university-of-moratuwa-tops-gsoc-2009/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 06:11:07 +0000</pubDate>
		<dc:creator>Kasun Herath</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Randoms]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[university of moratuwa]]></category>

		<guid isPermaLink="false">http://kasunh.wordpress.com/?p=133</guid>
		<description><![CDATA[University of Moratuwa has been able to top the Google Summer of Code program, yet again. With 22 participating students university of Moratuwa was far ahead from the second place, University of Campinas Brazil which had 12 participating students. I&#8217;m &#8230; <a href="http://kasunh.wordpress.com/2009/09/17/university-of-moratuwa-tops-gsoc-2009/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=133&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>University of Moratuwa has been able to top the Google Summer of Code program, yet again. With 22 participating students university of Moratuwa was far ahead from the second place, University of Campinas Brazil which had 12 participating students. I&#8217;m glad <a href="http://kasunh.wordpress.com/2009/04/21/i-am-selected-for-summer-of-code-2009/" target="_blank">i was</a> a part of this success. <a href="http://google-opensource.blogspot.com/2009/09/tasty-new-google-summer-of-code-stats.html">Here are some stats</a> of GSOC 2009.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kasunh.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kasunh.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kasunh.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kasunh.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kasunh.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kasunh.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kasunh.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kasunh.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kasunh.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kasunh.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kasunh.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kasunh.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kasunh.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kasunh.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=133&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kasunh.wordpress.com/2009/09/17/university-of-moratuwa-tops-gsoc-2009/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">kasunh</media:title>
		</media:content>
	</item>
		<item>
		<title>Debugging in Python</title>
		<link>http://kasunh.wordpress.com/2009/09/07/debugging-in-python/</link>
		<comments>http://kasunh.wordpress.com/2009/09/07/debugging-in-python/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 19:27:21 +0000</pubDate>
		<dc:creator>Kasun Herath</dc:creator>
				<category><![CDATA[Journey into Python]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[pdb]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://kasunh.wordpress.com/?p=130</guid>
		<description><![CDATA[Python has a simple yet powerful builtin module for debugging called pdb. Using this module you can debug your python code easily even without any IDE. 1. First step is to import the pdb module 2. Next step is to &#8230; <a href="http://kasunh.wordpress.com/2009/09/07/debugging-in-python/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=130&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Python has a simple yet powerful builtin module for debugging called <a href="http://docs.python.org/library/pdb.html" target="_blank">pdb</a>. Using this module you can debug your python code easily even without any IDE.</p>
<p>1. First step is to import the pdb module</p>
<p>2. Next step is to mark the entry point where the debugger would be called in. We use the set_trace() method for that.<br />
pdb.set_trace()</p>
<p>3. When the program is run the execution would stop at the set_trace() method and would wait for debugging commands.</p>
<p>4. To run the next statment enter &#8216;n&#8217; or &#8216;next&#8217;</p>
<p>5. To print a variable enter &#8216;pp variable_name&#8217;</p>
<p>6. To run until exit enter &#8216;c&#8217; or &#8216;continue&#8217;</p>
<p>7. To display the current location enter &#8216;l&#8217; or &#8216;list&#8217;<br />
This would display an appropiate part of the source code with a pointer to the current statement.</p>
<p>8. To step into a method enter &#8216;s&#8217; or &#8216;step&#8217; when debugger is met with a method</p>
<p>9. To insert a break point enter &#8216;b filename:linenumber&#8217;</p>
<p>10. You can also dynamically assign values into variables.<br />
Let&#8217;s assume there is a variable called num initialized to 10. You want to see what would happen when that variable is initialized to 20. You just do this. (pdb) num = 20 and then enter &#8216;n&#8217; to execute next statement or enter &#8216;c&#8217; to execute program until the end.</p>
<p>An example would look like this</p>
<p>import pdb</p>
<p>def method():<br />
i = 10<br />
name = &#8216;kasun&#8217;<br />
last_letter = name[-1]</p>
<p>last_num = ord(last_letter)</p>
<p>print &#8216;last_num is&#8217;, last_num<br />
if __name__ == &#8216;__main__&#8217;:<br />
pdb.set_trace()<br />
method()</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kasunh.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kasunh.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kasunh.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kasunh.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kasunh.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kasunh.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kasunh.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kasunh.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kasunh.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kasunh.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kasunh.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kasunh.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kasunh.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kasunh.wordpress.com/130/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=130&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kasunh.wordpress.com/2009/09/07/debugging-in-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">kasunh</media:title>
		</media:content>
	</item>
		<item>
		<title>When Linux crashes</title>
		<link>http://kasunh.wordpress.com/2009/08/27/when-linux-crashes/</link>
		<comments>http://kasunh.wordpress.com/2009/08/27/when-linux-crashes/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 05:30:49 +0000</pubDate>
		<dc:creator>Kasun Herath</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Randoms]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[magic commands]]></category>
		<category><![CDATA[recover]]></category>

		<guid isPermaLink="false">http://kasunh.wordpress.com/?p=128</guid>
		<description><![CDATA[Yes Linux been another piece of software, gets crashed once in a while. Once I used to work with a Ubuntu machine that after 10 hours of work would always get stuck when trying to shutdown. Luckily for Linux users &#8230; <a href="http://kasunh.wordpress.com/2009/08/27/when-linux-crashes/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=128&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yes Linux been another piece of software, gets crashed once in a while. Once I used to work with a Ubuntu machine that after 10 hours of work would always get stuck when trying to shutdown. Luckily for Linux users there are some options before reaching for the power button.</p>
<p>You can use a sequence of &lt;alt + sysreq(Prnt Scrn) + key&gt; to issue commands straight into the kernel even when the system is in a total non responsive state.</p>
<p>For example the following sequence of commands can rescue you from a crash and would execute a safe reboot.</p>
<p>ALT + SysReq + r<br />
ALT + SysReq + s<br />
ALT + SysReq + e<br />
ALT + SysReq + i<br />
ALT + SysReq + u<br />
ALT + SysReq + b</p>
<p><a href="http://en.wikipedia.org/wiki/Magic_SysRq_key#Magic_commands" target="_blank">Here</a> you can find what each command actually does.</p>
<p>For the easiness of remembering the commands, the idiom, &#8216;Raising Skinny Elephant Is Utterly Boring&#8217; is used.</p>
<p>Remember that the above commands would only work when the system is in a non-responsive state. Otherwise it would just throw a bunch of print screen windows at you.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kasunh.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kasunh.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kasunh.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kasunh.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kasunh.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kasunh.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kasunh.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kasunh.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kasunh.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kasunh.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kasunh.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kasunh.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kasunh.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kasunh.wordpress.com/128/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=128&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kasunh.wordpress.com/2009/08/27/when-linux-crashes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">kasunh</media:title>
		</media:content>
	</item>
		<item>
		<title>What if by Ron Paul</title>
		<link>http://kasunh.wordpress.com/2009/06/21/what-if-by-ron-paul/</link>
		<comments>http://kasunh.wordpress.com/2009/06/21/what-if-by-ron-paul/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 05:43:27 +0000</pubDate>
		<dc:creator>Kasun Herath</dc:creator>
				<category><![CDATA[politics]]></category>
		<category><![CDATA[interventionism]]></category>
		<category><![CDATA[Ron Paul]]></category>
		<category><![CDATA[special interests]]></category>

		<guid isPermaLink="false">http://kasunh.wordpress.com/?p=125</guid>
		<description><![CDATA[Ron Paul is one of those rare politicians who make sense more often than not but find it hard to make a big enough impact to actually change the status-quo. Why? I don&#8217;t know, maybe this whole democracy thing is &#8230; <a href="http://kasunh.wordpress.com/2009/06/21/what-if-by-ron-paul/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=125&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ron Paul is one of those rare politicians who make sense more often than not but find it hard to make a big enough impact to actually change the status-quo. Why? I don&#8217;t know, maybe this whole <a href="http://kasunh.wordpress.com/2009/06/11/my-silly-quotes-4/">democracy thing is a delusion</a>, maybe you always need some special interest group behind you to win an election.</p>
<p>I found this speech by Ron Paul, a very thoughtful speech indeed.</p>
<span style="text-align:center; display: block;"><a href="http://kasunh.wordpress.com/2009/06/21/what-if-by-ron-paul/"><img src="http://img.youtube.com/vi/FqAF-Alc7CM/2.jpg" alt="" /></a></span>
<p>These are the most interesting points I found in the speech.</p>
<ul>
<li>What if we wake up one day and realize that terrorist threat is a predictable consequence of our meddling in the affairs of others.</li>
<li>What if conservatives who preach smaller government wake up and realize that our interventionist foreign policy provides the greatest incentive to expand the government.</li>
<li>What if we as a nation came to realize that the quest for empires eventually destroys all great nations.</li>
<li>What if Christianity actually preaches peace and not preventive wars of aggression.</li>
<li>What if diplomacy is found to be superior to bombs and bribes.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kasunh.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kasunh.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kasunh.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kasunh.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kasunh.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kasunh.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kasunh.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kasunh.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kasunh.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kasunh.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kasunh.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kasunh.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kasunh.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kasunh.wordpress.com/125/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kasunh.wordpress.com&amp;blog=3162918&amp;post=125&amp;subd=kasunh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kasunh.wordpress.com/2009/06/21/what-if-by-ron-paul/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">kasunh</media:title>
		</media:content>
	</item>
	</channel>
</rss>
