<?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>goshawk&#039;s digital nest</title>
	<atom:link href="http://goshawknest.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://goshawknest.wordpress.com</link>
	<description>researches, hacks, thoughts</description>
	<lastBuildDate>Sat, 28 Jan 2012 09:09:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='goshawknest.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>goshawk&#039;s digital nest</title>
		<link>http://goshawknest.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://goshawknest.wordpress.com/osd.xml" title="goshawk&#039;s digital nest" />
	<atom:link rel='hub' href='http://goshawknest.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Play youtube videos without using browser directly from Unity on ubuntu 11.10</title>
		<link>http://goshawknest.wordpress.com/2012/01/02/play-youtube-videos-without-using-browser-directly-from-unity-on-ubuntu-11-10/</link>
		<comments>http://goshawknest.wordpress.com/2012/01/02/play-youtube-videos-without-using-browser-directly-from-unity-on-ubuntu-11-10/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 14:19:04 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unity]]></category>
		<category><![CDATA[video playback]]></category>
		<category><![CDATA[vlc]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=222</guid>
		<description><![CDATA[I just read on omgubuntu that is now possible to install an Unity Lens that makes you able to search in the youtube directory and play videos direcly using VLC if installed. This is the original article: http://www.omgubuntu.co.uk/2012/01/unity-youtube-lens-updates-with-browser-free-video-playback/ Setting it up is very easy, just run the following commands: Happy watching!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=222&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just read on <a href="http://www.omgubuntu.co.uk/">omgubuntu</a> that is now possible to install an Unity Lens that makes you able to search in the youtube directory and play videos direcly using VLC if installed.</p>
<p>This is the original article: <a href="http://www.omgubuntu.co.uk/2012/01/unity-youtube-lens-updates-with-browser-free-video-playback/">http://www.omgubuntu.co.uk/2012/01/unity-youtube-lens-updates-with-browser-free-video-playback/</a></p>
<p>Setting it up is very easy, just run the following commands:</p>
<p><pre class="brush: bash;">

sudo add-apt-repository ppa:atareao/lenses

sudo apt-get update &amp;&amp; sudo apt-get install lens-video scope-youtube

</pre></p>
<p>Happy watching!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goshawknest.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goshawknest.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goshawknest.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goshawknest.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goshawknest.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goshawknest.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goshawknest.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goshawknest.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goshawknest.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goshawknest.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goshawknest.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goshawknest.wordpress.com/222/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=222&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2012/01/02/play-youtube-videos-without-using-browser-directly-from-unity-on-ubuntu-11-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd1e603035457abc2f10d752897c8428?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vincenzoampolo7</media:title>
		</media:content>
	</item>
		<item>
		<title>How to disable login sound on Ubuntu 11.10 Oneiric</title>
		<link>http://goshawknest.wordpress.com/2011/10/19/how-to-disable-login-sound-on-ubuntu-11-10-oneiric/</link>
		<comments>http://goshawknest.wordpress.com/2011/10/19/how-to-disable-login-sound-on-ubuntu-11-10-oneiric/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 01:54:51 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[11.10]]></category>
		<category><![CDATA[login sound]]></category>
		<category><![CDATA[oneiric]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=215</guid>
		<description><![CDATA[Often i turn on my pc during lessons or talks and the ubuntu login sound makes the whole process not discrete and make people notice i&#8217;m in that room. This is likely a side effect you wouldn&#8217;t like to happen, like me. So here is how i removed the ubuntu login sound on my ubuntu [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=215&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Often i turn on my pc during lessons or talks and the ubuntu login sound makes the whole process not discrete and make people notice i&#8217;m in that room. This is likely a side effect you wouldn&#8217;t like to happen, like me. So here is how i removed the ubuntu login sound on my ubuntu 11.10 Oneiric.</p>
<p>Open a terminal (open unity an look for <strong>terminal</strong>) and then paste this command:</p>
<p><pre class="brush: bash;">
gksudo gedit /usr/share/gnome/autostart/libcanberra-login-sound.desktop
</pre></p>
<p>Go at the bottom of the file and set <strong>NoDisplay=false</strong>. Save the file and then go to the power button in the top-right part of the screen, the one closer to your username. Then select <em>Startup Applications&#8230;</em> . You will find the ubuntu login sound in the menu. You can now select or deselect as you wish like in the following figure.</p>
<p><a href="http://goshawknest.files.wordpress.com/2011/10/screenshot-at-2011-10-19-035148.png"><img class="aligncenter size-full wp-image-216" title="Screenshot at 2011-10-19 03:51:48" src="http://goshawknest.files.wordpress.com/2011/10/screenshot-at-2011-10-19-035148.png?w=600&#038;h=337" alt="" width="600" height="337" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goshawknest.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goshawknest.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goshawknest.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goshawknest.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goshawknest.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goshawknest.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goshawknest.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goshawknest.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goshawknest.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goshawknest.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goshawknest.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goshawknest.wordpress.com/215/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=215&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2011/10/19/how-to-disable-login-sound-on-ubuntu-11-10-oneiric/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd1e603035457abc2f10d752897c8428?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vincenzoampolo7</media:title>
		</media:content>

		<media:content url="http://goshawknest.files.wordpress.com/2011/10/screenshot-at-2011-10-19-035148.png" medium="image">
			<media:title type="html">Screenshot at 2011-10-19 03:51:48</media:title>
		</media:content>
	</item>
		<item>
		<title>How to set black background on geany and remove the green / white line</title>
		<link>http://goshawknest.wordpress.com/2011/09/16/how-to-set-black-background-on-geany-and-remove-the-green-white-line/</link>
		<comments>http://goshawknest.wordpress.com/2011/09/16/how-to-set-black-background-on-geany-and-remove-the-green-white-line/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 14:32:09 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[background color]]></category>
		<category><![CDATA[geany]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=210</guid>
		<description><![CDATA[Geany is a very good editor to edit a big variety of source codes. Unfortunately it has a white background by default. I dunno if you have ever used a black background based editor such as vim but it makes your eyes less stressed when u are coding, and this thing is something that will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=210&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter" title="Geany logo" src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Geany_logo.svg/256px-Geany_logo.svg.png" alt="" width="256" height="256" /></p>
<p><a href="http://www.geany.org/">Geany</a> is a very good editor to edit a big variety of source codes. Unfortunately it has a white background by default. I dunno if you have ever used a black background based editor such as vim but it makes your eyes less stressed when u are coding, and this thing is something that will increase your productivity. I tried to switch geany to use a black brackground and i found many extensions to do that&#8230; but i always have thought that it was impossible that geany codes didn&#8217;t think about this. After playing a bit with the settings i found a way.</p>
<p>Just go to <em>Edit-&gt;Prerefencies</em> then go to <em>Editor</em> and select the <em>Display</em> tab. U will see something like this:</p>
<p>&nbsp;</p>
<p><a href="http://goshawknest.files.wordpress.com/2011/09/geany-background.png"><img class="aligncenter size-full wp-image-211" title="geany-background" src="http://goshawknest.files.wordpress.com/2011/09/geany-background.png?w=600&#038;h=337" alt="" width="600" height="337" /></a>Just select <em>invert syntax highlight colors</em> and you did it. If you want also to remove the odd green or white lines that appears after 72 characters you can just disable the <em>long line marker</em> and it will go <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Hope this helps</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goshawknest.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goshawknest.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goshawknest.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goshawknest.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goshawknest.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goshawknest.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goshawknest.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goshawknest.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goshawknest.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goshawknest.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goshawknest.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goshawknest.wordpress.com/210/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=210&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2011/09/16/how-to-set-black-background-on-geany-and-remove-the-green-white-line/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd1e603035457abc2f10d752897c8428?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vincenzoampolo7</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Geany_logo.svg/256px-Geany_logo.svg.png" medium="image">
			<media:title type="html">Geany logo</media:title>
		</media:content>

		<media:content url="http://goshawknest.files.wordpress.com/2011/09/geany-background.png" medium="image">
			<media:title type="html">geany-background</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu 11.04 clipboard with unity support</title>
		<link>http://goshawknest.wordpress.com/2011/09/12/ubuntu-11-04-clipboard-with-unity-support/</link>
		<comments>http://goshawknest.wordpress.com/2011/09/12/ubuntu-11-04-clipboard-with-unity-support/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 21:59:22 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[clipboard]]></category>
		<category><![CDATA[diodon]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=172</guid>
		<description><![CDATA[One thing I use frequently on my computer is a clipboard. With ubuntu 11.04 and Unity, the clipboard manager i used was not able to work like i want on Unity. So i browsed the net for a good clipboard replacement, and i found one. It&#8217;s called Diodon and it&#8217;s an easy and effective clipboard [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=172&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One thing I use frequently on my computer is a clipboard. With ubuntu 11.04 and Unity, the clipboard manager i used was not able to work like i want on Unity. So i browsed the net for a good clipboard replacement, and i found one.</p>
<p>It&#8217;s called Diodon and it&#8217;s an easy and effective clipboard with unity compatibility. Unfortunately it&#8217;s not in the ubuntu 11.04 default repo. To install it you have to add the diodon repository. You can do it just typing in a shell:</p>
<p><pre class="brush: bash;">

sudo add-apt-repository ppa:diodon-team/daily

</pre></p>
<p>Then install the <strong>diodon</strong> package. After reboot you will see a clipboard icon close to the clock.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goshawknest.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goshawknest.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goshawknest.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goshawknest.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goshawknest.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goshawknest.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goshawknest.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goshawknest.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goshawknest.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goshawknest.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goshawknest.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goshawknest.wordpress.com/172/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=172&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2011/09/12/ubuntu-11-04-clipboard-with-unity-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd1e603035457abc2f10d752897c8428?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vincenzoampolo7</media:title>
		</media:content>
	</item>
		<item>
		<title>How to switch to different python version on apache mod_wsgi</title>
		<link>http://goshawknest.wordpress.com/2011/09/10/how-to-switch-to-different-python-version-on-apache-mod_wsgi/</link>
		<comments>http://goshawknest.wordpress.com/2011/09/10/how-to-switch-to-different-python-version-on-apache-mod_wsgi/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 11:48:42 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[wsgi debian ubuntu python]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=203</guid>
		<description><![CDATA[By default the ubuntu-debian package of libapache-mod-wsgi contains the wsgi apache module compiled for either python 2.6 and python 2.7. This makes really easy to switch between python 2.6 or python 2.7 support in webapps. Indeed you have just to change a symbolic link to make your application working with python 2.7 interpreter if python [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=203&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>By default the ubuntu-debian package of libapache-mod-wsgi contains the wsgi apache module compiled for either python 2.6 and python 2.7. This makes really easy to switch between python 2.6 or python 2.7 support in webapps. Indeed you have just to change a symbolic link to make your application working with python 2.7 interpreter if python 2.6 is enabled by default.
As you can see the <a href="http://packages.debian.org/sid/amd64/libapache2-mod-wsgi/filelist">libapacke2-mod-wsgi</a> package countains both the 2.6 and 2.7 version of the the modules.
Se let's see how to accomplish this:
vincenzo@mba:/usr/lib/apache2/modules$ ls
httpd.exp             mod_authz_groupfile.so  mod_dir.so           mod_mem_cache.so       mod_ssl.so
mod_actions.so        mod_authz_host.so       mod_disk_cache.so    mod_mime_magic.so      mod_status.so
mod_alias.so          mod_authz_owner.so      mod_dumpio.so        mod_mime.so            mod_substitute.so
mod_asis.so           mod_authz_user.so       mod_env.so           mod_negotiation.so     mod_suexec.so
mod_auth_basic.so     mod_autoindex.so        mod_expires.so       mod_proxy_ajp.so       mod_unique_id.so
mod_auth_digest.so    mod_cache.so            mod_ext_filter.so    mod_proxy_balancer.so  mod_userdir.so
mod_authn_alias.so    mod_cern_meta.so        mod_file_cache.so    mod_proxy_connect.so   mod_usertrack.so
mod_authn_anon.so     mod_cgid.so             mod_filter.so        mod_proxy_ftp.so       mod_version.so
mod_authn_dbd.so      mod_cgi.so              mod_headers.so       mod_proxy_http.so      mod_vhost_alias.so
mod_authn_dbm.so      mod_charset_lite.so     mod_ident.so         mod_proxy_scgi.so      mod_wsgi.so
mod_authn_default.so  mod_dav_fs.so           mod_imagemap.so      mod_proxy.so           mod_wsgi.so-2.6
mod_authn_file.so     mod_dav_lock.so         mod_include.so       mod_reqtimeout.so      mod_wsgi.so-2.7
mod_authnz_ldap.so    mod_dav.so              mod_info.so          mod_rewrite.so
mod_authz_dbm.so      mod_dbd.so              mod_ldap.so          mod_setenvif.so
mod_authz_default.so  mod_deflate.so          mod_log_forensic.so  mod_speling.so
vincenzo@mba:/usr/lib/apache2/modules$ file mod_wsgi.so
mod_wsgi.so: symbolic link to `mod_wsgi.so-2.6'
vincenzo@mba:/usr/lib/apache2/modules$ sudo ln -fs mod_wsgi.so-2.7 mod_wsgi.so
Finished: we created <strong>mod_wsgi.so</strong> file which is a symbolic link to <strong>mod_wsgi.so-2.7. </strong>Now your reboot apache with <strong>sudo apache2ctl restart</strong> and you are using python 2.7 <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goshawknest.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goshawknest.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goshawknest.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goshawknest.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goshawknest.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goshawknest.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goshawknest.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goshawknest.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goshawknest.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goshawknest.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goshawknest.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goshawknest.wordpress.com/203/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=203&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2011/09/10/how-to-switch-to-different-python-version-on-apache-mod_wsgi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd1e603035457abc2f10d752897c8428?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vincenzoampolo7</media:title>
		</media:content>
	</item>
		<item>
		<title>how to solve pymongo.errors.AutoReconnect: could not find master/primary</title>
		<link>http://goshawknest.wordpress.com/2011/08/24/how-to-solve-pymongo-errors-autoreconnect-could-not-find-masterprimary/</link>
		<comments>http://goshawknest.wordpress.com/2011/08/24/how-to-solve-pymongo-errors-autoreconnect-could-not-find-masterprimary/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 13:24:05 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=198</guid>
		<description><![CDATA[If you are coding and you have experienced an error like: The problem is that your mongodb instance has not been shutdown correctly last time. To solve this just run the following command (it has been tested on a Ubuntu server): Hope this helps. I had to type that a lot of time during my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=198&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are coding and you have experienced an error like:<br />
<pre class="brush: plain;">
pymongo.errors.AutoReconnect: could not find master/primary
</pre><br />
The problem is that your mongodb instance has not been shutdown correctly last time. To solve this just run the following command (it has been tested on a Ubuntu server):<br />
<pre class="brush: bash;">
sudo rm /var/lib/mongodb/mongod.lock &amp;&amp; sudo /etc/init.d/mongodb restart
</pre><br />
Hope this helps. I had to type that a lot of time during my coding time indeed.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goshawknest.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goshawknest.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goshawknest.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goshawknest.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goshawknest.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goshawknest.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goshawknest.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goshawknest.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goshawknest.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goshawknest.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goshawknest.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goshawknest.wordpress.com/198/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=198&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2011/08/24/how-to-solve-pymongo-errors-autoreconnect-could-not-find-masterprimary/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd1e603035457abc2f10d752897c8428?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vincenzoampolo7</media:title>
		</media:content>
	</item>
		<item>
		<title>Error installing mysql-python package</title>
		<link>http://goshawknest.wordpress.com/2011/07/27/error-installing-mysql-python-package/</link>
		<comments>http://goshawknest.wordpress.com/2011/07/27/error-installing-mysql-python-package/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 11:16:20 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=194</guid>
		<description><![CDATA[If you are trying to do and you end up with an error which is the following (or similar): The solution to the problem is to install the libmysqlclient-dev package in this way: You can now run pip install mysql-python without any further problem.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=194&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are trying to do</p>
<p><pre class="brush: bash;">

pip install mysql-python

</pre></p>
<p>and you end up with an error which is the following (or similar):</p>
<p><pre class="brush: plain;">
(env)goshawk@earth:~/Projects/bvisible$ pip install mysql-python
Downloading/unpacking mysql-python
  Running setup.py egg_info for package mysql-python
    sh: mysql_config: not found
    Traceback (most recent call last):
      File &quot;&lt;string&gt;&quot;, line 14, in &lt;module&gt;
      File &quot;/home/goshawk/Projects/bvisible/env/build/mysql-python/setup.py&quot;, line 15, in &lt;module&gt;
        metadata, options = get_config()
      File &quot;setup_posix.py&quot;, line 43, in get_config
        libs = mysql_config(&quot;libs_r&quot;)
      File &quot;setup_posix.py&quot;, line 24, in mysql_config
        raise EnvironmentError(&quot;%s not found&quot; % (mysql_config.path,))
    EnvironmentError: mysql_config not found
    Complete output from command python setup.py egg_info:
    sh: mysql_config: not found

Traceback (most recent call last):

  File &quot;&lt;string&gt;&quot;, line 14, in &lt;module&gt;

  File &quot;/home/goshawk/Projects/bvisible/env/build/mysql-python/setup.py&quot;, line 15, in &lt;module&gt;

    metadata, options = get_config()

  File &quot;setup_posix.py&quot;, line 43, in get_config

    libs = mysql_config(&quot;libs_r&quot;)

  File &quot;setup_posix.py&quot;, line 24, in mysql_config

    raise EnvironmentError(&quot;%s not found&quot; % (mysql_config.path,))

EnvironmentError: mysql_config not found

----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in /home/goshawk/.pip/pip.log
</pre></p>
<p>The solution to the problem is to install the <strong>libmysqlclient-dev </strong>package in this way:</p>
<p><pre class="brush: plain;">
sudo apt-get install libmysqlclient-dev
</pre></p>
<p>You can now run <strong>pip install mysql-python</strong> without any further problem.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goshawknest.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goshawknest.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goshawknest.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goshawknest.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goshawknest.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goshawknest.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goshawknest.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goshawknest.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goshawknest.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goshawknest.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goshawknest.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goshawknest.wordpress.com/194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=194&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2011/07/27/error-installing-mysql-python-package/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd1e603035457abc2f10d752897c8428?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vincenzoampolo7</media:title>
		</media:content>
	</item>
		<item>
		<title>How to pass environment variables to uwsgi from cherokee</title>
		<link>http://goshawknest.wordpress.com/2011/06/11/how-to-pass-environment-variables-to-uwsgi-from-cherokee/</link>
		<comments>http://goshawknest.wordpress.com/2011/06/11/how-to-pass-environment-variables-to-uwsgi-from-cherokee/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 14:12:44 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[cherokee]]></category>
		<category><![CDATA[uwsgi]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=182</guid>
		<description><![CDATA[Today i&#8217;ve faced an issue with cherokee + uwsgi. I had to deploy a webapp which needed the LD_LIBRARY_PATH set. After fighting a while with cherokee i found a way to accomplish it. From cherokee just invoke uwsgi interpreter as follow: The trick is to start a bash, set the variable(s) u want in your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=182&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter" title="uwsgi logo" src="http://inliner.cluster02.s.memonic.ch/f1/f17f93e4-a658-4ea2-99af-85c1a1b7fb95/uwsgi.png" alt="" width="248" height="82" /></p>
<p>Today i&#8217;ve faced an issue with cherokee + uwsgi. I had to deploy a webapp which needed the LD_LIBRARY_PATH set. After fighting a while with cherokee i found a way to accomplish it.<br />
From cherokee just invoke uwsgi interpreter as follow:</p>
<p><pre class="brush: bash;">
/bin/bash -c &quot;LD_LIBRARY_PATH=/usr/local/MATLAB/R2011a/bin/glnxa64 /usr/local/bin/uwsgi --ini-paste /var/www/whisperer/development.ini&quot;
</pre></p>
<p>The trick is to start a bash, set the variable(s) u want in your webapp and then start uwsgi. handy, isn&#8217;t it ?</p>
<p>Hope this helps somehow&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goshawknest.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goshawknest.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goshawknest.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goshawknest.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goshawknest.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goshawknest.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goshawknest.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goshawknest.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goshawknest.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goshawknest.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goshawknest.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goshawknest.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=182&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2011/06/11/how-to-pass-environment-variables-to-uwsgi-from-cherokee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd1e603035457abc2f10d752897c8428?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vincenzoampolo7</media:title>
		</media:content>

		<media:content url="http://inliner.cluster02.s.memonic.ch/f1/f17f93e4-a658-4ea2-99af-85c1a1b7fb95/uwsgi.png" medium="image">
			<media:title type="html">uwsgi logo</media:title>
		</media:content>
	</item>
		<item>
		<title>How to install tor on ubuntu natty 11.04</title>
		<link>http://goshawknest.wordpress.com/2011/05/08/how-to-install-tor-on-ubuntu-natty-11-04/</link>
		<comments>http://goshawknest.wordpress.com/2011/05/08/how-to-install-tor-on-ubuntu-natty-11-04/#comments</comments>
		<pubDate>Sun, 08 May 2011 15:34:33 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[anonymous]]></category>
		<category><![CDATA[polipo]]></category>
		<category><![CDATA[tor]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=161</guid>
		<description><![CDATA[Installing tor, as any other service, on ubuntu is a matter of apt-get. Just type in a terminal: It will install tor and polipo so u are ready to go with tor. But to make everything work u still need to modify the configurations files a bit. For polipo just edit /etc/polipo/config and modify these two lines: #socksParentProxy [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=161&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter" title="Tor_logo" src="http://www.v3-labs.info/wp-content/uploads/2010/09/tor_sticker.png" alt="" width="400" height="314" /></p>
<p>Installing tor, as any other service, on ubuntu is a matter of <strong>apt-get</strong>. Just type in a terminal:</p>
<p><pre class="brush: plain;">

sudo apt-get install tor

</pre></p>
<p>It will install <strong>tor</strong> and <strong>polipo</strong> so u are ready to go with tor. But to make everything work u still need to modify the configurations files a bit. For <strong>polipo</strong> just edit <em>/etc/polipo/config </em>and modify these two lines:</p>
<blockquote><p>
#socksParentProxy = &#8220;localhost:9050&#8243;<br />
#socksProxyType = socks5
</p></blockquote>
<p>into</p>
<blockquote><p>
socksParentProxy = &#8220;localhost:9050&#8243;<br />
socksProxyType = socks5
</p></blockquote>
<p>So it&#8217;s just uncommenting the two lines. <strong>Tor</strong> should be already working without any trouble, but it may be slow and u are not contributing to the <strong>Tor</strong> network. I highly suggest u to configure tor such that u can share your bandwidth with the network.<br />
For changing this u have to modify <em>/etc/tor/torrc </em>and change these two lines:</p>
<blockquote><p>
#ORPort 9001<br />
#DirPort 9030
</p></blockquote>
<p>into</p>
<blockquote><p>
ORPort 9001<br />
DirPort 9030
</p></blockquote>
<p>It&#8217;s like in <strong>polipo</strong> u have to just uncomment them. That&#8217;s it! just configure your browser to use <strong>localhost:8123</strong> as a proxy and visit <a href="https://check.torproject.org/">torcheck</a>. Congratz! u are using Tor now <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goshawknest.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goshawknest.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goshawknest.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goshawknest.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goshawknest.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goshawknest.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goshawknest.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goshawknest.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goshawknest.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goshawknest.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goshawknest.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goshawknest.wordpress.com/161/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=161&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2011/05/08/how-to-install-tor-on-ubuntu-natty-11-04/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd1e603035457abc2f10d752897c8428?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vincenzoampolo7</media:title>
		</media:content>

		<media:content url="http://www.v3-labs.info/wp-content/uploads/2010/09/tor_sticker.png" medium="image">
			<media:title type="html">Tor_logo</media:title>
		</media:content>
	</item>
		<item>
		<title>How to integrate mongoengine in pyramid</title>
		<link>http://goshawknest.wordpress.com/2011/05/03/how-to-integrate-mongoengine-in-pyramid/</link>
		<comments>http://goshawknest.wordpress.com/2011/05/03/how-to-integrate-mongoengine-in-pyramid/#comments</comments>
		<pubDate>Tue, 03 May 2011 14:42:55 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[mongoengine]]></category>
		<category><![CDATA[pyramid]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=154</guid>
		<description><![CDATA[For a project in the university i had to build a webapp, since it was a edu-based project and i wanted to try something which diverges from the classic Apache+django+mysql approach and i built a Cherokee+pyramid+mongodb applciation. In this article ill explain how to use mongoengine, a state-of-the-art django like ORM for mongodb in your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=154&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For a project in the university i had to build a webapp, since it was a edu-based project and i wanted to try something which diverges from the classic Apache+django+mysql approach and i built a Cherokee+pyramid+mongodb applciation. In this article ill explain how to use mongoengine, a state-of-the-art django like ORM for mongodb in your pyramid application.</p>
<p>First of all i think that pyramid has the best and liter interface i&#8217;ve ever seen. This will let u integrate mongodb with very small work. If u ever used mongoengine, u just need to call:</p>
<p><pre class="brush: python;">

from mongoengine import connect

connect('database')

</pre></p>
<p>So we need to call it in our application. In pyramid all the application is initialized in the <strong>__init__.py</strong> file which has this content:</p>
<p><pre class="brush: python;">
from pyramid.config import Configurator
from myproject.resources import Root

def main(global_config, **settings):
    &quot;&quot;&quot; This function returns a Pyramid WSGI application.
    &quot;&quot;&quot;
    config = Configurator(root_factory=Root, settings=settings)
    config.add_view('myproject.views.my_view',
                    context='myproject.resources.Root',
                    renderer='myproject:templates/mytemplate.pt')
    config.add_static_view('static', 'myproject:static')
    return config.make_wsgi_app()
</pre></p>
<p>You have to change it to be like:<br />
<pre class="brush: python;">
from pyramid.config import Configurator
from myproject.resources import Root

def main(global_config, **settings):
    &quot;&quot;&quot; This function returns a Pyramid WSGI application.
    &quot;&quot;&quot;
    config = Configurator(root_factory=Root, settings=settings)
    config.add_view('myproject.views.my_view',
                    context='myproject.resources.Root',
                    renderer='myproject:templates/mytemplate.pt')
    config.add_static_view('static', 'myproject:static')
    #this will make mongoengine working
    connect(settings['db_name'])
    #this will make all the @view_config in the view working
    config.scan()
    return config.make_wsgi_app()
</pre></p>
<p>Of course u have to define your <em>db_name</em> in <strong>production.ini</strong> or <strong>development.ini </strong>or both in a way which looks like this:<br />
<pre class="brush: plain;">
[app:milo_app]
use = egg:milo_app
reload_templates = true
debug_authorization = false
debug_notfound = false
debug_routematch = false
debug_templates = true
default_locale_name = en
db_name = milo
</pre></p>
<p>That&#8217;s it, u can now use mongoengine in the <strong>resources.py</strong> and in any other file u want to create like this:<br />
<pre class="brush: python;">
from mongoengine import *
class User(Document):
	email = StringField(required=True)
	first_name = StringField()
	last_name = StringField()
	password = StringField()
	cwid = IntField()

class Comment(EmbeddedDocument):
	autor = ReferenceField(User)
	content = StringField()

class Genre(EmbeddedDocument):
	name = StringField()

class Movie(Document):
	__name__ = 'Movie'
	__parent__ = Root

	#movie is identified by title and year
	title = StringField(required=True)
	date = DateTimeField()
	description = StringField()
	trailer = URLField()
	poster = StringField()
	image = StringField()
	genre = ListField(StringField())
	comments = ListField(EmbeddedDocumentField(Comment))

	def __str__(self):
		return 'Movie(%s, %s, %s, %s, %s)' % (self.title, self.date, self.poster, self.image, self.trailer)
</pre></p>
<p>then in any view u can do:<br />
<pre class="brush: python;">
Movie.objects()
User.objects()
</pre><br />
To retrieve all the movies and all the users (in my case)<br />
I hope this helps!</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/goshawknest.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/goshawknest.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/goshawknest.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/goshawknest.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/goshawknest.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/goshawknest.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/goshawknest.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/goshawknest.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/goshawknest.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/goshawknest.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/goshawknest.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/goshawknest.wordpress.com/154/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&amp;blog=6236053&amp;post=154&amp;subd=goshawknest&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2011/05/03/how-to-integrate-mongoengine-in-pyramid/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd1e603035457abc2f10d752897c8428?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vincenzoampolo7</media:title>
		</media:content>
	</item>
	</channel>
</rss>
