<?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>Thu, 23 May 2013 20:33:14 +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>How to make usb disks readable by all users on Raspbmc</title>
		<link>http://goshawknest.wordpress.com/2013/02/21/how-to-make-usb-disks-readable-by-all-users-on-raspbmc/</link>
		<comments>http://goshawknest.wordpress.com/2013/02/21/how-to-make-usb-disks-readable-by-all-users-on-raspbmc/#comments</comments>
		<pubDate>Fri, 22 Feb 2013 05:28:44 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[disks]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[raspberry pi]]></category>
		<category><![CDATA[raspbmc]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=360</guid>
		<description><![CDATA[In a past article I wrote about a comparison of Openelec, Raspbmc and Xbian. That article hit a record in terms of number of readings and comments on this blog. I spoke about some modification I had to do to Raspbmc to make it usable for my needs but I din&#8217;t show them. In this article [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=360&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In a <a href="http://goshawknest.wordpress.com/2013/02/19/openelec-vs-raspbmc-vs-xbian/">past article</a> I wrote about a comparison of Openelec, Raspbmc and Xbian. That article hit a record in terms of number of readings and comments on this blog. I spoke about some modification I had to do to Raspbmc to make it usable for my needs but I din&#8217;t show them. In this article I&#8217;m going to fill this gap.</p>
<p>In order to make the usb drives be mounted with writing permissions to all the user of the system I&#8217;ve modified the <strong>/etc/udisk-glue.conf</strong> as following (in bold are the part that I&#8217;ve added:</p>
<pre class="brush: plain; title: ; notranslate">
filter disks {
 optical = false
 partition_table = false
 usage = filesystem
}

match disks {
 automount = true
 automount_options = { sync, noatime, &lt;strong&gt;&quot;dmask=0&quot;, &quot;fmask=0&quot;&lt;/strong&gt;}
 post_insertion_command = &quot;udisks --set-spindown %device_file --spindown-timeout 1800 --mount %device_file --mount-options sync,noatime,&lt;strong&gt;dmask=0,fmask=0&lt;/strong&gt;&quot;
}
</pre>
<p>And I had to let udisk-glue run as root as following:</p>
<pre class="brush: plain; title: ; notranslate">

# udisks-glue
#

description &quot;udisks-glue for udisks&quot;

start on started dbus
stop on (runlevel [06] or stopped dbus)

expect fork
respawn

#exec su - pi -c &quot;udisks-glue&quot;
exec udisks-glue

</pre>
<p>(I&#8217;ve changed udisk-glue such that It&#8217;s run by root)</p>
<p>Since there are a lot of folks out there that are using this distro I think it&#8217;s is worth sharing this knowledge. If some dev is reading this, please consider to propagate this changes (or do equivalent ones) to the distro in order to increase flexibility.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/360/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=360&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2013/02/21/how-to-make-usb-disks-readable-by-all-users-on-raspbmc/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>
	</item>
		<item>
		<title>Openelec vs Raspbmc vs Xbian</title>
		<link>http://goshawknest.wordpress.com/2013/02/19/openelec-vs-raspbmc-vs-xbian/</link>
		<comments>http://goshawknest.wordpress.com/2013/02/19/openelec-vs-raspbmc-vs-xbian/#comments</comments>
		<pubDate>Tue, 19 Feb 2013 08:00:00 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[Recensions]]></category>
		<category><![CDATA[openelec]]></category>
		<category><![CDATA[raspberry pi]]></category>
		<category><![CDATA[raspbmc]]></category>
		<category><![CDATA[xbian]]></category>
		<category><![CDATA[xbmc]]></category>
		<category><![CDATA[xbmc remote]]></category>
		<category><![CDATA[yatse]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=328</guid>
		<description><![CDATA[Update In less than 12 hours after being public this article hit 1500 unique visitors. I received a lot of comments and thus an update is needed. You will find original part that has been corrected under stricke through text. It&#8217;s now been a month that I&#8217;m playing with a borrowed (thanks to my flatmate [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=328&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div class="outline-4" id="outline-container-1">
<h4 id="sec-1">Update</h4>
<div class="outline-text-4" id="text-1">
<p>In less than 12 hours after being public this article hit 1500 unique visitors. I received a lot of comments and thus an update is needed. You will find original part that has been corrected under <b>stricke through text</b>.</p>
<p>It&#8217;s now been a month that I&#8217;m playing with a borrowed (thanks to my flatmate Spencer Matteson) Raspberry Pi. Didn&#8217;t have time at the begininnig but as soon as I started connecting to a tv and sharing with all my flatmates it was fun from the first second.</p>
<p>I&#8217;ve been reached a stable configuration after X ( read as <i>x big</i>) number of researchs, hacks and tries. In this blog post I want to share my impressions and my researches about Raspberry Pi as a mediacenter with anyone that reads this blog post.</p>
</div>
</div>
<div class="outline-3" id="outline-container-1">
<h3 id="sec-1">Raspberry Pi</h3>
<div class="outline-text-3" id="text-1">
<p>It&#8217;s a cool toy, nothing to say about that. Even if people on the internet says that it lags in playing 1080p video in all my tests I didn&#8217;t find any lag. They pop up as soon as you start playing a 1080p video <b>and</b> doing netwoking intense operation like starting a rsync with a remote server or downloading 4/5 torrents.</p>
<p>If you have 25$ buy it. It&#8217;s worth the time and money you will spent on it. Due to the fact that it gets powered by a micro-usb connector (we are talking about 1A at 5V) don&#8217;t expect to connect a portable usb disk without power supply to the Raspberry. It will simply not going to work well and keeps rebooting just because power is too low to keep on the hard drive.</p>
<p>In my configuration I just connected to the Raspberry pi a ethernet cable, a HDMI cable and a usb hard drive with its own case and power supply.</p>
</div>
</div>
<div class="outline-3" id="outline-container-2">
<h3 id="sec-2">Distro challenge</h3>
<div class="outline-text-3" id="text-2"></div>
<div class="outline-4" id="outline-container-2-1">
<h4 id="sec-2-1">Openelec</h4>
<div class="outline-text-4" id="text-2-1">
<p><b>Version tested: 3.0 RC2</b></p>
<p><a href="http://openelec.tv/">Openelec</a> was the first distribution I&#8217;ve tried. It&#8217;s easy, smooth to install and to use. It <b>just works</b> (TM). It has only one goal: be the best mediacenter distribution. And It just does it very good. With openelec you don&#8217;t have to worry about updates but as a con, you miss a package manager and everything of a linux distribution actually. It&#8217;s very stable and if you just need a mediacenter I will use this.</p>
<p>There is openssh installed but you will barely need it, I just used for a couple of reboots. The XBMC repository is already set and you can install any kind of software that is available directly from the UI. The problem is that you will not find anything advanced like a webserver or any other package you will find in other distributions. The farest I went while using it was to install transmission bittorrent client directly from XBMC repositories from the UI. It went well and worked pretty smooth. But transmission just uses http and does not support https so exposing it outside your personal network is not wise. And since you don&#8217;t have a webserver you can&#8217;t actually put an apache configured as https trasparent proxy in front of transmission.</p>
<p>Also I was really disappointed when I figured out that It <a href="http://wiki.openelec.tv/index.php?title=OpenELEC_FAQ#How_do_I_change_the_SSH_password.3F">doesn&#8217;t support changing ssh root password as its FAQ states</a>. Since I soon wanted to do more with Raspberry pi that a simple mediacenter this was clearly an issue. I than tried Raspbmc.</p>
</div>
</div>
<div class="outline-4" id="outline-container-2-2">
<h4 id="sec-2-2">Raspbmc</h4>
<div class="outline-text-4" id="text-2-2">
<p><b>Version tested: 1.0 final installed on 3th of Feb 2013</b></p>
<p>Seriously. Don&#8217;t do that. Don&#8217;t spend your time in trying to figure out to make this distro work. It&#8217;s bloated. As soon as I installed I liked the really nice self installer and the cool splash screen while the system is loading. But apart from that, underneath you have a broken apt and package repository.</p>
<p><del>I tried to install the *byobu* package. When it was installing it&#8217;s dependence, *screen* there was a detected /deadlock in the init system/ so it refuses to install it. What?!</del> (as a comment demonstrated <a href="http://paste.debian.net/236034/">this issue seems to have been fixed after this post</a>. I&#8217;ll try myself as soon as I&#8217;m nearby my Raspberry). After that I installed apache2 and transmission and linked the two together making apache2 being a transparent ssl proxy. It didn&#8217;t work. It appears that Raspbmc mounts the drives as the <i>pi</i> user which is the one that runs the xbmc application using writing permission only for the <i>pi</i> user. The problem is that transmission runs as <i>debian-transmission</i> user. So it is unable to write on my external usb disk! After tweaking with /etc/udisk-glue.conf configuration I managed to mount the devices as root and assigning a write permission to all the users.</p>
<p>(<del>The best part was when I tried to install some software from XBMC repository. I couldn&#8217;t because the repo was empty.</del> Bart Otten, webmaster of Xbian.org and Superrepo.org contacted me privately saying that this issue is related to the XBMC repo. It can happen in any distribution that has XBMC. So if you don&#8217;t find software in your XBMC addon catalogue, just wait until the repository is up again.)</p>
<p>It may be the fact that <a href="http://www.raspbmc.com/">Raspbmc</a> is a <i>one person project</i> but the fact is that I found it really unstable and not flexible. If I were Sam Narzako (the man behind Raspbmc) I would open the project to more people or, better, contribute to the Xbian project.</p>
<p>Sam Nazarko politely commented that Raspbmc is not a one man project. I apologize for the misunderstanding but I got this information from the <a href="http://www.raspbmc.com/about/">raspbmc.com about page that states that &#8220;Raspbmc is created and maintained by Sam Nazarko, a 19 years old student from London&#8221;</a>.</p>
</div>
</div>
<div class="outline-4" id="outline-container-2-3">
<h4 id="sec-2-3">Xbian</h4>
<div class="outline-text-4" id="text-2-3">
<p><b>Version tested: 1.0 Alpha 4</b></p>
<p><a href="http://xbian.org/">Xbian</a> was really easy to install. After downloading its image and put in a sd card as <a href="http://xbian.org/download/">its website states</a> first time that it loaded on the Raspberry pi to stretch the partition in order to use all the space in the sd card. The system was ready in less than five minutes and I was able to install <b>byobu</b>, <b>apache2</b> and <b>transmission</b> without problems. Also the usb hard drive is automounted allowing anyone to create or read any file (<i>chmod 777</i>).</p>
<p>I then installed the <a href="http://wiki.xbmc.org/index.php?title=Add-on:Watchdog">XBMC watchdog plugin</a> in order to keep the library up to date with new additions. The system resulted to be really stable.</p>
<p>I found Xbian to be the most mature mediacenter distribution for Raspberry pi. It is easy to install and maintain but it preserve the flexibility of a debian based distribution. The only annoying thing is a menu that appears to the user anytime he/she logs in with ssh. I don&#8217;t think that this behaviour is wanted by an user that is connected through ssh because it tries to simply management. But who connects through ssh is not a newbie and thus does not need any simplification. Instead this menu alter the expected behaviour that the user imagine about connecting through ssh.</p>
</div>
</div>
</div>
<div class="outline-3" id="outline-container-3">
<h3 id="sec-3">Configuring apache2 as transparent proxy for transmission</h3>
<div class="outline-text-3" id="text-3">
<p>In order to simplify configuration, the configuration for apache2 as transparent proxy for transmission is the following:</p>
<pre class="brush: xml; light: true; title: ; notranslate">
&lt;VirtualHost *:443&gt;
 &lt;proxy&gt;
    Order deny,allow
    Allow from all
  &lt;/proxy&gt;

  SSLEngine On
  SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
  SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

  ProxyPass        /  http://127.0.0.1:9091
  ProxyPassReverse /  http://127.0.0.1:9091

&lt;/VirtualHost&gt;</pre>
</div>
</div>
<div class="outline-3" id="outline-container-4">
<h3 id="sec-4">I&#8217;ve my new shiny mediacenter, how do I control it from my sofa?</h3>
<div class="outline-text-3" id="text-4">
<p>You can have a Raspberry pi with all the software you want, but you will never have a mediacenter until you can control laying on your sofa. For xbmc, which is the base software in all the distribution I just spoke about, the remote control software is Yatse or Xbmc remote.</p>
<p>I tried both and I prefer Yatse. It&#8217;s much more complete and the UI is much more effective than the one in Xbmc remote. Also for functionality yatse seems much more powerful even if I didn&#8217;t analyze each specific functionality between the two remotes. You can <a href="https://play.google.com/store/apps/details?id=org.leetzone.android.yatsewidgetfree&amp;hl=en">install Yatse directly from goole play</a> as like <a href="https://play.google.com/store/apps/details?id=org.xbmc.android.remote&amp;hl=en">Xbmc remote</a>.</p>
<p>They both work accessing your Raspberry pi via the network. All of the distribution I&#8217;ve shown have remote control enabled by default although both Openelec and Raspbmc use port 80 while Xbian uses port 8080.</p>
<p>I highly suggest to make Xbmc scan through your media files in order to populate your library. In fact library is easy accessible, sortable and playable from yatse and It will save a loot of file in finding the right file expecially when it&#8217;s in a directory polluted by other media files.</p>
<p>Alex, from a comment, says that XBMC Remote for iOS works very well, I didn&#8217;t test it personally. YYou can find it on the app store.</p>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/328/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=328&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2013/02/19/openelec-vs-raspbmc-vs-xbian/feed/</wfw:commentRss>
		<slash:comments>64</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 run OpenVpn and a webserver (Apache, Nginx, Cherokee, etc) in the same port</title>
		<link>http://goshawknest.wordpress.com/2013/02/18/how-to-run-openvpn-and-a-webserver-apache-nginx-cherokee-etc-in-the-same-port/</link>
		<comments>http://goshawknest.wordpress.com/2013/02/18/how-to-run-openvpn-and-a-webserver-apache-nginx-cherokee-etc-in-the-same-port/#comments</comments>
		<pubDate>Mon, 18 Feb 2013 08:00:00 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[cherokee]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[OpenVpn]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=316</guid>
		<description><![CDATA[If you have ever used OpenVpn you know that a lot of filtered network do not allow to connect to other ports rather than 80 and 443 TCP. If you have your OpenVpn server in the same machine alongside with a Webserver this may be a problem because you want to use port 80 and [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=316&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div style="text-align:center;">
<p><img alt="http://www.hotforsecurity.com/wp-content/uploads/2012/10/The-New-York-Times-Website-Blocked-in-China-1.jpg" src="http://www.hotforsecurity.com/wp-content/uploads/2012/10/The-New-York-Times-Website-Blocked-in-China-1.jpg" /></p>
</div>
<p>If you have ever used OpenVpn you know that a lot of filtered network do not allow to connect to other ports rather than 80 and 443 TCP. If you have your OpenVpn server in the same machine alongside with a Webserver this may be a problem because you want to use port 80 and 443 for your webserver and also the openvpn.</p>
<p>OpenVpn developers are smart people and they knew that this situation is not so odd so they invented a special option to deal with it. Thanks <a href="http://www.rainersblog.com/?p=122">the article at raniersblog.org</a> I found the <i>port-share</i> option that just redirect all the packets that are not vpn ones to another <b>host:port</b> pair. This allows to run your webserver in a different port, let&#8217;s say 8443 and make OpenVpn run on the 443 TCP. If packets are not for the vpn they will get redirected to the 8443.</p>
<p>To do so just configure your webserver to listen to port 8443 and add this configuration to the openvpn configuration file (usually <b>/etc/openvpn/server.conf</b>):</p>
<pre class="brush: bash; title: ; notranslate">
proto tcp
port 443
port-share 127.0.0.1 8443
</pre>
<p>Then restart openvpn and your webserver and you should be all set.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/316/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=316&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2013/02/18/how-to-run-openvpn-and-a-webserver-apache-nginx-cherokee-etc-in-the-same-port/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://www.hotforsecurity.com/wp-content/uploads/2012/10/The-New-York-Times-Website-Blocked-in-China-1.jpg" medium="image">
			<media:title type="html">http://www.hotforsecurity.com/wp-content/uploads/2012/10/The-New-York-Times-Website-Blocked-in-China-1.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Python Bunch object or How to make dictionaries act like objects</title>
		<link>http://goshawknest.wordpress.com/2012/07/19/python-bunch-object-or-how-to-make-dictionaries-act-like-objects/</link>
		<comments>http://goshawknest.wordpress.com/2012/07/19/python-bunch-object-or-how-to-make-dictionaries-act-like-objects/#comments</comments>
		<pubDate>Wed, 18 Jul 2012 21:31:50 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[bunch]]></category>
		<category><![CDATA[dot notation]]></category>
		<category><![CDATA[language python]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[python class]]></category>
		<category><![CDATA[sourcecode]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=287</guid>
		<description><![CDATA[Python dictionaries are really powerful, but sometimes you need an object that is a dictionary but it&#8217;s also an object which keys are methods of the same object. Now think if you can have a class called Bunch that makes something like this possible: But it&#8217;s also more powerful than this: You can also use [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=287&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Python dictionaries are really powerful, but sometimes you need an object that is a dictionary but it&#8217;s also an object which keys are methods of the same object.<br />
Now think if you can have a class called Bunch that makes something like this possible:</p>
<pre class="brush: python; title: ; notranslate">
bunch = Bunch(a = 7, b = 3, c = 'hello')
In [5]: bunch.a
Out[5]: 7
In [6]: bunch.b
Out[6]: 3
In [7]: bunch.c
Out[7]: 'hello'
</pre>
<p>But it&#8217;s also more powerful than this:</p>
<pre class="brush: python; title: ; notranslate">
In [9]: d = {'a.b.c':1, 'a.c':2}
In [10]: bunch = Bunch(**d)
In [11]: bunch.a
bunch.a      bunch.a.b.c  bunch.a.c
In [13]: print bunch.a.b.c
1
In [14]: print bunch.a.c
2
In [15]: print bunch['a.b.c']
1
</pre>
<p>You can also use the dot notation to describe an hierarchy of objects and the Bunch object will take care of it</p>
<p>It&#8217;s not a dream, I&#8217;ve just implemented this python Bunch Object and this is the code:</p>
<pre class="brush: python; title: ; notranslate">
class C(object): pass

def rec_getattr(obj, attr):
    &quot;&quot;&quot;
    Get object's attribute. May use dot notation.
    &quot;&quot;&quot;
    if '.' not in attr:
        return getattr(obj, attr)
    else:
        L = attr.split('.')
        return rec_getattr(getattr(obj, L[0]), '.'.join(L[1:]))

def rec_setattr(obj, attr, value):
    &quot;&quot;&quot;
    Set object's attribute. May use dot notation.
    &quot;&quot;&quot;
    if '.' not in attr:
        setattr(obj, attr, value)
    else:
        L = attr.split('.')
        if not hasattr(obj, L[0]):
            setattr(obj, L[0], C())
        rec_setattr(getattr(obj, L[0]), '.'.join(L[1:]), value)

class Bunch(dict):
    def __init__(self,**kw):
        dict.__init__(self,kw)
        self.__dict__.update(kw)
        for k,v in kw.iteritems():
            rec_setattr(self, k, v) 
</pre>
<p>Comments, suggestions, patches are welcome :)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/287/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/287/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=287&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2012/07/19/python-bunch-object-or-how-to-make-dictionaries-act-like-objects/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>download list of files from a remote ssh/sftp server</title>
		<link>http://goshawknest.wordpress.com/2012/07/08/download-list-of-files-from-a-remote-sshsftp-server/</link>
		<comments>http://goshawknest.wordpress.com/2012/07/08/download-list-of-files-from-a-remote-sshsftp-server/#comments</comments>
		<pubDate>Sat, 07 Jul 2012 23:37:49 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[python3]]></category>
		<category><![CDATA[scp]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=279</guid>
		<description><![CDATA[I&#8217;ve approached this problem before. I&#8217;m on a server and I want to copy some directories from another server using scp. You have to write down all the paths of the directory you want of the first server, then go to the second, then do a command like: Which is easy with simple filenames but [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=279&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve approached this problem before. I&#8217;m on a server and I want to copy some directories from another server using scp. You have to write down all the paths of the directory you want of the first server, then go to the second, then do a command like:</p>
<pre class="brush: bash; title: ; notranslate">
scp -r server1:&quot;directory1 directory2 directory3 ...&quot; .
</pre>
<p>Which is easy with simple filenames but as soon as you need directories in different paths or long named directories it will be pain. And you don&#8217;t have shell completion. You could say: &#8220;Set up key authentication and you will have shell completion on the remote server&#8221;. Well, I don&#8217;t wanna set up keys for a server and I want a more practical way to solve this.<br />
I wanted to connect through ssh from nautilus (just type ssh://server on the path bar), surf my remote directories, then download what i need to a second server. Well I did a python program to do that.<br />
It&#8217;s pretty straightforward. You connect with nautilus to a server, select all the directories you want then copy them. Open the shell of another server, then do: <strong>python3 download.py -s server1 CTRL+V</strong><br />
The CTRL+V will copy all the filename absolute paths straight to the shell. Just hit enter, it will ask for password, just give it and you are done. It will start downloading all the list of directories of files you want from <em>server1</em><br />
This is the python program that makes this possible.</p>
<pre class="brush: python; title: ; notranslate">
&lt;pre&gt;
#!/usr/bin/python
# -*- coding: UTF-8 -*-
'''
This programs allows easy copies of remote directories to the local path using scp

        usage:
                python3 download.py [options] list-of-files

        options:
                -s, --server server:set the server instead of deducing it

@author: Vincenzo Ampolo &lt;vincenzo.ampolo@gmail.com&gt;
'''

import sys
import os
import getopt

import urllib.parse

def shellquote(s):
        &quot;&quot;&quot;escapes the given string s such that it can be used safely in a shell
        &quot;&quot;&quot;
        return &quot;'&quot; + s.replace(&quot;'&quot;, &quot;'\\''&quot;) + &quot;'&quot;

def main(argv=None):
        if argv is None:
           argv = sys.argv

        opts, extraparams = getopt.gnu_getopt(argv[1:], &quot;hvs:&quot;, [&quot;help&quot;, &quot;server&quot;])

        verbose = False
        server = None

        for o, a in opts:
                if o == &quot;-v&quot;:
                        verbose = True
                elif o in (&quot;-h&quot;, &quot;--help&quot;):
                        print(__doc__)
                        sys.exit(0)
                elif o in (&quot;-s&quot;, '--server'):
                        server = a
                else:
                        assert False, &quot;UnhandledOption&quot;

        l = []
        for path in extraparams:
                url = urllib.parse.urlparse(path)
                if not server:
                        server = url.host
                quoted_path = shellquote(urllib.parse.unquote(url.path))
                l.append(quoted_path)
        files_to_download = ' '.join(l)
        cmd = 'scp -r %s:&quot;%s&quot; .'%(server, files_to_download)
        os.system(cmd)
        return 0

if __name__ == '__main__':
    sys.exit(main())
&lt;/pre&gt;
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/279/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=279&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2012/07/08/download-list-of-files-from-a-remote-sshsftp-server/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>This ban is going to hurt you so badly Apple</title>
		<link>http://goshawknest.wordpress.com/2012/07/04/this-ban-is-going-to-hurt-you-so-badly-apple/</link>
		<comments>http://goshawknest.wordpress.com/2012/07/04/this-ban-is-going-to-hurt-you-so-badly-apple/#comments</comments>
		<pubDate>Wed, 04 Jul 2012 07:14:55 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[Random Thoughts]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[evil]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=274</guid>
		<description><![CDATA[Good artists copy; great artists steal. (cit. Steve Jobs, Apple founder) Back in the 70&#8242; through the 00&#8242; Apple was a very good company. It was surely one of the best technology innovator in the world. Remember the Apple I, the all-wood computer that made the personal computer being real? It was amazing. I never saw [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=274&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><em>Good artists copy; great artists steal. (cit. <strong>Steve Jobs, Apple founder</strong>)</em></p>
<p>Back in the 70&#8242; through the 00&#8242; Apple was a very good company. It was surely one of the best technology innovator in the world. Remember the <a href="http://en.wikipedia.org/wiki/Apple_I">Apple I</a>, the all-wood computer that made the personal computer being real? It was amazing. I never saw one for real but It&#8217;s in the hall of fame of the computer history.</p>
<p>Do you remember the Apple II, one of the best Apple products, the one that was able to sell $79m in the old 1979? That was innovation. In a world dominated by large scale computer they found a new market: personal computer. Do you remember 1984? There was this commercial:</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='595' height='365' src='http://www.youtube.com/embed/OYecfV3ubP8?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<p>I just saw that and I see a company that would like to make <em>genuine innovation</em>, compete with <em>products</em> not with <em>lawyers</em>. Another company was very good at it, and it&#8217;s called Microsoft.</p>
<p>Yesterday I read that <a href="http://www.cio-today.com/story.xhtml?story_id=0030009Z5S4I&amp;full_skip=1">Apple wins sales ban on Google galaxy nexsus</a>. It seems that after Steve&#8217;s administration Apple turned to be much more like Microsoft. They stopped competing with <em>products</em> and they choose to<em> </em>compete with <em>lawyers</em>. It seems that the fuel that made Apple be one of the best tech companies of the world is gone with its beloved founder Steve.</p>
<p>I think that was a very bad move. It seems like Apple is maybe going to be an empty box without any sort of innovation trying to make money out of awful patents acquired during time. I&#8217;m so sorry for all the Apple fanboys, these moves are hard to be defended in terms of technology innovation.</p>
<p>I&#8217;m just curious, was Apple really thinking that it could defeat android with this move?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/274/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=274&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2012/07/04/this-ban-is-going-to-hurt-you-so-badly-apple/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 install pymatlab</title>
		<link>http://goshawknest.wordpress.com/2012/06/24/how-to-install-pymatlab/</link>
		<comments>http://goshawknest.wordpress.com/2012/06/24/how-to-install-pymatlab/#comments</comments>
		<pubDate>Sun, 24 Jun 2012 08:43:27 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=177</guid>
		<description><![CDATA[For a university project i had to deal with a web application written in python and some computations that are matlab based. Of course my webapp was in python so I had to find a library to interact with python. I&#8217;ve found pymatlab to be a good library for this goal. Installing pymatlab was a [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=177&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>For a university project i had to deal with a web application written in python and some computations that are matlab based. Of course my webapp was in python so I had to find a library to interact with python. I&#8217;ve found pymatlab to be a good library for this goal.</p>
<p>Installing pymatlab was a bit tricky. I had to install matlab on Linux, then install the <em>python-numpy</em> package and then install pymatlab with this sets of commands</p>
<pre class="brush: bash; title: ; notranslate">

sudo -s

export LIBRARY_PATH=/usr/local/MATLAB/R2011a/bin/glnxa64/

export PATH=$PATH:/usr/local/MATLAB/R2011a/bin/
 export C_INCLUDE_PATH=/usr/local/MATLAB/R2011a/extern/include/
 apt-get install csh
 pip install pymatlab

</pre>
<p>Then I was able to run matlab inside my python programs.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/177/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=177&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2012/06/24/how-to-install-pymatlab/feed/</wfw:commentRss>
		<slash:comments>4</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>Why IronPython is shit&#8230;</title>
		<link>http://goshawknest.wordpress.com/2012/06/18/why-ironpython-is-shit/</link>
		<comments>http://goshawknest.wordpress.com/2012/06/18/why-ironpython-is-shit/#comments</comments>
		<pubDate>Mon, 18 Jun 2012 21:40:59 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[ironpython]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=265</guid>
		<description><![CDATA[I&#8217;m not a C# fan, I&#8217;m more a python fan though. Anyway. At work I had to make C# be able to call python functions. So I started googling. I found some nice posts from: John D. Cook from 2009, a bit out of date, about the limits of IronPython http://www.johndcook.com/blog/2009/02/26/ironpython-is-a-one-way-gate/ IronClad about patching some of [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=265&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m not a C# fan, I&#8217;m more a python fan though. Anyway. At work I had to make C# be able to call python functions. So I started googling. I found some nice posts from:</p>
<ul>
<li>John D. Cook from 2009, a bit out of date, about the limits of IronPython <a href="http://www.johndcook.com/blog/2009/02/26/ironpython-is-a-one-way-gate/">http://www.johndcook.com/blog/2009/02/26/ironpython-is-a-one-way-gate/</a></li>
<li>IronClad about patching some of the IronPython limitations, mainly the ability to run python C modules <a href="http://code.google.com/p/ironclad/">http://code.google.com/p/ironclad/</a></li>
<li>Zenon Ochal about calling python code from C# and vice versa <a href="http://www.simple-talk.com/dotnet/.net-framework/dynamic-language-integration-in-a-c-world/">http://www.simple-talk.com/dotnet/.net-framework/dynamic-language-integration-in-a-c-world/</a></li>
<li>Microsoft on IronPython architecture and differencies with CPython <a href="http://msdn.microsoft.com/en-us/magazine/cc300810.aspx">http://msdn.microsoft.com/en-us/magazine/cc300810.aspx</a></li>
</ul>
<h3>Run python from C# and vice versa</h3>
<p>But thanks to .Net 4.0 It seems that a lot of troubles have been resolved introducing the new <strong>dynamic</strong> type in C#. With that type I can finally do some work in python then export any class to my C# world.</p>
<p>There are still some issues in using <em>any</em> python module: Ironpython is not compatible with the normal python interpreter, or CPython. You can use Ironclad to make Ironpython run C CPython modules but they don&#8217;t support Python 2.7 yet and the last update from their release is from  07/2010.</p>
<h3>Install IronPython</h3>
<p>After installing IronPath you have to modify windows PATH system variable such that you can execute <strong>ipy</strong> in a shell and get a IronPython console. To do so you have to add the following two lines at the end of your PATH variable on Windows:</p>
<pre class="brush: plain; title: ; notranslate">

;c:\Program Files (x86)\IronPython 2.7\;c:\Program Files (x86)\IronPython 2.7\Sciprts

</pre>
<h3>Install Setuptools</h3>
<p>Tried to install distribute. Of course it didn&#8217;t work. It crashed. I&#8217;ve successfully managed to setup setuptools but their support is broken and i&#8217;m unable to install simple python eggs due to multiple error.   These are the steps that I&#8217;ve followed</p>
<pre class="brush: plain; title: ; notranslate">
c:\Users\vinz\Desktop&gt;ipy distribute_setup.py
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.2
7.tar.gz
Extracting in c:\users\vinz\appdata\local\temp\tmpanru2x
Now working in c:\users\vinz\appdata\local\temp\tmpanru2x\distribute-0.6.27
Installing Distribute

Process is terminated due to StackOverflowException.
Something went wrong during the installation.
See the error message above.

</pre>
<p>Use setuptools instead http://peak.telecommunity.com/dist/ez_setup.py</p>
<p>Open a priviledged shell <a href="http://www.howtogeek.com/howto/windows-vista/run-a-command-as-administrator-from-the-windows-vista-run-box/">http://www.howtogeek.com/howto/windows-vista/run-a-command-as-administrator-from-the-windows-vista-run-box/</a></p>
<pre class="brush: plain; title: ; notranslate">

ipy ez_setup.py

</pre>
<p>Since there is no support to zlib in ironpython you cannot install any egg anyway even if you installed setuptools.</p>
<h3>Install an egg</h3>
<p>I&#8217;ve managed to install setuptools, however installing a simple package fails because <em>.pth</em> files are not managed correctly. So the best way of installing eggs is just to take their source, maybe unpacking an egg since it&#8217;s just a zip file, and copy directly on the IronPython <em>site-packages</em> directory. <strong>I&#8217;ll still describe the process I did just in case some reader sees that I&#8217;ve done a mistake.</strong></p>
<p>To install an egg, just unzip it and run:</p>
<pre class="brush: plain; title: ; notranslate">

ipy -X:Frames setup.py install --user
</pre>
<p>The &#8211;user will install the package for user only. To install the package system-wide you have to install from an administrator shell.</p>
<p><strong>The best thing to do to install an egg is just to unpack it, it&#8217;s a zip file, then copy the directory of your library in <em>C:\Program Files (x86)\IronPython 2.7\Lib\site-packages</em> . That directory will be included in sys.path of every ipy interpreter.</strong></p>
<h3>First problems</h3>
<p>Just run a first example which uses ElementTree and i got:</p>
<pre class="brush: plain; title: ; notranslate">

NotImplementedError: iterparse is not supported on IronPython. (CP #31923)

</pre>
<p>Surfing a bit the web I found that It&#8217;s a bug from Dec 2011 <a href="http://ironpython.codeplex.com/workitem/31579">http://ironpython.codeplex.com/workitem/31579</a></p>
<p>So I&#8217;ve downloaded and installed <a href="http://effbot.org/zone/element-index.htm">elementTree</a>, It will install on normal Python&#8217;s site-packages, so you have to move the folder unver IronPython&#8217;s site-packages. After doing so, when you need to import etree just do:</p>
<pre class="brush: python; title: ; notranslate">

import platform
if platform.python_implementation() == 'IronPython':
from elementtree import ElementTree
else:
import xml.etree.ElementTree

</pre>
<p>This code will import the just installed elementtree library or the system library one depending if you are on normal Python interpreter (CPython) or IronPython.</p>
<h1>Conclusions</h1>
<p>From this experience I&#8217;ve learnt many things:</p>
<ul>
<li>IronPython is not a full python interpreter: it lacks many basic support like the one for setuptool and distribute</li>
<li>IronPython is very bugged, even the standard library is bugger. Thus import as external module everything you need.</li>
<li>IronPython cannot use the vast majority of python modules because to support .NET jit it breaks CPython compatibility</li>
</ul>
<p>Thus. Keep away from it! It&#8217;s just crap. Microsoft&#8217;s dream of .Net simply doesn&#8217;t work for python. Yeah, you can access Python functions and class from C# but you miss the goal that makes people use python: a very huge amount of libraries and packages that are easy to install and integrate. Sorry Microsoft, it&#8217;s yet another #Fail</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/265/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=265&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2012/06/18/why-ironpython-is-shit/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 quickly share a git repository</title>
		<link>http://goshawknest.wordpress.com/2012/05/24/how-to-quickly-share-a-git-repository/</link>
		<comments>http://goshawknest.wordpress.com/2012/05/24/how-to-quickly-share-a-git-repository/#comments</comments>
		<pubDate>Thu, 24 May 2012 16:39:50 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[quick sharing]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=259</guid>
		<description><![CDATA[Today I had to simply share a local repository with a collegue. It was pretty easy, just do: the reuseaddr option will reuse connection, verbose will let you see what will happen, base-path is for using relative paths and export-all is to export all the repos in the .git folder. Easy, isn&#8217;t it? Tell your [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=259&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:center;"><img class="aligncenter" src="https://git.wiki.kernel.org/images-git/b/b5/Git-logo-jengelh.svg" alt="" width="450" height="180" /></p>
<p>Today I had to simply share a local repository with a collegue. It was pretty easy, just do:</p>
<pre class="brush: bash; title: ; notranslate">

cd MyGitProject
git daemon --reuseaddr --verbose  --base-path=. --export-all ./.git
</pre>
<p>the <strong>reuseaddr</strong> option will reuse connection, <strong>verbose</strong> will let you see what will happen, <strong>base-path</strong> is for using relative paths and <strong>export-all</strong> is to export all the repos in the .git folder. Easy, isn&#8217;t it?<br />
Tell your friend/collegue to do</p>
<pre class="brush: bash; title: ; notranslate">
git clone git://your-ip-address-here/ MyGitProject
</pre>
<p>And it will start downloading the new repo :) Amazing, isn&#8217;t it ? PS: do not use bad GUIs, they will mess the command line to get the repo. just open a shell, even on windows, and type that command.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/259/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=259&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2012/05/24/how-to-quickly-share-a-git-repository/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="https://git.wiki.kernel.org/images-git/b/b5/Git-logo-jengelh.svg" medium="image" />
	</item>
		<item>
		<title>How to put aptana launcher on the ubuntu dock</title>
		<link>http://goshawknest.wordpress.com/2012/05/24/how-to-put-aptana-launcher-on-the-ubuntu-dock/</link>
		<comments>http://goshawknest.wordpress.com/2012/05/24/how-to-put-aptana-launcher-on-the-ubuntu-dock/#comments</comments>
		<pubDate>Thu, 24 May 2012 01:16:46 +0000</pubDate>
		<dc:creator>vincenzoampolo7</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[aptana]]></category>
		<category><![CDATA[dock]]></category>
		<category><![CDATA[launcher]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://goshawknest.wordpress.com/?p=255</guid>
		<description><![CDATA[Today after using vim for a while for my web development, I decided to give a try to Aptana. So I just downloaded it and&#8230; I liked it. I use the Super+N feature of Unity a lot, I think it&#8217;s a killer feature of this DE. Well. I wanted to put aptana in the dock [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=255&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Today after using vim for a while for my web development, I decided to give a try to Aptana. So I just downloaded it and&#8230; I liked it. I use the Super+N feature of Unity a lot, I think it&#8217;s a killer feature of this DE. Well. I wanted to put aptana in the dock too.</p>
<p>Doing so is prety easy. Just unpack the aptana package you just <a href="http://aptana.com/products/studio3/download">downloaded from aptana.com</a> in whatever folder you like. I usually put this kind of custom apps in <em>~/Apps </em>. now enter into the newly created aptana folder and create a file named <strong>aptana.desktop</strong>.</p>
<p>Put this content into that file:</p>
<pre class="brush: plain; title: ; notranslate">

[Desktop Entry]
Type=Application
StartupNotify=True
Name=Aptana
Comment=Aptana Studio 3
Icon=/home/goshawk/Apps/Aptana_Studio_3/icon.xpm &lt;- replace this whit the ABSOLUTE path in which you unpacked aptana
Exec=/home/goshawk/Apps/Aptana_Studio_3/AptanaStudio3 &lt;- the same applies here, replace with the ABSOLUTE path
Terminal=false
Categories=Development;IDE;

</pre>
<p>Give that file executable permissions. A <strong>chmod +x aptana.desktop</strong> should be fine. You can also right click on the file from nautilus, go to <strong>properties </strong>and then flag <strong>execute</strong>. The icon of the file will change and will be the aptana icon. Your launcher is now ready. Just drag and drop it to the dock and right click on it and select <strong>lock to launcher</strong>. Well done.</p>
<p>If you want it to be also accessible from the unity text launcher (the one that appears when you press the windows logo on your keyboard) just copy the aptana.desktop file to <strong>~/local/share/applications. </strong>Your aptana will be also available from the text launcher now.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/goshawknest.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/goshawknest.wordpress.com/255/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=goshawknest.wordpress.com&#038;blog=6236053&#038;post=255&#038;subd=goshawknest&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://goshawknest.wordpress.com/2012/05/24/how-to-put-aptana-launcher-on-the-ubuntu-dock/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>38.549496 -121.720988</georss:point>
		<geo:lat>38.549496</geo:lat>
		<geo:long>-121.720988</geo:long>
		<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>
