<?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>Parizek.com</title>
	<atom:link href="http://parizek.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://parizek.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 20:24:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>To A Mouse by Burns</title>
		<link>http://parizek.com/2012/04/to-a-mouse-by-burns/</link>
		<comments>http://parizek.com/2012/04/to-a-mouse-by-burns/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 16:11:28 +0000</pubDate>
		<dc:creator>dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://parizek.com/?p=338</guid>
		<description><![CDATA[Wee, sleekit, cowrin, tim&#8217;rous beastie, O, what a panic&#8217;s in thy breastie! Thou need na start awa sae hasty Wi bickering brattle! I wad be laith to rin an&#8217; chase thee, Wi&#8217; murdering pattle. I&#8217;m truly sorry man&#8217;s dominion Has broken Nature&#8217;s social union, An&#8217; justifies that ill opinion Which makes thee startle At me, [...]]]></description>
			<content:encoded><![CDATA[<p>Wee, sleekit, cowrin, tim&#8217;rous beastie,<br />
O, what a panic&#8217;s in thy breastie!<br />
Thou need na start awa sae hasty<br />
Wi bickering brattle!<br />
I wad be laith to rin an&#8217; chase thee,<br />
Wi&#8217; murdering pattle.</p>
<p>I&#8217;m truly sorry man&#8217;s dominion<br />
Has broken Nature&#8217;s social union,<br />
An&#8217; justifies that ill opinion<br />
Which makes thee startle<br />
At me, thy poor, earth born companion<br />
An&#8217; fellow mortal!</p>
<p>I doubt na, whyles, but thou may thieve;<br />
What then? poor beastie, thou maun live!<br />
A daimen icker in a thrave<br />
&#8216;S a sma&#8217; request;<br />
I&#8217;ll get a blessin wi&#8217; the lave,<br />
An&#8217; never miss&#8217;t.</p>
<p>Thy wee-bit housie, too, in ruin!<br />
It&#8217;s silly wa&#8217;s the win&#8217;s are strewin!<br />
An&#8217; naething, now, to big a new ane,<br />
O&#8217; foggage green!<br />
An&#8217; bleak December&#8217;s win&#8217;s ensuin,<br />
Baith snell an&#8217; keen!</p>
<p>Thou saw the fields laid bare an&#8217; waste,<br />
An&#8217; weary winter comin fast,<br />
An&#8217; cozie here, beneath the blast,<br />
Thou thought to dwell,<br />
Till crash! the cruel coulter past<br />
Out thro&#8217; thy cell.</p>
<p>That wee bit heap o&#8217; leaves an&#8217; stibble,<br />
Has cost thee monie a weary nibble!<br />
Now thou&#8217;s turned out, for a&#8217; thy trouble,<br />
But house or hald,<br />
To thole the winter&#8217;s sleety dribble,<br />
An&#8217; cranreuch cauld.</p>
<p>But Mousie, thou art no thy lane,<br />
In proving foresight may be vain:<br />
The best laid schemes o&#8217; mice an&#8217; men<br />
Gang aft agley,<br />
An&#8217; lea&#8217;e us nought but grief an&#8217; pain,<br />
For promis&#8217;d joy!</p>
<p>Still thou are blest, compared wi&#8217; me!<br />
The present only toucheth thee:<br />
But och! I backward cast my e&#8217;e,<br />
On prospects drear!<br />
An&#8217; forward, tho&#8217; I canna see,<br />
I guess an&#8217; fear!</p>
]]></content:encoded>
			<wfw:commentRss>http://parizek.com/2012/04/to-a-mouse-by-burns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Export a mysql database on the command line</title>
		<link>http://parizek.com/2011/11/export-a-mysql-database-on-the-command-line/</link>
		<comments>http://parizek.com/2011/11/export-a-mysql-database-on-the-command-line/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 22:53:26 +0000</pubDate>
		<dc:creator>dave</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[Website Development]]></category>

		<guid isPermaLink="false">http://parizek.com/?p=300</guid>
		<description><![CDATA[$ mysqldump -u DBUSER -p DBNAME > DBNAME.sql]]></description>
			<content:encoded><![CDATA[<p>$ mysqldump -u DBUSER -p DBNAME > DBNAME.sql</p>
]]></content:encoded>
			<wfw:commentRss>http://parizek.com/2011/11/export-a-mysql-database-on-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding your python site-packages directory</title>
		<link>http://parizek.com/2011/11/finding-your-python-site-packages-directory/</link>
		<comments>http://parizek.com/2011/11/finding-your-python-site-packages-directory/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 03:06:01 +0000</pubDate>
		<dc:creator>dave</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://parizek.com/?p=298</guid>
		<description><![CDATA[python -c &#8220;from distutils.sysconfig import get_python_lib; print get_python_lib()&#8221;]]></description>
			<content:encoded><![CDATA[<p>python -c &#8220;from distutils.sysconfig import get_python_lib; print get_python_lib()&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://parizek.com/2011/11/finding-your-python-site-packages-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Django on Ubuntu 10.04 LTS</title>
		<link>http://parizek.com/2011/11/installing-django-on-ubuntu-10-04-lts/</link>
		<comments>http://parizek.com/2011/11/installing-django-on-ubuntu-10-04-lts/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 23:33:10 +0000</pubDate>
		<dc:creator>dave</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://parizek.com/?p=278</guid>
		<description><![CDATA[check your hostname is set properly: >hostname >hostname -f update the server: apt-get update >apt-get upgrade install apache and mod_wsgi: >sudo apt-get install apache2 libapache2-mod-wsgi and install setup tools for python, and pip: > sudo apt-get install python-setuptools > sudo apt-get install python-pip Pick a database: >apt-get install mysql-server python-mysqldb >apt-get install postgresql python-psycopg2 >apt-get [...]]]></description>
			<content:encoded><![CDATA[<p>check your hostname is set properly:<br />
<code><br />
>hostname<br />
>hostname -f<br />
</code></p>
<p>update the server:<br />
<code><br />
apt-get update<br />
>apt-get upgrade<br />
</code></p>
<p>install apache and mod_wsgi:<br />
<code><br />
>sudo apt-get install apache2 libapache2-mod-wsgi<br />
</code></p>
<p>and install setup tools for python, and pip:<br />
<code><br />
> sudo apt-get install python-setuptools<br />
> sudo apt-get install python-pip<br />
</code></p>
<p>Pick a database:<br />
<code><br />
>apt-get install mysql-server python-mysqldb<br />
>apt-get install postgresql python-psycopg2<br />
>apt-get install sqlite3 python-sqlite<br />
</code></p>
<p>Now install Django:<br />
<code><br />
> sudo pip install django<br />
</code></p>
<p>and prepare the folders you will need :<br />
<code><br />
> sudo mkdir /srv/www<br />
> sudo mkdir /srv/www/wsgi<br />
> sudo mkdir /srv/www/public_html</code></p>
<p>create a file to test if wsgi working:<br />
<code>sudo vim /srv/www/wsgi/app.wsgi</code></p>
<p>putting this content into the app.wsgi file:<br />
<code>def application(environ, start_response):<br />
    status = '200 OK'<br />
    output = 'Hello World!'</p>
<p>    response_headers = [('Content-type', 'text/plain'),<br />
                        ('Content-Length', str(len(output)))]<br />
    start_response(status, response_headers)</p>
<p>    return [output]</code></p>
<p>create a new apache site to test wsgi:<br />
<code>sudo vim /etc/apache2/sites-available/wsgi</code></p>
<p>and add this content to the site, replacing &#8220;myDocRootUrl&#8221; as appropriate  &#8212; NOTE: bug in my blog software, so left out the opening less than sign on the virtual host tags:<br />
<code>VirtualHost *:80></p>
<p>    ServerName myDocRootUrl.wsgi<br />
    DocumentRoot /srv/www/wsgi</p>
<p>    <Directory /srv/www/wsgi><br />
        Order allow,deny<br />
        Allow from all<br />
    </Directory></p>
<p>    WSGIScriptAlias / /srv/www/wsgi/app.wsgi</p>
<p>/VirtualHost></code></p>
<p>Next, check for and remove any default sites in sites-enabled folder:<br />
<code><br />
>ls /etc/apache2/sites-available<br />
>rm whatever defaults in there...</code></p>
<p>Now activate the test of wsgi site:<br />
<code>> sudo a2ensite wsgi<br />
> sudo /etc/init.d/apache2 reload</code></p>
<p>Now visit the url you specified as myDocRootUrl.wsgi and you should see &#8220;Hello World!&#8221;</p>
<p>If not, first thing, check your apache error log (you likely need to change to root user here, not just sudo):<br />
<code><br />
>sudo su -<br />
>cat /var/log/apache2/error.log<br />
</code></p>
<p>Create django project:<br />
<code><br />
> cd /srv/www<br />
> sudo django-admin.py startproject myProject</code></p>
<p>Your project folder should now contain these files:<br />
__init__.py  manage.py	settings.py  urls.py</p>
<p>Create a wsgi file for the project (rename myProject as appropriate):<br />
<code><br />
> sudo mkdir /srv/www/myProject/apache<br />
> sudo vim /srv/www/myProject/apache/django.wsgi</code></p>
<p>and put this text in that django.wsgi file (rename myProject as appropriate):<br />
<code>import os<br />
import sys</p>
<p>path = '/srv/www'<br />
if path not in sys.path:<br />
    sys.path.insert(0, '/srv/www')</p>
<p>os.environ['DJANGO_SETTINGS_MODULE'] = 'myProject.settings'</p>
<p>import django.core.handlers.wsgi<br />
application = django.core.handlers.wsgi.WSGIHandler()</code></p>
<p>Create a new apache sites-available for your django project:<br />
<code><br />
>sudo vim /etc/apache2/sites-available/myProject</code></p>
<p>and add starter virtual host content to it (rename myProject as appropriate)(virtual hosts tags missing leading <):<br />
<code><br />
VirtualHost *:80></p>
<p>   ServerName myDocRootUrl.myProject<br />
    DocumentRoot /srv/www/myProject</p>
<p>    <Directory /srv/www/myProject><br />
        Order allow,deny<br />
        Allow from all<br />
    </Directory></p>
<p>    WSGIDaemonProcess myDocRootUrl.myProject processes=2 threads=15 display-name=%{GROUP}<br />
    WSGIProcessGroup myDocRootUrl.myProject</p>
<p>    WSGIScriptAlias / /srv/www/myProject/apache/django.wsgi</p>
<p>/VirtualHost></code></p>
<p>Activate the new project site:<br />
<code>> sudo a2ensite myProject<br />
> sudo /etc/init.d/apache2 reload</code></p>
<p>browse to your project url and hopefully you see the default django welcome message!</p>
<p><strong>Sources:<br />
Mostly this article came from below, but I added to it:<br />
<a href="http://blog.stannard.net.au/2010/12/11/installing-django-with-apache-and-mod_wsgi-on-ubuntu-10-04/">http://blog.stannard.net.au/2010/12/11/installing-django-with-apache-and-mod_wsgi-on-ubuntu-10-04/</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://parizek.com/2011/11/installing-django-on-ubuntu-10-04-lts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Typical github steps moving in a new repository</title>
		<link>http://parizek.com/2011/09/typical-github-steps-moving-in-a-new-repository/</link>
		<comments>http://parizek.com/2011/09/typical-github-steps-moving-in-a-new-repository/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 12:55:57 +0000</pubDate>
		<dc:creator>dave</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Website Development]]></category>

		<guid isPermaLink="false">http://parizek.com/?p=267</guid>
		<description><![CDATA[Global setup: Set up git git config --global user.name "Dave Parizek" git config --global user.email dude@wherever.com Next steps: mkdir UAC cd UAC git init touch README git add README git commit -m 'first commit' git remote add origin git@github.com:BioComputing/UAC.git git push -u origin master Existing Git Repo? cd existing_git_repo git remote add origin git@github.com:BioComputing/UAC.git git [...]]]></description>
			<content:encoded><![CDATA[<p>Global setup:<br />
 Set up git<br />
  <code>git config --global user.name "Dave Parizek"<br />
  git config --global user.email dude@wherever.com</code></p>
<p>Next steps:<br />
  <code>mkdir UAC<br />
  cd UAC<br />
  git init<br />
  touch README<br />
  git add README<br />
  git commit -m 'first commit'<br />
  git remote add origin git@github.com:BioComputing/UAC.git<br />
  git push -u origin master</code></p>
<p>Existing Git Repo?<br />
  <code>cd existing_git_repo<br />
  git remote add origin git@github.com:BioComputing/UAC.git<br />
  git push -u origin master</code></p>
]]></content:encoded>
			<wfw:commentRss>http://parizek.com/2011/09/typical-github-steps-moving-in-a-new-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Import a sql dump into mysql on command line</title>
		<link>http://parizek.com/2011/08/import-a-sql-dump-into-mysql-on-command-line/</link>
		<comments>http://parizek.com/2011/08/import-a-sql-dump-into-mysql-on-command-line/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 17:25:33 +0000</pubDate>
		<dc:creator>dave</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[Website Development]]></category>

		<guid isPermaLink="false">http://parizek.com/?p=236</guid>
		<description><![CDATA[# mysql -u USER -p DBNAME < dump.sql]]></description>
			<content:encoded><![CDATA[<p><code># mysql -u USER -p DBNAME < dump.sql</code></p>
]]></content:encoded>
			<wfw:commentRss>http://parizek.com/2011/08/import-a-sql-dump-into-mysql-on-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restarting Apache, different ways</title>
		<link>http://parizek.com/2011/08/restarting-apache-different-ways/</link>
		<comments>http://parizek.com/2011/08/restarting-apache-different-ways/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 15:58:20 +0000</pubDate>
		<dc:creator>dave</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[Website Development]]></category>

		<guid isPermaLink="false">http://parizek.com/?p=233</guid>
		<description><![CDATA[Just reference for restarting apache, different strokes for different servers: # /etc/init.d/httpd restart # /etc/init.d/httpd start # /etc/init.d/httpd stop # service httpd restart # apachectl -k graceful sometimes you need sudo because it might only see the path from root &#160;]]></description>
			<content:encoded><![CDATA[<p>Just reference for restarting apache, different strokes for different servers:</p>
<p><code># /etc/init.d/httpd restart<br />
# /etc/init.d/httpd start<br />
# /etc/init.d/httpd stop</p>
<p><code># service httpd restart</code></p>
<p><code># apachectl -k graceful</code></p>
<p>sometimes you need sudo because it might only see the path from root</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://parizek.com/2011/08/restarting-apache-different-ways/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

