<?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>Jawaad Mahmood in Tokyo</title>
	<atom:link href="http://www.tokyomuslim.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tokyomuslim.com</link>
	<description>Code, Games and fun</description>
	<lastBuildDate>Wed, 08 Feb 2012 02:05:21 +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>Britannica vs. Wikipedia</title>
		<link>http://www.tokyomuslim.com/2012/02/britannica-vs-wikipedia/</link>
		<comments>http://www.tokyomuslim.com/2012/02/britannica-vs-wikipedia/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 02:05:21 +0000</pubDate>
		<dc:creator>Jawaad</dc:creator>
				<category><![CDATA[Free-For-All]]></category>

		<guid isPermaLink="false">http://www.tokyomuslim.com/?p=1909</guid>
		<description><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/category/freeforall/" title="Free-For-All">Free-For-All</a></p>For the first time in about 15 years, I had the chance to check the Encyclopedia Britannica for an entry about a historical figure. http://www.britannica.com/EBchecked/topic/580776/Hippolyte-Taine Compare this to the Wikipedia entry. http://en.wikipedia.org/wiki/Hippolyte_Taine I can appreciate that Wikipedia may or may not distort the figure in question; however, at least I have something to go on. [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/category/freeforall/" title="Free-For-All">Free-For-All</a></p><p>For the first time in about 15 years, I had the chance to check the Encyclopedia Britannica for an entry about a historical figure.</p>
<p>http://www.britannica.com/EBchecked/topic/580776/Hippolyte-Taine</p>
<p>Compare this to the Wikipedia entry.</p>
<p>http://en.wikipedia.org/wiki/Hippolyte_Taine</p>
<p>I can appreciate that Wikipedia may or may not distort the figure in question; however, at least I have something to go on.  Britannica is just a disaster.  Imagining a world without Wikipedia is, for the lack of a more descriptive term, depressing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tokyomuslim.com/2012/02/britannica-vs-wikipedia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django Views As Classes with Python&#8217;s __call__ Magic Method</title>
		<link>http://www.tokyomuslim.com/2012/01/django-views-as-classes-with-pythons-__call__-magic-method/</link>
		<comments>http://www.tokyomuslim.com/2012/01/django-views-as-classes-with-pythons-__call__-magic-method/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 03:46:38 +0000</pubDate>
		<dc:creator>Jawaad</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.tokyomuslim.com/?p=1902</guid>
		<description><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/category/coding/" title="Coding">Coding</a></p>I have been using Django off-and-on for about 2 years now. I am really liking the direction, but what bugged me (for the longest time) is the re-usability of the view section. For those unfamiliar with Django views, they are not strictly &#8220;MVC&#8221; views. If anything, they act more like controllers, and I treat them [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/category/coding/" title="Coding">Coding</a></p><p>I have been using Django off-and-on for about 2 years now.  I am really liking the direction, but what bugged me (for the longest time) is the re-usability of the view section.</p>
<p>For those unfamiliar with Django views, they are not strictly &#8220;MVC&#8221; views.  If anything, they act more like controllers, and I treat them as such.  It should be a piece of cake to reuse code between these, but usually what happened was that I would define a bunch of private view functions and have them referenced by various view functions.  It wasn&#8217;t exactly the shining pinnacle of my development career.</p>
<p>While reading the code for <a href="http://code.google.com/p/django-jqchat/" title="jqchat, a chat system for Django">django-jqchat</a> while working on a project for my client, I rediscovered the python __call__ magic method.  This basically permits you to call an instance of an object like a function.  With a little effort, I managed to re-organize the code to make it a little more easy to parse.  This is not complete and not debugged, but maybe you will find it useful.</p>
<p><a href="https://gist.github.com/1680845">Github Gist Link</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tokyomuslim.com/2012/01/django-views-as-classes-with-pythons-__call__-magic-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interesting Comment on Islamic Banking</title>
		<link>http://www.tokyomuslim.com/2011/12/interesting-comment-on-islamic-banking/</link>
		<comments>http://www.tokyomuslim.com/2011/12/interesting-comment-on-islamic-banking/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 03:21:00 +0000</pubDate>
		<dc:creator>Jawaad</dc:creator>
				<category><![CDATA[Free-For-All]]></category>

		<guid isPermaLink="false">http://www.tokyomuslim.com/2011/12/interesting-comment-on-islamic-banking/</guid>
		<description><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/links/">Links</a></p><p><a href="http://www.reddit.com/r/islam/comments/nf5zl/how_do_islamic_banks_make_money/c38przk" rel="bookmark" title="Interesting Comment on Islamic Banking" target="_blank">http://www.reddit.com/r/islam/comments/nf5zl/how_do_islamic_banks_make_money/c38przk</a></p>I previously considered Islamic banking a fraud, more or less at the same level as &#8220;halal pork&#8221;.&#160; This comment has forced me to reconsider.]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/links/">Links</a></p><p><a href="http://www.reddit.com/r/islam/comments/nf5zl/how_do_islamic_banks_make_money/c38przk" rel="bookmark" title="Interesting Comment on Islamic Banking" target="_blank">http://www.reddit.com/r/islam/comments/nf5zl/how_do_islamic_banks_make_money/c38przk</a></p><p>I previously considered Islamic banking a fraud, more or less at the same level as &#8220;halal pork&#8221;.&nbsp; This comment has forced me to reconsider.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tokyomuslim.com/2011/12/interesting-comment-on-islamic-banking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sony Vaio ad cracks me up</title>
		<link>http://www.tokyomuslim.com/2011/12/sony-vaio-ad-cracks-me-up/</link>
		<comments>http://www.tokyomuslim.com/2011/12/sony-vaio-ad-cracks-me-up/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 06:09:18 +0000</pubDate>
		<dc:creator>Jawaad</dc:creator>
				<category><![CDATA[Free-For-All]]></category>

		<guid isPermaLink="false">http://www.tokyomuslim.com/2011/12/sony-vaio-ad-cracks-me-up/</guid>
		<description><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/images/">Images</a></p><p><a href="http://www.tokyomuslim.com/wp-content/uploads/2011/12/iPhone-Capture.jpg" title="image" rel="lightbox"><img src="http://www.tokyomuslim.com/wp-content/uploads/2011/12/iPhone-Capture.jpg" alt="image" width="528" /></a></p>Should I get the 13.3 or the 13.6?]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/images/">Images</a></p><p><a href="http://www.tokyomuslim.com/wp-content/uploads/2011/12/iPhone-Capture.jpg" title="image" rel="lightbox"><img src="http://www.tokyomuslim.com/wp-content/uploads/2011/12/iPhone-Capture.jpg" alt="image" width="528" /></a></p><p>Should I get the 13.3 or the 13.6?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tokyomuslim.com/2011/12/sony-vaio-ad-cracks-me-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django Deployment Guide</title>
		<link>http://www.tokyomuslim.com/2011/12/django-deployment-guide/</link>
		<comments>http://www.tokyomuslim.com/2011/12/django-deployment-guide/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 01:54:00 +0000</pubDate>
		<dc:creator>Jawaad</dc:creator>
				<category><![CDATA[Free-For-All]]></category>

		<guid isPermaLink="false">http://www.tokyomuslim.com/2011/12/django-deployment-guide/</guid>
		<description><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/links/">Links</a></p><p><a href="https://github.com/jacobian/django-deployment-workshop" rel="bookmark" title="Django Deployment Guide" target="_blank">https://github.com/jacobian/django-deployment-workshop</a></p>Found this while watching a class on Safaribooksonline. Deploying Django is always a bit of a hassle; hopefully this will help someone.]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/links/">Links</a></p><p><a href="https://github.com/jacobian/django-deployment-workshop" rel="bookmark" title="Django Deployment Guide" target="_blank">https://github.com/jacobian/django-deployment-workshop</a></p><p>Found this while watching a class on Safaribooksonline.
<div></div>
<div>Deploying Django is always a bit of a hassle; hopefully this will help someone.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.tokyomuslim.com/2011/12/django-deployment-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get rid of unnecessary /chrootjail/lib files</title>
		<link>http://www.tokyomuslim.com/2011/12/get-rid-of-unnecessary-chrootjaillib-files/</link>
		<comments>http://www.tokyomuslim.com/2011/12/get-rid-of-unnecessary-chrootjaillib-files/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 08:05:00 +0000</pubDate>
		<dc:creator>Jawaad</dc:creator>
				<category><![CDATA[Free-For-All]]></category>

		<guid isPermaLink="false">http://www.tokyomuslim.com/2011/12/get-rid-of-unnecessary-chrootjaillib-files/</guid>
		<description><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/links/">Links</a></p><p><a href="https://gist.github.com/1414828" rel="bookmark" title="Get rid of unnecessary /chrootjail/lib files" target="_blank">https://gist.github.com/1414828</a></p>I am not sure if I should actually publish this because it seems like hitting a fly with a nuke. This is a python script that goes through a chroot jail&#8217;s directory (in my case, /chroot/lib) and removes one file at a time.  It then tries sftping into the server using a restricted user; if [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/links/">Links</a></p><p><a href="https://gist.github.com/1414828" rel="bookmark" title="Get rid of unnecessary /chrootjail/lib files" target="_blank">https://gist.github.com/1414828</a></p><p>I am not sure if I should actually publish this because it seems like hitting a fly with a nuke.</p>
<div>This is a python script that goes through a chroot jail&#8217;s directory (in my case, /chroot/lib) and removes one file at a time.  It then tries sftping into the server using a restricted user; if the user is able to connect and transfer the file, the file is removed.  Otherwise, it is kept.</div>
<div>This requires Paramiko to execute the sftp connection.  I am sure there are better ways to do it, but this works.  (For some reason, just calculating the requirements /didn&#8217;t/ work for me.)</div>
<p><script src="https://gist.github.com/1414828.js"> </script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tokyomuslim.com/2011/12/get-rid-of-unnecessary-chrootjaillib-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migu1m: Japanese Truetype Font for Sublime Text 2</title>
		<link>http://www.tokyomuslim.com/2011/11/migu1m-japanese-truetype-font-for-sublime-text-2/</link>
		<comments>http://www.tokyomuslim.com/2011/11/migu1m-japanese-truetype-font-for-sublime-text-2/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 07:24:00 +0000</pubDate>
		<dc:creator>Jawaad</dc:creator>
				<category><![CDATA[Free-For-All]]></category>

		<guid isPermaLink="false">http://www.tokyomuslim.com/2011/11/migu1m-japanese-truetype-font-for-sublime-text-2/</guid>
		<description><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/links/">Links</a></p><p><a href="http://mix-mplus-ipa.sourceforge.jp/download.html#migu1m" rel="bookmark" title="Migu1m: Japanese Truetype Font for Sublime Text 2" target="_blank">http://mix-mplus-ipa.sourceforge.jp/download.html#migu1m</a></p>Found Migu1m recommended as a Japanese Sublime Text 2 font while surfing the web. &#160;Certainly is better than the other options I have on Ubuntu.]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/links/">Links</a></p><p><a href="http://mix-mplus-ipa.sourceforge.jp/download.html#migu1m" rel="bookmark" title="Migu1m: Japanese Truetype Font for Sublime Text 2" target="_blank">http://mix-mplus-ipa.sourceforge.jp/download.html#migu1m</a></p><p>Found Migu1m recommended as a <a href="http://mix-mplus-ipa.sourceforge.jp/download.html#migu1m" title="Japanese Truetype font for coding" target="">Japanese Sublime Text 2 font</a> while surfing the web. &nbsp;Certainly is better than the other options I have on Ubuntu.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tokyomuslim.com/2011/11/migu1m-japanese-truetype-font-for-sublime-text-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chroot, Ubuntu 10.04, and rssh</title>
		<link>http://www.tokyomuslim.com/2011/11/chroot-ubuntu-10-04-and-rssh/</link>
		<comments>http://www.tokyomuslim.com/2011/11/chroot-ubuntu-10-04-and-rssh/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 03:31:00 +0000</pubDate>
		<dc:creator>Jawaad</dc:creator>
				<category><![CDATA[Free-For-All]]></category>

		<guid isPermaLink="false">http://www.tokyomuslim.com/2011/11/chroot-ubuntu-10-04-and-rssh/</guid>
		<description><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/articles/">Articles</a></p>Days of effort have finally paid off; I have managed to establish an chroot jail for a project I was working on. A chroot jail is basically a less-secure virtual machine.&#160; User &#8220;A&#8221; logs into a machine and thinks he is in root (when he really is in /usr/foo/bar/).&#160; If he has a sufficiently locked-down [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/articles/">Articles</a></p><p>Days of effort have finally paid off; I have managed to establish an chroot jail for a project I was working on.</p>
<p>A chroot jail is basically a less-secure virtual machine.&nbsp; User &#8220;A&#8221; logs into a machine and thinks he is in root (when he really is in /usr/foo/bar/).&nbsp; If he has a sufficiently locked-down environment (such as the one that rssh provides), he will not be able to break out of his little cage and modify important system files.&nbsp; However, as a result of his confinement, he will also not be able to access other system resources &#8211; including shell files. </p>
<p>Herein lies the crux of the problem.&nbsp; It isn&#8217;t clear to me what files are needed and what files are not needed to establish a basic SCP or SSH connection.&nbsp; The following worked in my case.</p>
<ol>
<li>Install rssh (<span style="font-style: italic;">sudo apt-get install rssh</span>)</li>
<li>Install scponly (sudo apt-get install scponly)</li>
<li>Copy the scponly files to /foo/bar (or wherever you are making your jail)</li>
<li>Copy the /lib/ directory files to /foo/bar/lib (as it appears that not all files needed are copied)</li>
<li>Modify the /foo/bar/etc/passwd file (sudo chmod a+r /foo/bar/etc/passwd) and eliminate all users you don&#8217;t need in it.</li>
<li>Create a new user (sudo useradd -m -d /chroot/restricted_user -s /usr/bin/rssh restricted_user) and copy over his information from /etc/passwd to /foo/bar/etc/passwd</li>
<li>Your Chroot is working!&nbsp; (Be sure toedit /etc/rssh.conf to enable the options you want working, and set your chroot directory to whatever you want)</li>
</ol>
<p>This approach needs to be cleaned up, since I still don&#8217;t know what library files I need and which files I don&#8217;t.&nbsp; I am sure that, as is, there are a few security bugs.&nbsp; Probably will whip up a script to test it out tomorrow.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tokyomuslim.com/2011/11/chroot-ubuntu-10-04-and-rssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If you follow no other blog, follow Neojaponisme.</title>
		<link>http://www.tokyomuslim.com/2011/11/if-you-follow-no-other-blog-follow-neojaponisme/</link>
		<comments>http://www.tokyomuslim.com/2011/11/if-you-follow-no-other-blog-follow-neojaponisme/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 10:48:00 +0000</pubDate>
		<dc:creator>Jawaad</dc:creator>
				<category><![CDATA[Free-For-All]]></category>

		<guid isPermaLink="false">http://www.tokyomuslim.com/2011/11/if-you-follow-no-other-blog-follow-neojaponisme/</guid>
		<description><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/links/">Links</a></p><p><a href="http://neojaponisme.com/" rel="bookmark" title="If you follow no other blog, follow Neojaponisme." target="_blank">http://neojaponisme.com/</a></p>A statistical fluke among Tokyo gaijin blogs as it is well-researched and a pleasure to read. Actually, I will take back the &#8220;pleasure to read&#8221; part, as it can be disturbing to truly understand how a machine works.&#160; It reminds me of how I felt while studying Genetics; like I was on the verge of [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/links/">Links</a></p><p><a href="http://neojaponisme.com/" rel="bookmark" title="If you follow no other blog, follow Neojaponisme." target="_blank">http://neojaponisme.com/</a></p><p>A statistical fluke among Tokyo gaijin blogs as it is well-researched and a pleasure to read.</p>
<p>Actually, I will take back the &#8220;pleasure to read&#8221; part, as it can be disturbing to truly understand how a machine works.&nbsp; It reminds me of how I felt while studying Genetics; like I was on the verge of understanding many great truths, and simultaneously fighting the urge to run away screaming because of how it unraveled one&#8217;s pride in being human.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tokyomuslim.com/2011/11/if-you-follow-no-other-blog-follow-neojaponisme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Headless Ubuntu</title>
		<link>http://www.tokyomuslim.com/2011/11/headless-ubuntu/</link>
		<comments>http://www.tokyomuslim.com/2011/11/headless-ubuntu/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 14:56:00 +0000</pubDate>
		<dc:creator>Jawaad</dc:creator>
				<category><![CDATA[Free-For-All]]></category>

		<guid isPermaLink="false">http://www.tokyomuslim.com/2011/11/headless-ubuntu/</guid>
		<description><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/links/">Links</a></p><p><a href="http://oapeon.blogspot.com/2010/05/ubuntu-1004-vnc-based-login-server.html" rel="bookmark" title="Headless Ubuntu" target="_blank">http://oapeon.blogspot.com/2010/05/ubuntu-1004-vnc-based-login-server.html</a></p>Who could have known that it was so hard to switch resolutions on an Ubuntu machine? Downgraded back to 10.04 last week for my home server; life is too short to get caught up in learning a tablet OS for a server.]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://www.tokyomuslim.com/tumblog/links/">Links</a></p><p><a href="http://oapeon.blogspot.com/2010/05/ubuntu-1004-vnc-based-login-server.html" rel="bookmark" title="Headless Ubuntu" target="_blank">http://oapeon.blogspot.com/2010/05/ubuntu-1004-vnc-based-login-server.html</a></p><p>Who could have known that it was so hard to switch resolutions on an Ubuntu machine?</p>
<p>Downgraded back to 10.04 last week for my home server; life is too short to get caught up in learning a tablet OS for a server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tokyomuslim.com/2011/11/headless-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

