<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2787782429452998930</id><updated>2024-09-08T19:30:46.430+02:00</updated><category term="ruby"/><category term="ruby on rails"/><category term="linux"/><category term="rvm"/><category term="ubuntu"/><category term="aptana"/><category term="delete all gems"/><category term="gemset"/><category term="git"/><category term="jquery"/><category term="scm"/><category term="tips"/><category term="validations"/><title type='text'>d4e blog</title><subtitle type='html'>Ruby, Ruby on Rails, Web applications, Linux e Open Source.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://davide-targa.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://davide-targa.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Davide Targa</name><uri>http://www.blogger.com/profile/15144269461974653167</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJdzxuJJVzRQktf6wN7rCtgvccyvDaBfPqkKdhbrvBdVJyTHfHivBO6TI7tVRMZfEgCGWsYjQfNGFALbbZC3jjJedgHl5e9KkvnP8L8IuQDLOE2ov1Knc4KTBArbht9g/s220/Tux-G2.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2787782429452998930.post-4680852839836029592</id><published>2011-04-29T11:04:00.001+02:00</published><updated>2011-04-29T11:08:56.780+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails"/><title type='text'>jQuery on Rails 3</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;Ruby on Rails is an open source web application framework for the Ruby programming language. The last version of this framework is the 3.0.0 released Aug 29, 2010. By default, when you start a new Rails application with:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;rails new my-app&lt;/pre&gt;by default it uses prototype as javascript framework. Now prototype isn&#39;t the best solution for all developers so you might want to use &lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; instead.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0qL7TkBh1ZugUTWjYuIyYqQslnfOZ-EF4Ioisx1mD9NVaJOqgEgq2ZRnoS_tILUfGdkQEVMzKmwCYXKXUNTODKDx51B-H5u8QM0Eak87ZkLIFVYP90k9EFRlwc71S7omAvYfe1wiWUbPI/s1600/jrails.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;94&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0qL7TkBh1ZugUTWjYuIyYqQslnfOZ-EF4Ioisx1mD9NVaJOqgEgq2ZRnoS_tILUfGdkQEVMzKmwCYXKXUNTODKDx51B-H5u8QM0Eak87ZkLIFVYP90k9EFRlwc71S7omAvYfe1wiWUbPI/s200/jrails.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;To use jQuery you need to create a new rails application with the following command instead:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;rails new my-app -J&lt;/pre&gt;notice the &quot;-J&quot; option that skips the creation of the prototype files in the new app.&lt;br /&gt;
Now you have to download jQuery from its website and put the jquery-x.x.x.js file inside the public/javascripts folder of your application.&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;Now download the file rails.js from http://github.com/rails/jquery-ujs and put it inside the public/javascripts folder too.&lt;/div&gt;Now you need to add a reference to jQuery inside the application layout. To do so, open the file app/views/layouts/application.html.erb and add the following code:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;&amp;lt;%= stylesheet_link_tag &#39;jquery-ui-1.8.5&#39;, &#39;scaffold&#39; %&amp;gt;
&amp;lt;%= javascript_include_tag &#39;jquery-1.4.3&#39;, &#39;jquery-ui-1.8.5&#39;, &#39;application&#39; %&amp;gt;&lt;/pre&gt;You&#39;re done! Now you can use Ruby on Rails with jQuery.&lt;br /&gt;
Happy coding!</content><link rel='replies' type='application/atom+xml' href='http://davide-targa.blogspot.com/feeds/4680852839836029592/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davide-targa.blogspot.com/2010/10/jquery-on-rails-3.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/4680852839836029592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/4680852839836029592'/><link rel='alternate' type='text/html' href='http://davide-targa.blogspot.com/2010/10/jquery-on-rails-3.html' title='jQuery on Rails 3'/><author><name>Davide Targa</name><uri>http://www.blogger.com/profile/15144269461974653167</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJdzxuJJVzRQktf6wN7rCtgvccyvDaBfPqkKdhbrvBdVJyTHfHivBO6TI7tVRMZfEgCGWsYjQfNGFALbbZC3jjJedgHl5e9KkvnP8L8IuQDLOE2ov1Knc4KTBArbht9g/s220/Tux-G2.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0qL7TkBh1ZugUTWjYuIyYqQslnfOZ-EF4Ioisx1mD9NVaJOqgEgq2ZRnoS_tILUfGdkQEVMzKmwCYXKXUNTODKDx51B-H5u8QM0Eak87ZkLIFVYP90k9EFRlwc71S7omAvYfe1wiWUbPI/s72-c/jrails.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2787782429452998930.post-609845039170481458</id><published>2011-04-28T13:16:00.002+02:00</published><updated>2011-05-02T09:34:27.714+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><category scheme="http://www.blogger.com/atom/ns#" term="scm"/><title type='text'>Basic GIT configuration</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4tRJ0GHXSJ2mLd1wSTm_3I4M9eebPx6Kn9lNU4ZBGabQioBGYeaSs3IYN6L5eFi-O7EG_ECGjmzZvMrw-97017S5ZWo948qAWXXPvuDuMHlMRtbNvV9LNvzN1GMQc1gZe8bwEU3pFL8uI/s1600/git-logo.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4tRJ0GHXSJ2mLd1wSTm_3I4M9eebPx6Kn9lNU4ZBGabQioBGYeaSs3IYN6L5eFi-O7EG_ECGjmzZvMrw-97017S5ZWo948qAWXXPvuDuMHlMRtbNvV9LNvzN1GMQc1gZe8bwEU3pFL8uI/s1600/git-logo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;http://git-scm.com/&quot;&gt;Git&lt;/a&gt; is a distributed revision control system with an emphasis on speed. Git was initially designed and developed by Linus Torvalds for Linux kernel development. Once you installed &lt;a href=&quot;http://git-scm.com/&quot;&gt;Git&lt;/a&gt;, you may configure some basic parameters like username, email, ecc. To do so you can use the following commands:&lt;br /&gt;
Set the username:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;git config --global user.name &quot;pinco pallino&quot;
&lt;/pre&gt;Set the user email:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;git config --global user.email &quot;foo.bar@somehost.com&quot;
&lt;/pre&gt;Enable the ui color option:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;git config --global color.ui true
&lt;/pre&gt;Hope this helps</content><link rel='replies' type='application/atom+xml' href='http://davide-targa.blogspot.com/feeds/609845039170481458/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davide-targa.blogspot.com/2011/04/basic-git-configuration.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/609845039170481458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/609845039170481458'/><link rel='alternate' type='text/html' href='http://davide-targa.blogspot.com/2011/04/basic-git-configuration.html' title='Basic GIT configuration'/><author><name>Davide Targa</name><uri>http://www.blogger.com/profile/15144269461974653167</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJdzxuJJVzRQktf6wN7rCtgvccyvDaBfPqkKdhbrvBdVJyTHfHivBO6TI7tVRMZfEgCGWsYjQfNGFALbbZC3jjJedgHl5e9KkvnP8L8IuQDLOE2ov1Knc4KTBArbht9g/s220/Tux-G2.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4tRJ0GHXSJ2mLd1wSTm_3I4M9eebPx6Kn9lNU4ZBGabQioBGYeaSs3IYN6L5eFi-O7EG_ECGjmzZvMrw-97017S5ZWo948qAWXXPvuDuMHlMRtbNvV9LNvzN1GMQc1gZe8bwEU3pFL8uI/s72-c/git-logo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2787782429452998930.post-8799865214477243400</id><published>2011-04-26T15:14:00.000+02:00</published><updated>2011-04-29T11:12:55.126+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails"/><title type='text'>How to start/stop/restart delayed_jobs from the command line</title><content type='html'>Delayed Jobs is a background processing tool written in ruby. When you use it inside a Ruby on Rails application, usually you start it with:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;rake jobs:work
&lt;/pre&gt;If you need to start delayed jobs from a Capistrano task or from a monitoring framework like God, you should use the following commands.&lt;br /&gt;
To start:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;script/delayed_job start
&lt;/pre&gt;To stop:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;script/delayed_job stop
&lt;/pre&gt;To restart:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;script/delayed_job restart
&lt;/pre&gt;&lt;br /&gt;
Hope this helps.</content><link rel='replies' type='application/atom+xml' href='http://davide-targa.blogspot.com/feeds/8799865214477243400/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davide-targa.blogspot.com/2011/04/how-to-startstoprestart-delayedjobs.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/8799865214477243400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/8799865214477243400'/><link rel='alternate' type='text/html' href='http://davide-targa.blogspot.com/2011/04/how-to-startstoprestart-delayedjobs.html' title='How to start/stop/restart delayed_jobs from the command line'/><author><name>Davide Targa</name><uri>http://www.blogger.com/profile/15144269461974653167</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJdzxuJJVzRQktf6wN7rCtgvccyvDaBfPqkKdhbrvBdVJyTHfHivBO6TI7tVRMZfEgCGWsYjQfNGFALbbZC3jjJedgHl5e9KkvnP8L8IuQDLOE2ov1Knc4KTBArbht9g/s220/Tux-G2.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2787782429452998930.post-3273058297538331546</id><published>2011-04-20T08:41:00.000+02:00</published><updated>2011-04-29T11:12:39.126+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>How to enable WebGL support in Firefox 4 (Linux)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxZifmZcuVWyRqr7FNqVtqVO1DNp3Vhch-jdg8GTbISTFIGvuHKlN5KM-qAQzfODG7cxI9fyr0uDtbbC_3dYFn26NbvEGRj1_GaTsNvwXmw9yU6vHnyvJ2vSZRuuFZ0o9wD_b_I7ooCvCt/s1600/firefox-logo1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxZifmZcuVWyRqr7FNqVtqVO1DNp3Vhch-jdg8GTbISTFIGvuHKlN5KM-qAQzfODG7cxI9fyr0uDtbbC_3dYFn26NbvEGRj1_GaTsNvwXmw9yU6vHnyvJ2vSZRuuFZ0o9wD_b_I7ooCvCt/s200/firefox-logo1.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;WebGL is a Web-based Graphics Library. It extends the capability of the JavaScript programming language to allow it to generate interactive 3D graphics within any compatible web browser.&lt;br /&gt;
To enable WebGL support in firefox 4 using Ubuntu 10.04 you have to install the library libosmesa6 with the following command:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;sudo apt-get install libosmesa6
&lt;/pre&gt;After this start up firefox and in the url bar type:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;about:config
&lt;/pre&gt;and press enter. Say ok to the alert message and in the search box type &quot;webgl&quot;. Double click on &quot;webglosmesalib&quot; parameter and enter the library path (like in the screenshot below).&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuQwDYNETtSwqSaCBN9Vkj6oSdQ0ISCY9yG-ye3_9sMazsmuCp4DHwQBL0QTsqXihyctKnukIw1Y8m8gBznI24GZP7ma0T5n46t-pV8HYZzSszSr0Jnrrixb8MlRl7W6heVfAFpUmVHw1l/s1600/webgl-firefox.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;83&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuQwDYNETtSwqSaCBN9Vkj6oSdQ0ISCY9yG-ye3_9sMazsmuCp4DHwQBL0QTsqXihyctKnukIw1Y8m8gBznI24GZP7ma0T5n46t-pV8HYZzSszSr0Jnrrixb8MlRl7W6heVfAFpUmVHw1l/s320/webgl-firefox.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Enabling Firefox 4 WebGL support.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
For me it&#39;s:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;/usr/lib/libOSMesa.so.6
&lt;/pre&gt;Now quit and restart Firefox and WebGL support shoul be active.&lt;br /&gt;
Enjoy!</content><link rel='replies' type='application/atom+xml' href='http://davide-targa.blogspot.com/feeds/3273058297538331546/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davide-targa.blogspot.com/2011/04/how-to-enable-webgl-support-in-firefox.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/3273058297538331546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/3273058297538331546'/><link rel='alternate' type='text/html' href='http://davide-targa.blogspot.com/2011/04/how-to-enable-webgl-support-in-firefox.html' title='How to enable WebGL support in Firefox 4 (Linux)'/><author><name>Davide Targa</name><uri>http://www.blogger.com/profile/15144269461974653167</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJdzxuJJVzRQktf6wN7rCtgvccyvDaBfPqkKdhbrvBdVJyTHfHivBO6TI7tVRMZfEgCGWsYjQfNGFALbbZC3jjJedgHl5e9KkvnP8L8IuQDLOE2ov1Knc4KTBArbht9g/s220/Tux-G2.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxZifmZcuVWyRqr7FNqVtqVO1DNp3Vhch-jdg8GTbISTFIGvuHKlN5KM-qAQzfODG7cxI9fyr0uDtbbC_3dYFn26NbvEGRj1_GaTsNvwXmw9yU6vHnyvJ2vSZRuuFZ0o9wD_b_I7ooCvCt/s72-c/firefox-logo1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2787782429452998930.post-6776459158492311905</id><published>2011-04-06T20:43:00.004+02:00</published><updated>2011-05-07T22:58:36.835+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="delete all gems"/><category scheme="http://www.blogger.com/atom/ns#" term="gemset"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="rvm"/><title type='text'>How to remove all Rubygems inside a RVM gemset</title><content type='html'>The only way to uninstall all the gems inside a &lt;a href=&quot;http://rvm.beginrescueend.com/&quot;&gt;RVM&lt;/a&gt; gemset is to use the following command:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;$ rvm use 1.9.2@my-gemset
Using /home/user/.rvm/gems/ruby-1.9.2-p180 with gemset my-gemset
$ gem uninstall gem1 gem2 gem3 ...
&lt;/pre&gt;A bit boring, don&#39;t you think? A way to automate this process is through the following command:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;gem uninstall `gem list | cut -d&quot; &quot; -f1 | tr &#39;\n&#39; &#39; &#39;`
&lt;/pre&gt;If you don&#39;t use &lt;a href=&quot;http://rvm.beginrescueend.com/&quot;&gt;RVM&lt;/a&gt; to manage different &lt;a href=&quot;http://www.ruby-lang.org/&quot;&gt;Ruby&lt;/a&gt; versions, maybe you have to change the command above in something like this:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;sudo gem uninstall `sudo gem list | cut -d&quot; &quot; -f1 | tr &#39;\n&#39; &#39; &#39;`
&lt;/pre&gt;Pay attention to copy all the &quot;`&quot; characters.&lt;br /&gt;
In this way you can uninstall all the gems only with one command.&lt;br /&gt;
Hope this helps :-)</content><link rel='replies' type='application/atom+xml' href='http://davide-targa.blogspot.com/feeds/6776459158492311905/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davide-targa.blogspot.com/2011/04/how-to-delete-all-gems-inside-rvm.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/6776459158492311905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/6776459158492311905'/><link rel='alternate' type='text/html' href='http://davide-targa.blogspot.com/2011/04/how-to-delete-all-gems-inside-rvm.html' title='How to remove all Rubygems inside a RVM gemset'/><author><name>Davide Targa</name><uri>http://www.blogger.com/profile/15144269461974653167</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJdzxuJJVzRQktf6wN7rCtgvccyvDaBfPqkKdhbrvBdVJyTHfHivBO6TI7tVRMZfEgCGWsYjQfNGFALbbZC3jjJedgHl5e9KkvnP8L8IuQDLOE2ov1Knc4KTBArbht9g/s220/Tux-G2.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2787782429452998930.post-3975022365676405126</id><published>2011-01-20T17:19:00.001+01:00</published><updated>2011-04-29T11:11:43.040+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Wake on lan con Ubuntu</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Certe volte può essere necessario accendere da remoto un pc collegato alla nostra rete LAN. Per fare ciò è necessario anzitutto abilitare il pc che vogliamo accendere a fare il boot qualora esso riceva un particolare segnale sull&#39;interfaccia di rete.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Entriamo quindi nel bios e cerchiamo qualcosa di simile a: &quot;Remote wake up&quot;, oppure &quot;Wake on lan&quot; e abilitiamolo come mostrato nell&#39;immagine che segue.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIXYauNoM-T166ZnvW8cxnC04kyCX01yqChXA8ekfhWAUzwHavXkSQwh6DwYbCzl8a3YeQ2WmlcHEteox4Gdf16RMHnrW3ARvw9R5Grf794tCviwrrZxbAy2lLiACTQxCH679r-1ZQOWBC/s1600/bios-wake-on-lan-2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;263&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIXYauNoM-T166ZnvW8cxnC04kyCX01yqChXA8ekfhWAUzwHavXkSQwh6DwYbCzl8a3YeQ2WmlcHEteox4Gdf16RMHnrW3ARvw9R5Grf794tCviwrrZxbAy2lLiACTQxCH679r-1ZQOWBC/s320/bios-wake-on-lan-2.jpg&quot; width=&quot;320&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;A questo punto è necessario conoscere il MAC address (indirizzo fisico) dell&#39;interfaccia di rete del pc che vogliamo accendere. Se il pc in questione ha ubuntu, possiamo reperire tale dato con il comando:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;pre class=&quot;brush: bash&quot;&gt;ifconfig
&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Generalmente l&#39;interfaccia che ci interessa ha come nome eth0 e l&#39;indirizzo MAC è quello presente alla voce &quot;HWaddr&quot;. Se invece stiamo usando window$, possiamo dare da terminale il comando:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;pre class=&quot;brush: bash&quot;&gt;ipconfig /all&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Il dato che ci interessa è sotto la voce &quot;Indirizzo fisico&quot;. &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Segnamoci il dato e passiamo ora ad Ubuntu.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Installiamo il pacchetto &lt;i&gt;wakeonlan &lt;/i&gt;a meno che non sia già installato con il comando:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;pre class=&quot;brush: bash&quot;&gt;sudo apt-get install wakeonlan&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Fatto ciò sempre da terminale diamo il comando:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;pre class=&quot;brush: bash&quot;&gt;wakeonlan 11:22:33:44:55:66
&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;dove ovviamente 11:22:33:44:55:66 sarà l&#39;indirizzo MAC del pc che intendiamo accendere e il gioco è fatto. La risposta del programma sarà la seguente:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;pre class=&quot;brush: bash&quot;&gt;Sending magic packet to 255.255.255.255:9 with 11:22:33:44:55:66&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;e vedremo come per magia il pc accendersi automaticamente.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davide-targa.blogspot.com/feeds/3975022365676405126/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davide-targa.blogspot.com/2011/01/wake-on-lan-con-ubuntu.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/3975022365676405126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/3975022365676405126'/><link rel='alternate' type='text/html' href='http://davide-targa.blogspot.com/2011/01/wake-on-lan-con-ubuntu.html' title='Wake on lan con Ubuntu'/><author><name>Davide Targa</name><uri>http://www.blogger.com/profile/15144269461974653167</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJdzxuJJVzRQktf6wN7rCtgvccyvDaBfPqkKdhbrvBdVJyTHfHivBO6TI7tVRMZfEgCGWsYjQfNGFALbbZC3jjJedgHl5e9KkvnP8L8IuQDLOE2ov1Knc4KTBArbht9g/s220/Tux-G2.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIXYauNoM-T166ZnvW8cxnC04kyCX01yqChXA8ekfhWAUzwHavXkSQwh6DwYbCzl8a3YeQ2WmlcHEteox4Gdf16RMHnrW3ARvw9R5Grf794tCviwrrZxbAy2lLiACTQxCH679r-1ZQOWBC/s72-c/bios-wake-on-lan-2.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2787782429452998930.post-2070018825261513342</id><published>2011-01-18T12:28:00.000+01:00</published><updated>2011-01-18T12:28:51.308+01:00</updated><title type='text'>Traduzione in italiano della label &quot;Algorithm&quot; in LyX</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.lyx.org/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOLzZLinkfrmzGEcaMwk7q4Hwe8aDE2Qw8GUbn0I8L9lH9NTev9dEaBrrH6YihkSJnbDfH8JDcHM4u2ug73p92cOXuEXrrbJsJcgJrKpMZzyjaOTLPgR_vU7Ef77Pp0XDe1lZdeb-qd0at/s1600/lyx-logo.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Durante la stesura di un documento in &lt;a href=&quot;http://www.lyx.org/&quot;&gt;LyX&lt;/a&gt;, sia essa una semplice relazione, oppure una tesi, può capitare di dovere inserire il listato di un programma. Per fare questo si seleziona il menu &lt;i&gt;Inserisci &amp;gt; Oggetti flottanti &amp;gt; Algoritmo&lt;/i&gt;. Dall&#39;interno della nuova area creata, selezioniamo quindi la voce&amp;nbsp;&lt;i&gt;listato di programma &lt;/i&gt;dal menu &lt;i&gt;Inserisci&lt;/i&gt;&amp;nbsp;e si procede alla scrittura del codice che ci interessa e dell&#39;eventuale didascalia.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Procedendo poi con la compilazione, scopriamo l&#39;amara sorpresa: nel file &lt;i&gt;.pdf&lt;/i&gt;&amp;nbsp;generato, la label è in inglese!&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP2-e2QPoAwq4CXVSc4aE6IQ7JN63MWoYc_RgQGX8GeF1sNtLTIeB1BEwZ4MDRuz2BCMjGl_4pP_5XSoWJIpTGhHe5iGsZNusCCl8us4kNghAiOBxpSr_7Ak5rnOt8BcU9_lD2grYxWmRD/s1600/wrong.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;120&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP2-e2QPoAwq4CXVSc4aE6IQ7JN63MWoYc_RgQGX8GeF1sNtLTIeB1BEwZ4MDRuz2BCMjGl_4pP_5XSoWJIpTGhHe5iGsZNusCCl8us4kNghAiOBxpSr_7Ak5rnOt8BcU9_lD2grYxWmRD/s320/wrong.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Listato di esempio con label in inglese.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;La soluzione del problema è più semplice di quanto si possa pensare. Andiamo nel menu &lt;i&gt;Documento &amp;gt; Impostazioni &lt;/i&gt;e nella nuova finestra selezioniamo dalla parte sinistra la voce &lt;i&gt;Preambolo di LaTeX&lt;/i&gt;. Nella parte destra della finestra possiamo inserire il nostro preambolo LaTeX personalizzato. Inseriamo quindi il seguente codice:&lt;/div&gt;&lt;pre class=&quot;brush: bash&quot;&gt;\usepackage{algorithmic}
\floatname{algorithm}{Listato}&lt;/pre&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In questo caso ho scelto di sostituire la parola &lt;i&gt;&quot;Algorithm&quot;&lt;/i&gt;&amp;nbsp;con &lt;i&gt;&quot;Listato&quot;&lt;/i&gt;&amp;nbsp;perchè la ritenevo più adeguata alla trattazione del documento che stavo scrivendo. Naturalmente la scelta è del tutto soggettiva ed è sufficiente modificare il contenuto dell&#39;ultima coppia di parentesi graffe per adattare l&#39;output di &lt;a href=&quot;http://www.lyx.org/&quot;&gt;LyX&lt;/a&gt; alle proprie necessità.&lt;/div&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi0QGR0HLxFGb9-QMRwF2q9pKEH3-_B4HGQJJTIzdOVn3tfEPz4oBJnkoXtjdhUqO5YxJa41dhED-AS1V4j3Zj9KqzDVXE674ScQvGld0B0sddJ7gqIAIeEjwbFS7HDf_8UAVPX2cE8-Ph/s1600/solution.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi0QGR0HLxFGb9-QMRwF2q9pKEH3-_B4HGQJJTIzdOVn3tfEPz4oBJnkoXtjdhUqO5YxJa41dhED-AS1V4j3Zj9KqzDVXE674ScQvGld0B0sddJ7gqIAIeEjwbFS7HDf_8UAVPX2cE8-Ph/s1600/solution.png&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;La soluzione al problema della label.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Facciamo quindi click su &lt;i&gt;Applica &lt;/i&gt;e poi su &lt;i&gt;Chiudi&lt;/i&gt;. A questo punto proviamo a compilare nuovamente il file e a generare il &lt;i&gt;pdf&lt;/i&gt;&amp;nbsp;per verificare il risultato ottenuto.&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: justify;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix15QEun4G4Lfj3Rzp9STx1Uf1LkPyzK2H2jqhnLyS9YvtLrSl6bSGiFk1af-M2Uu9s8Q7JfJK6lVfW39sP8BZqVanhlh6K3h0GMGkIn8NXhHvhRkuWvnW9iixGhBHNRG1R1rkUtjJLZgh/s1600/right.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;121&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix15QEun4G4Lfj3Rzp9STx1Uf1LkPyzK2H2jqhnLyS9YvtLrSl6bSGiFk1af-M2Uu9s8Q7JfJK6lVfW39sP8BZqVanhlh6K3h0GMGkIn8NXhHvhRkuWvnW9iixGhBHNRG1R1rkUtjJLZgh/s320/right.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Listato corretto con label in italiano.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Il problema è causato dal fatto che la traduzione in italiano di &lt;a href=&quot;http://www.lyx.org/&quot;&gt;LyX&lt;/a&gt; non è completa al 100%. In ogni caso, per tradurre anche altre label che si comportano allo stesso modo (Teorema, Lemma, ecc...), il tipo di approccio da adottare è sempre lo stesso.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davide-targa.blogspot.com/feeds/2070018825261513342/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davide-targa.blogspot.com/2011/01/traduzione-in-italiano-della-label.html#comment-form' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/2070018825261513342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/2070018825261513342'/><link rel='alternate' type='text/html' href='http://davide-targa.blogspot.com/2011/01/traduzione-in-italiano-della-label.html' title='Traduzione in italiano della label &quot;Algorithm&quot; in LyX'/><author><name>Davide Targa</name><uri>http://www.blogger.com/profile/15144269461974653167</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJdzxuJJVzRQktf6wN7rCtgvccyvDaBfPqkKdhbrvBdVJyTHfHivBO6TI7tVRMZfEgCGWsYjQfNGFALbbZC3jjJedgHl5e9KkvnP8L8IuQDLOE2ov1Knc4KTBArbht9g/s220/Tux-G2.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOLzZLinkfrmzGEcaMwk7q4Hwe8aDE2Qw8GUbn0I8L9lH9NTev9dEaBrrH6YihkSJnbDfH8JDcHM4u2ug73p92cOXuEXrrbJsJcgJrKpMZzyjaOTLPgR_vU7Ef77Pp0XDe1lZdeb-qd0at/s72-c/lyx-logo.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2787782429452998930.post-7522817648096375704</id><published>2010-12-14T02:05:00.002+01:00</published><updated>2011-04-29T11:05:42.382+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails"/><title type='text'>How to send a dinamically generated file in a Rails 3 application</title><content type='html'>Sometimes can be useful to send a file to the user instead of rendering a page. When you have a fixed location for the file you simply achieve this with a link to the file inside the view, but there may be some cases in wich you have to dinamically generate the file to send. To do this you have to add a new custom action to the controller in wich you want to add the download.&lt;br /&gt;
In this example I suppose to have a simple blog application where the user can download the content of a post in text format. So, in the posts controller we add the following action:&lt;br /&gt;
&lt;pre class=&quot;brush: ruby&quot;&gt;class PostsController &amp;lt; ApplicationController

...

def download
  @post = Post.find(params[:id])
  send_data @post.body, :filename =&amp;gt; @post.title
end

...

end
&lt;/pre&gt;After this we have to add a new line into our config/routes.rb file to make this action accessible with a get request:&lt;br /&gt;
&lt;pre class=&quot;brush: ruby&quot;&gt;...
resources :posts do
  member do
    get &#39;download&#39;
  end
end
...
&lt;/pre&gt;Now we can add a simple link in our view:&lt;br /&gt;
&lt;pre class=&quot;brush: ruby&quot;&gt;&amp;lt;%= link_to &#39;Download&#39;, download_post_path(@post), :title =&amp;gt; &#39;Download post&#39; %&amp;gt;
&lt;/pre&gt;Here we suppose to have the instance variable @post created somewhere (i.e. in the show action).&lt;br /&gt;
Now we can display our page and download the post as a text file.&lt;br /&gt;
Hope this helps, have fun with Ruby on Rails!</content><link rel='replies' type='application/atom+xml' href='http://davide-targa.blogspot.com/feeds/7522817648096375704/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davide-targa.blogspot.com/2010/12/how-to-send-dinamically-generated-file.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/7522817648096375704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/7522817648096375704'/><link rel='alternate' type='text/html' href='http://davide-targa.blogspot.com/2010/12/how-to-send-dinamically-generated-file.html' title='How to send a dinamically generated file in a Rails 3 application'/><author><name>Davide Targa</name><uri>http://www.blogger.com/profile/15144269461974653167</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJdzxuJJVzRQktf6wN7rCtgvccyvDaBfPqkKdhbrvBdVJyTHfHivBO6TI7tVRMZfEgCGWsYjQfNGFALbbZC3jjJedgHl5e9KkvnP8L8IuQDLOE2ov1Knc4KTBArbht9g/s220/Tux-G2.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2787782429452998930.post-220755049997448874</id><published>2010-11-17T11:50:00.006+01:00</published><updated>2011-04-29T11:05:10.813+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>PUF: a wget-like url fetcher</title><content type='html'>PUF stands for parallel url fetcher is a beautyful download tool for UNIX-like systems. It is similar to GNU wget, but with puf you have the ability to download many files in parallel. To install it on Debian-based linux (like Ubuntu) simply type to the command line:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;sudo apt-get install puf
&lt;/pre&gt;The usage is very simple. For example, to download many files in parallel, you should type:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;puf file1 file2 file3
&lt;/pre&gt;and so on...&lt;br /&gt;
More info: &lt;a href=&quot;http://sourceforge.net/projects/puf/&quot;&gt;http://sourceforge.net/projects/puf/&lt;/a&gt; or simply by typing from the terminal:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;man puf
&lt;/pre&gt;&lt;br /&gt;
Enjoy!</content><link rel='replies' type='application/atom+xml' href='http://davide-targa.blogspot.com/feeds/220755049997448874/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davide-targa.blogspot.com/2010/11/puf-wget-like-url-fetcher.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/220755049997448874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/220755049997448874'/><link rel='alternate' type='text/html' href='http://davide-targa.blogspot.com/2010/11/puf-wget-like-url-fetcher.html' title='PUF: a wget-like url fetcher'/><author><name>Davide Targa</name><uri>http://www.blogger.com/profile/15144269461974653167</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJdzxuJJVzRQktf6wN7rCtgvccyvDaBfPqkKdhbrvBdVJyTHfHivBO6TI7tVRMZfEgCGWsYjQfNGFALbbZC3jjJedgHl5e9KkvnP8L8IuQDLOE2ov1Knc4KTBArbht9g/s220/Tux-G2.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2787782429452998930.post-2255465053064319949</id><published>2010-11-11T17:35:00.003+01:00</published><updated>2011-04-29T11:04:52.665+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails"/><category scheme="http://www.blogger.com/atom/ns#" term="validations"/><title type='text'>Case insensitive uniqueness validation in rails 3</title><content type='html'>The default uniqueness validation (using sexy validations) in Rails 3 is case sensitive. This means that if you wrote the following class, with the following validation:&lt;br /&gt;
&lt;pre class=&quot;brush: ruby&quot;&gt;Class User &amp;lt; ActiveRecord::Base

  validates :username, :presence =&amp;gt; true, :uniqueness =&amp;gt; true

end
&lt;/pre&gt;these usernames will pass the validation and will be stored in the database:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;foo, Foo, fOo, fOO, ...
&lt;/pre&gt;To avoid this problem you should make a change to the previous model in order to make the uniqueness validation case insensitive. To acheive this you have to pass an hash of parameters to the uniqueness validator. The new code may look like this:&lt;br /&gt;
&lt;pre class=&quot;brush: ruby&quot;&gt;Class User &amp;lt; ActiveRecord::Base

  validates :username, :presence =&amp;gt; true, :uniqueness =&amp;gt; {:case_sensitive =&amp;gt; false}

end
&lt;/pre&gt;Hope this helps :)</content><link rel='replies' type='application/atom+xml' href='http://davide-targa.blogspot.com/feeds/2255465053064319949/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davide-targa.blogspot.com/2010/11/case-insensitive-uniqueness-validation.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/2255465053064319949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/2255465053064319949'/><link rel='alternate' type='text/html' href='http://davide-targa.blogspot.com/2010/11/case-insensitive-uniqueness-validation.html' title='Case insensitive uniqueness validation in rails 3'/><author><name>Davide Targa</name><uri>http://www.blogger.com/profile/15144269461974653167</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJdzxuJJVzRQktf6wN7rCtgvccyvDaBfPqkKdhbrvBdVJyTHfHivBO6TI7tVRMZfEgCGWsYjQfNGFALbbZC3jjJedgHl5e9KkvnP8L8IuQDLOE2ov1Knc4KTBArbht9g/s220/Tux-G2.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2787782429452998930.post-3966293525951518383</id><published>2010-10-28T21:38:00.002+02:00</published><updated>2011-04-29T11:04:37.354+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails"/><category scheme="http://www.blogger.com/atom/ns#" term="rvm"/><title type='text'>Install Ruby Version Manager (RVM) on Ubuntu Lucid/Maverick</title><content type='html'>RVM is a command line tool which allows us to easily install, manage and  work with multiple ruby environments from interpreters to sets of gems. In order to install RVM you need a few packages:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;sudo apt-get install build-essential curl zlib1g-dev
libreadline5-dev libssl-dev libxml2-dev&lt;/pre&gt;Now you need to install a temporary version of ruby and rubygems. This version will be used to install the rvm gem.&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;sudo apt-get install ruby1.8 rubygems1.8&lt;/pre&gt;After the installation is completed you can install the rvm gem with the command:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;sudo gem install rvm&lt;/pre&gt;To complete the installation now run:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;/var/lib/gems/1.8/bin/rvm-install&lt;/pre&gt;As the last step you have to add the following line to the file .bashrc in your home. So edit it with your favourite editor or create it if it doesn&#39;t exist.&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;[[ -s &quot;$HOME/.rvm/scripts/rvm&quot; ]] &amp;amp;&amp;amp; . &quot;$HOME/.rvm/scripts/rvm&quot;  # This loads RVM into a shell session.
&lt;/pre&gt;To verify the installation, type rvm -v and the output should be the following:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;$ rvm -v
rvm 1.0.15 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]&lt;/pre&gt;Now to install ruby inside rvm use the simple command:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;$ rvm install 1.9.2&lt;/pre&gt;&quot;1.9.2&quot; is the version of the ruby interpreter that you want to install. RVM automatically downloads the sources from the internet, compiles and install them. To set 1.9.2 as the default version use the command:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;rvm --default 1.9.2&lt;/pre&gt;Enjoy with ruby!</content><link rel='replies' type='application/atom+xml' href='http://davide-targa.blogspot.com/feeds/3966293525951518383/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davide-targa.blogspot.com/2010/10/install-ruby-version-manager-rvm-on.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/3966293525951518383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/3966293525951518383'/><link rel='alternate' type='text/html' href='http://davide-targa.blogspot.com/2010/10/install-ruby-version-manager-rvm-on.html' title='Install Ruby Version Manager (RVM) on Ubuntu Lucid/Maverick'/><author><name>Davide Targa</name><uri>http://www.blogger.com/profile/15144269461974653167</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJdzxuJJVzRQktf6wN7rCtgvccyvDaBfPqkKdhbrvBdVJyTHfHivBO6TI7tVRMZfEgCGWsYjQfNGFALbbZC3jjJedgHl5e9KkvnP8L8IuQDLOE2ov1Knc4KTBArbht9g/s220/Tux-G2.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2787782429452998930.post-8731507949536556594</id><published>2010-10-23T00:47:00.011+02:00</published><updated>2011-04-29T11:03:31.918+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="aptana"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails"/><title type='text'>Installing Aptana Studio 3.0 on Ubuntu Lucid/Maverick</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.aptana.com/products/studio3&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;62&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFbvW4bQNZ1dpx6rGN4mrDrzNul21Nf8xk35v5yeO87F03KiwnfC-BymujgzhoyqXd8FhO0BLnHNlPXtkjvl-q09BrVFtcSsuOkOVc4kerq78YZSnBWvJ92Kcn_nqgQhc7vzThGIYPEdjo/s200/aptana_studio.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div style=&quot;color: black;&quot;&gt;Aptana Studio is an open source integrated development environment (IDE) for building Ajax web applications. It includes support for JavaScript, HTML, DOM, and CSS with code-completion, outlining, JavaScript debugging, error and warning notification and integrated documentation.&lt;/div&gt;If you install the plugin version of the &lt;a href=&quot;http://www.aptana.com/products/studio3&quot;&gt;Aptana Studio IDE&lt;/a&gt; on an existing installation of &lt;a href=&quot;http://www.eclipse.org/&quot;&gt;eclipse&lt;/a&gt; done by the official ubuntu repository, the installation procedure may not work. To solve this problem you must install a few packages through the command line or through Synaptic. The packages you need to complete the installation of the plugin are:&lt;/div&gt;&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;eclipse-plugin-cvs&lt;/li&gt;
&lt;li&gt;eclipse-jdt&lt;/li&gt;
&lt;li&gt;eclipse-pde&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;So, the command you should give is:&lt;/div&gt;&lt;pre class=&quot;brush: bash&quot;&gt;sudo apt-get install eclipse-plugin-cvs eclipse-jdt eclipse-pde&lt;/pre&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;After this you can continue the installation. When the installer tells you that there may be software from unsafe software sources, answer yes to finish the installation.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;At the end you should restart Eclipse and you&#39;re done!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/0/0f/Aptana_Studio_Screenshot.png/800px-Aptana_Studio_Screenshot.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;242&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/0/0f/Aptana_Studio_Screenshot.png/800px-Aptana_Studio_Screenshot.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davide-targa.blogspot.com/feeds/8731507949536556594/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davide-targa.blogspot.com/2010/10/installing-aptana-studio-30-on-ubuntu.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/8731507949536556594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/8731507949536556594'/><link rel='alternate' type='text/html' href='http://davide-targa.blogspot.com/2010/10/installing-aptana-studio-30-on-ubuntu.html' title='Installing Aptana Studio 3.0 on Ubuntu Lucid/Maverick'/><author><name>Davide Targa</name><uri>http://www.blogger.com/profile/15144269461974653167</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJdzxuJJVzRQktf6wN7rCtgvccyvDaBfPqkKdhbrvBdVJyTHfHivBO6TI7tVRMZfEgCGWsYjQfNGFALbbZC3jjJedgHl5e9KkvnP8L8IuQDLOE2ov1Knc4KTBArbht9g/s220/Tux-G2.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFbvW4bQNZ1dpx6rGN4mrDrzNul21Nf8xk35v5yeO87F03KiwnfC-BymujgzhoyqXd8FhO0BLnHNlPXtkjvl-q09BrVFtcSsuOkOVc4kerq78YZSnBWvJ92Kcn_nqgQhc7vzThGIYPEdjo/s72-c/aptana_studio.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2787782429452998930.post-1412823712325643322</id><published>2010-10-18T14:43:00.012+02:00</published><updated>2011-04-29T11:03:51.771+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="rvm"/><title type='text'>L&#39;aggiornamento di rvm fallisce?</title><content type='html'>RVM è un tool a linea di comando che permette di installare, gestire e lavorare con più versioni di ruby in ambienti separati sia per l&#39;interprete che per le gem. Durante l&#39;aggiornamento di &lt;a href=&quot;http://rvm.beginrescueend.com/&quot;&gt;rvm&lt;/a&gt; può capitare che appaiano i seguenti messaggi di errore:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;$ rvm update
rvm 1.0.1 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]
info: fetching rvm-1.0.14.tar.gz
info: Extracting rvm-1.0.14.tar.gz ...
error: Error running &#39;gunzip &quot;/home/davide/.rvm/archives/rvm-1.0.14.tar.gz&quot; | tar xf - -C /home/davide/.rvm/src&#39;, please check /home/davide/.rvm/log/extract*.log
info: Installing rvm-1.0.14...
error: Error running &#39;builtin cd /home/davide/.rvm/src/rvm-1.0.14/ ; ./install&#39;, please check /home/davide/.rvm/log/install*.log&lt;/pre&gt;Il problema si risolve facilmente aggiungendo il parametro &quot;--head&quot; al precedente comando:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;rvm update --head&lt;/pre&gt;dopodichè l&#39;aggiornamento procederà regolarmente. Al termine della procedura di installazione è necessario dare il comando:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;$ rvm reload&lt;/pre&gt;per utilizzare la versione di rvm appena installata.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://rvm.beginrescueend.com/&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMoR2M2fgsP9ZcGV4NF7pzYQWfl3hGtG6ynWIIutYjEtHNR4SXFBlcecBdn-v1tZjElC2eW0NcLura9ayuGqCLIDsGwh0yI8PVm22MGXzxKF9f8JIUagW0yfHKu7XpBRWFB7vErlRntoG1/s200/rvm.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Info su rvm: &lt;a href=&quot;http://rvm.beginrescueend.com/&quot;&gt;http://rvm.beginrescueend.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;color: red;&quot;&gt;EDIT:&lt;/div&gt;Nelle ultime versioni di RVM, per effettuare l&#39;aggiornamento all&#39;ultime versione è necessario eseguire semplicemente il comando seguente:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;$ bash &amp;lt; &amp;lt;(curl -s https://rvm.beginrescueend.com/install/rvm)
&lt;/pre&gt;&lt;pre class=&quot;brush: bash&quot;&gt;$ rvm reload
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://davide-targa.blogspot.com/feeds/1412823712325643322/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://davide-targa.blogspot.com/2010/10/laggiornamento-di-rvm-fallisce.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/1412823712325643322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2787782429452998930/posts/default/1412823712325643322'/><link rel='alternate' type='text/html' href='http://davide-targa.blogspot.com/2010/10/laggiornamento-di-rvm-fallisce.html' title='L&#39;aggiornamento di rvm fallisce?'/><author><name>Davide Targa</name><uri>http://www.blogger.com/profile/15144269461974653167</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJdzxuJJVzRQktf6wN7rCtgvccyvDaBfPqkKdhbrvBdVJyTHfHivBO6TI7tVRMZfEgCGWsYjQfNGFALbbZC3jjJedgHl5e9KkvnP8L8IuQDLOE2ov1Knc4KTBArbht9g/s220/Tux-G2.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMoR2M2fgsP9ZcGV4NF7pzYQWfl3hGtG6ynWIIutYjEtHNR4SXFBlcecBdn-v1tZjElC2eW0NcLura9ayuGqCLIDsGwh0yI8PVm22MGXzxKF9f8JIUagW0yfHKu7XpBRWFB7vErlRntoG1/s72-c/rvm.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>