<?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>be present now &#187; linux</title>
	<atom:link href="http://durdn.com/blog/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://durdn.com/blog</link>
	<description>modern alchemy for joyful living.</description>
	<lastBuildDate>Sun, 01 Nov 2009 20:24:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>how to setup pinax with nginx</title>
		<link>http://durdn.com/blog/2009/10/07/how-to-setup-pinax-with-nginx/</link>
		<comments>http://durdn.com/blog/2009/10/07/how-to-setup-pinax-with-nginx/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 00:38:44 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pinax]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[flup]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://durdn.com/blog/?p=66</guid>
		<description><![CDATA[Tonight I spent sometime getting Pinax &#8211; Django swiss army knife &#8211; to work on nginx via fastcgi on my Ubuntu 9.10 box. Here is a step by step guide. First of course we need to install nginx, pretty easy with Ubuntu: sudo apt-get install nginx Create a new file called &#60;appname&#62; in /etc/nginx/sites-available/ like [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight I spent sometime getting <a href="http://pinaxproject.com">Pinax</a> &#8211; <a href="http://www.djangoproject.com/">Django</a> swiss army knife &#8211; to work on <a href="http://wiki.nginx.org/Main">nginx</a> via fastcgi on my <a href="http://www.ubuntu.com/testing/karmic/beta">Ubuntu 9.10</a> box. Here is a step by step guide.</p>
<p>First of course we need to install nginx, pretty easy with Ubuntu:</p>
<p><code>sudo apt-get install nginx</code></p>
<p>Create a new file called &lt;appname&gt; in /etc/nginx/sites-available/ like the following:</p>
<pre>
upstream djangoserv {
    server 127.0.0.1:8801;
}

server {
    listen   80;
    server_name  alkemic;

    access_log  /var/log/nginx/appname.access.log;

    location ^~ /site_media/  {
        alias /home/nick/dev/projects/pinax07/appname/site_media/;
        autoindex on;
    }
    location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|mov)   {
        #access_log   off;
        expires      30d;
    }

    location / {
        # host and port to fastcgi server
        fastcgi_pass 127.0.0.1:8801;
        fastcgi_param PATH_INFO $fastcgi_script_name;
        fastcgi_param REQUEST_METHOD $request_method;
        fastcgi_param QUERY_STRING $query_string;
        fastcgi_param SERVER_NAME $server_name;
        fastcgi_param SERVER_PORT $server_port;
        fastcgi_param SERVER_PROTOCOL $server_protocol;
        fastcgi_param CONTENT_TYPE $content_type;
        fastcgi_param CONTENT_LENGTH $content_length;
        fastcgi_pass_header Authorization;
        fastcgi_intercept_errors off;
    }
}
</pre>
<p>Link it to sites-enabled so that we know it&#8217;s going to be started up (meanwhile you want to remove the default one):</p>
<p><code>sudo ln -s /etc/nginx/sites-available/appname /etc/nginx/sites-enabled/</code></p>
<p>Startup nginx with:</p>
<p><code>sudo /etc/init.d/nginx start</code></p>
<p>Activate your pinax installation (change the path to where you have installed your Pinax virtual environment):</p>
<p><code>source /home/nick/dev/projects/pinax07/bin/activate</code></p>
<p>Install <a href="http://trac.saddi.com/flup">flup</a> (required to have manage.py run as fastcgi) in your virtual env:</p>
<p><code>pip install flup</code></p>
<p>Symlink all the static assets into the site_media folder:</p>
<p><code> css -&gt; /home/nick/dev/projects/pinax07/appname/media/css/<br />
img -&gt; /home/nick/dev/projects/pinax07/appname/media/img<br />
js -&gt; /home/nick/dev/projects/pinax07/appname/media/js<br />
pinax -&gt; ../../lib/python2.6/site-packages/pinax/media/default/pinax/<br />
snd -&gt; /home/nick/dev/projects/pinax07/appname/media/snd<br />
swf -&gt; /home/nick/dev/projects/pinax07/appname/media/swf<br />
</code></p>
<p>Launch the python fastcgi process:</p>
<p><code> python ./manage.py runfcgi method=threaded host=127.0.0.1 port=8801<br />
</code><br />
Or:</p>
<p><code>python ./manage.py runfcgi method=prefork host=127.0.0.1 port=8801</code></p>
<p>Note that you might need to move your development environment to use a proper db like MySQL because otherwise the app will have problems finding your sqlite db file.</p>
<p>You should have now your app running on the blazing fast nginx.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fdurdn.com%2Fblog%2F2009%2F10%2F07%2Fhow-to-setup-pinax-with-nginx%2F';
  addthis_title  = 'how+to+setup+pinax+with+nginx';
  addthis_pub    = 'durdn';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://durdn.com/blog/2009/10/07/how-to-setup-pinax-with-nginx/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>my desktop during an intense coding session using xmonad</title>
		<link>http://durdn.com/blog/2009/07/01/my-desktop-during-an-intense-coding-session-using-xmonad/</link>
		<comments>http://durdn.com/blog/2009/07/01/my-desktop-during-an-intense-coding-session-using-xmonad/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 11:40:22 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[editors]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[compass]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[pinax]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[tiling]]></category>
		<category><![CDATA[wm]]></category>
		<category><![CDATA[xmonad]]></category>

		<guid isPermaLink="false">http://durdn.com/blog/?p=42</guid>
		<description><![CDATA[Here is what a coding session of mine looks like when I am in full swing. This is specifically the coding screen. That&#8217;s a 1920&#215;1600 resolution screen-shot . I obviously also have a browsing screen not shown. In the image above I am immersed into integrating Compass into Pinax (full post on that will follow). [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Here is what a coding session of mine looks like when I am in full swing. This is specifically the coding screen. That&#8217;s a 1920&#215;1600 resolution screen-shot <img src='http://durdn.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . I obviously also have a browsing screen not shown.</p>
<p style="text-align: left;"><a href="http://durdn.com/coding-session-xmonad.png"><img src="http://durdn.com/coding-session-xmonad.png" alt="coding session using xmonad" width="500" height="400" /></a></p>
<p style="text-align: left;">
<p style="text-align: left;">In the image above I am immersed into integrating <a title="Compass" href="http://compass-style.org">Compass</a> into <a href="http://pinaxproject.com">Pinax</a> (full post on that will follow).</p>
<p style="text-align: left;">When developing under Linux (<a title="Ubuntu" href="http://ubuntu.com">Ubuntu 9.04</a> at the moment) I have settled for a long time now on the ultra-productive tiling window manager <a title="Xmonad" href="http://xmonad.org">Xmonad</a>. Nothing I tried beats it. My fingers and my brain now are one with the keyboard short-cuts and the concept of mouse-less zen.</p>
<p style="text-align: left;">Yes I use <a href="http://www.vim.org/">vim</a> extensively and yes I use <a href="http://en.wikipedia.org/wiki/GNU_Screen">screen</a> with the new ubuntu <a href="http://arstechnica.com/open-source/news/2009/04/ubuntu-brings-advanced-screen-features-to-the-masses.ars">screen-profiles</a>. It rocks.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fdurdn.com%2Fblog%2F2009%2F07%2F01%2Fmy-desktop-during-an-intense-coding-session-using-xmonad%2F';
  addthis_title  = 'my+desktop+during+an+intense+coding+session+using+xmonad';
  addthis_pub    = 'durdn';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://durdn.com/blog/2009/07/01/my-desktop-during-an-intense-coding-session-using-xmonad/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>idea for a useful tool for a web entrepreneur/developer</title>
		<link>http://durdn.com/blog/2008/11/21/idea-for-a-useful-tool-for-a-web-entrepreneurdeveloper/</link>
		<comments>http://durdn.com/blog/2008/11/21/idea-for-a-useful-tool-for-a-web-entrepreneurdeveloper/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 10:52:51 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[colinux]]></category>
		<category><![CDATA[designer]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[webapp]]></category>

		<guid isPermaLink="false">http://durdn.com/blog/?p=39</guid>
		<description><![CDATA[This is the scenario I was thinking about: I want to interact with a graphic designer remotely, who is very very good with Photoshop and HTML/CSS but who might have trouble setting up the Linux environment needed to run my web app. What I would like to build (or find if it already exists) is [...]]]></description>
			<content:encoded><![CDATA[<p>This is the scenario I was thinking about: I want to interact with a graphic designer remotely, who is very very good with Photoshop and HTML/CSS but who might have trouble setting up the Linux environment needed to run my web app.</p>
<p>What I would like to build (or find if it already exists) is a custom CD that when inserted into a Windows or Mac OSX box does the following:</p>
<ul>
<li>Start a virtualbox/vmware instance with my Linux distribution of choice.</li>
<li>Inside the virtual machine the web app is started automatically in debug mode.</li>
<li>Proper networking is in place so that the web app is accessible to the host operating system on a specified port.</li>
<li>The template/media folder of my web app is shared via SMB with the host OS.</li>
</ul>
<p>This way the graphic designer could work on the templates/design of the application having (almost) zero knowledge of the technology behind and no access to the code.</p>
<p>I have already developed a solution like this for myself using <a href="http://colinux.org/">colinux</a>. But the process required quite some fiddling and was all but automatic. <img src='http://durdn.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Automated is the keyword.</p>
<p>That&#8217;s it.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fdurdn.com%2Fblog%2F2008%2F11%2F21%2Fidea-for-a-useful-tool-for-a-web-entrepreneurdeveloper%2F';
  addthis_title  = 'idea+for+a+useful+tool+for+a+web+entrepreneur%2Fdeveloper';
  addthis_pub    = 'durdn';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://durdn.com/blog/2008/11/21/idea-for-a-useful-tool-for-a-web-entrepreneurdeveloper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux one liner to extract email addresses from a django log file</title>
		<link>http://durdn.com/blog/2008/11/12/linux-one-liner-to-extract-email-addresses-from-a-django-log-file/</link>
		<comments>http://durdn.com/blog/2008/11/12/linux-one-liner-to-extract-email-addresses-from-a-django-log-file/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 12:01:29 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[awk xargs linux uniq]]></category>

		<guid isPermaLink="false">http://durdn.com/blog/?p=35</guid>
		<description><![CDATA[Say something bad happened and your application sent emails that it shouldn&#8217;t have (ahem who? not me&#8230;) and you want to collect the emails to apologise. So you just copied the output of a log file in a text file (wrong.txt) like the following: sending message 'Confirm email address for example.com' to email1@test1.com sending message [...]]]></description>
			<content:encoded><![CDATA[<p>Say something bad happened and your application sent emails that it shouldn&#8217;t have (ahem who? not me&#8230;) and you want to collect the emails to apologise. So you just copied the output of a log file in a text file (wrong.txt) like the following:</p>
<p><code><br />
sending message 'Confirm email address for example.com' to email1@test1.com<br />
sending message 'Confirm email address for example.com' to email2@test2.com<br />
[...]<br />
sending message 'Confirm email address for example.com' to email3@test3.com<br />
</code></p>
<p>Unix command line tools can make the job of extracting those emails and make them ready to be used in a To (or BCC) field a one liner:</p>
<p><code>cat wrong.txt | awk {'print $9'} | uniq | xargs -I{} echo -n "{},"</code></p>
<p>The result is:</p>
<p><code>email1@test1.com, email2@test2.com, [...], email3@test3.com</code></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fdurdn.com%2Fblog%2F2008%2F11%2F12%2Flinux-one-liner-to-extract-email-addresses-from-a-django-log-file%2F';
  addthis_title  = 'linux+one+liner+to+extract+email+addresses+from+a+django+log+file';
  addthis_pub    = 'durdn';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://durdn.com/blog/2008/11/12/linux-one-liner-to-extract-email-addresses-from-a-django-log-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.244 seconds -->
