<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Michele&#039;s Blog &#187; hacks</title>
	<atom:link href="http://www.michelem.org/category/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michelem.org</link>
	<description>io, me e michele</description>
	<lastBuildDate>Mon, 30 Jan 2012 09:57:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>AWS EC2 Manage Snapshot Backup with PHP SDK</title>
		<link>http://www.michelem.org/2011/08/11/aws-ec2-manage-snapshot-backup-with-php-sdk/</link>
		<comments>http://www.michelem.org/2011/08/11/aws-ec2-manage-snapshot-backup-with-php-sdk/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 14:05:51 +0000</pubDate>
		<dc:creator>michele</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[snapshot]]></category>

		<guid isPermaLink="false">http://www.michelem.org/?p=1053</guid>
		<description><![CDATA[This is a simple script based upon AWS SDK PHP to manage volume&#8217;s snapshots. It simply create one snapshot per volume (once you run it) and delete snapshot older then 1 month. Please provide your personal information by copying config-sample.inc.php into config.inc.php. Run the script backup-snapshots.php with your CRON. For example: # Auto AWS Snapshots [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>This is a simple script based upon <a href="http://aws.amazon.com/sdkforphp/">AWS SDK PHP</a> to manage volume&#8217;s snapshots.</p>
<p>It simply create one snapshot per volume (once you run it) and delete snapshot older then 1 month.</p>
<p>Please provide your personal information by copying config-sample.inc.php into config.inc.php.</p>
<p>Run the script backup-snapshots.php with your CRON.</p>
<p>For example:</p>
<pre># Auto AWS Snapshots
00 08   * * *   /usr/bin/php /var/virtual/aws/backup-snapshots.php
00 22   * * *   /usr/bin/php /var/virtual/aws/backup-snapshots.php
00 12   * * 7   /usr/bin/php /var/virtual/aws/backup-snapshots.php</pre>
<p>Download <a href="https://github.com/michelem09/AWS-EC2-Manage-Snapshots-Backup">AWS EC2 Manage Snapshot Backup</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelem.org/2011/08/11/aws-ec2-manage-snapshot-backup-with-php-sdk/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Integrate WordPress functions on Magento</title>
		<link>http://www.michelem.org/2010/03/17/integrate-wordpress-functions-on-magento/</link>
		<comments>http://www.michelem.org/2010/03/17/integrate-wordpress-functions-on-magento/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 16:13:54 +0000</pubDate>
		<dc:creator>michele</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.michelem.org/?p=988</guid>
		<description><![CDATA[Per integrare tutte le funzioni di WordPress su Magento in modo da poter fare chiamate come wp_list_pages(), wp_list_categories() o la famosa WP_Query, basta far caricare WordPress da Magento prima che si carichi lui stesso (per evitare il sovrapporsi di header e funzioni varie). Aprite il file index.php di Magento, all&#8217;inzio inserite le due righe: define(&#039;WP_USE_THEMES&#039;, false); require(&#039;/&#60;you absolute path to wordpress root&#62;/wp-load.php&#039;); [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<div>
<p>Per integrare tutte le funzioni di <a href="/tag/wordpress">WordPress</a> su <a href="/tag/magento">Magento</a> in modo da poter fare chiamate come wp_list_pages(), wp_list_categories() o la famosa WP_Query, basta far caricare WordPress da Magento prima che si carichi lui stesso (per evitare il sovrapporsi di header e funzioni varie).</p>
<p>Aprite il file index.php di Magento, all&#8217;inzio inserite le due righe:</p>
<pre class="brush: php">
define(&#039;WP_USE_THEMES&#039;, false);
require(&#039;/&lt;you absolute path to wordpress root&gt;/wp-load.php&#039;);
</pre>
<div>Ora rimane solo un piccolo problema, sia WordPress che Magento usano una funzione per fare la traduzione delle frasi, questa funzione purtroppo si chiama allo stesso moto &#8220;__&#8221; (2 underscore attaccati), per questo Magento andra&#8217; in crisi (error redeclared function).</div>
<div>Per risolvere il problema basta andare ad aggiungere una condizione alla funzione di magento, nel file &#8220;app/code/core/Mage/Core/functions.php&#8221; fate diventare la funzione &#8220;__()&#8221; cosi&#8217;:</div>
<pre class="brush: php">
if (!function_exists(&#039;__&#039;)) {
function __() {
return Mage::app()-&gt;getTranslator()-&gt;translate(func_get_args();
}
}</pre>
<p>Ora siete in grado di usare tutte le funzioni WordPress all&#8217;interno dei template Magento senza dover fare nulla di piu&#8217;.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.michelem.org/2010/03/17/integrate-wordpress-functions-on-magento/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Apache2 / Worker / Fcgid / PHP5 on Debian Linux</title>
		<link>http://www.michelem.org/2010/02/22/apache2-worker-fcgid-php5-on-debian-linux/</link>
		<comments>http://www.michelem.org/2010/02/22/apache2-worker-fcgid-php5-on-debian-linux/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 13:56:39 +0000</pubDate>
		<dc:creator>michele</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[fcgid]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[multi-thread]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[worker]]></category>

		<guid isPermaLink="false">http://www.michelem.org/?p=961</guid>
		<description><![CDATA[Quando il tuo web server non riescie piu&#8217; a gestire le numerose richieste che gli arrivano da tutto il mondo, e&#8217; ora di pensare di cambiare gestione di Apache2 per qualcosa che richieda meno risorse e risulti piu&#8217; performante. La soluzione di usare Apache in modalita&#8217; &#8220;worker&#8221; (multi-threaded) invece di quella tradizionale &#8220;prefork&#8221; e&#8217; il [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>Quando il tuo web server non riescie piu&#8217; a gestire le numerose richieste che gli arrivano da tutto il mondo, e&#8217; ora di pensare di cambiare gestione di <strong>Apache2</strong> per qualcosa che richieda meno risorse e risulti piu&#8217; performante.</p>
<p>La soluzione di usare Apache in modalita&#8217; &#8220;<strong>worker</strong>&#8221; (multi-threaded) invece di quella tradizionale &#8220;prefork&#8221; e&#8217; il compromesso giusto per ottenere un ottimo web server.</p>
<p>il problema con il modulo &#8220;worker&#8221; e&#8217; che quest&#8217;ultimo non supporta il modulo nativo per Apache di PHP, per questo bisogna usare <strong>php5-cgi</strong> e <strong>fastcgi</strong> (fcgid).</p>
<p>Pochi semplici step vi aiuteranno a installare questa nuova modalita&#8217;.</p>
<p>iniziamo con installare i pacchetti giusti:</p>
<blockquote><p><code><br />
sudo apt-get install apache2-mpm-worker libapache2-mod-fcgid</code><br />
<code>sudo apt-get install php5-cgi php5-curl php5-gd php5-ldap php5-mysql php5-sqlite php5-xsl</code></p></blockquote>
<p>Ora disabilitiamo i vecchi moduli e abilitiamo i nuovi:</p>
<blockquote><p><code>sudo a2dismod php5</code></p>
<p><code>sudo a2enmod actions</code></p>
<p><code> </code><code>sudo a2enmod fcgid</code></p></blockquote>
<p>Non resta che dare le giuste direttive ad Apache, in apache2.conf:</p>
<blockquote><p><code>&lt;Directory /var/www&gt;<br />
AddHandler fcgid-script .php<br />
FCGIWrapper /usr/lib/cgi-bin/php5 .php<br />
&lt;/Directory&gt;</code></p></blockquote>
<p>E per ogni virtualhost dovrete aggiungere:</p>
<blockquote><p><code>Options +ExecCGI</code></p></blockquote>
<p>Ci sono diversi modi di configurare queste direttive potete trovarne altri ancora in giro per la rete <a href="http://www.google.com/search?hl=en&amp;source=hp&amp;q=apache2+fcgi+php5&amp;btnG=Google+Search&amp;aq=f&amp;oq=&amp;aqi=">cercando su Google</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelem.org/2010/02/22/apache2-worker-fcgid-php5-on-debian-linux/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>WordPress plugin for mobile touch device &amp; how to take iPod, iPhone screenshots</title>
		<link>http://www.michelem.org/2010/02/03/wordpress-plugin-for-mobile-touch-device-how-to-take-ipod-iphone-screenshots/</link>
		<comments>http://www.michelem.org/2010/02/03/wordpress-plugin-for-mobile-touch-device-how-to-take-ipod-iphone-screenshots/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 08:44:59 +0000</pubDate>
		<dc:creator>michele</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[screenshots]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[touch]]></category>
		<category><![CDATA[wptouch]]></category>

		<guid isPermaLink="false">http://www.michelem.org/?p=938</guid>
		<description><![CDATA[Navigando casualmente il blog di Antonio Tombolini sull&#8217;iPod touch aziendale che usiamo per le prove e le verifiche delle nostre (vedi Simplicissimus Book Farm) applicazioni ho scoperto con grande meraviglia questo bellissimo e utilissimo plugin per WordPress che ormai tutti dovrebbero adottare nel proprio blog. Il plugin in questione e&#8217; WPTouch che permette di trasformare [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>Navigando casualmente il <a href="http://antoniotombolini.simplicissimus.it/">blog di Antonio Tombolini</a> sull&#8217;iPod touch aziendale che usiamo per le prove e le verifiche delle nostre (vedi <a href="http://www.simplicissimus.it/">Simplicissimus Book Farm</a>) applicazioni ho scoperto con grande meraviglia questo bellissimo e utilissimo <a href="http://www.michelem.org/wordpress-plugins">plugin per WordPress</a> che ormai tutti dovrebbero adottare nel proprio blog.</p>
<p>Il plugin in questione e&#8217; <a href="http://www.bravenewcode.com/products/wptouch/"><strong>WPTouch</strong></a> che permette di trasformare il proprio blog in un esperienza usabile anche in condizioni &#8220;estreme&#8221; come la lettura da device con schermi ridotti e funzionalita&#8217; touch. Il plugin, pieno zeppo di opzioni e personalizzazioni varie, rende qualsiasi blog (non importa il tema che state usando) navigabile come fosse un&#8217;applicazione iPhone rendendolo stiloso e di grande effetto per coloro che usano questi device per leggerlo.</p>
<p>L&#8217;installazione e&#8217; come al solito semplicissima e come tutte le altre installazioni, non richiede particolari azioni se non quella di configurarlo tramite la propria pagina di amministrazione che si trova nelle impostazioni del proprio blog, sotto la voce WPTouh (strano eh?).</p>
<p>Se state usando altri plugin di caching come <a href="http://wordpress.org/extend/plugins/wp-super-cache/">WP Super Cache</a> o <a href="http://wordpress.org/extend/plugins/wp-cache/">WP Cache</a> attenzione perche&#8217; potreste avere problemi (il tema di WPTouch non viene abilitato quando navigate con device touch), io per risolvere questo problema e&#8217; bastato abilitare WPTouch e configurarlo, poi <strong>disabilitare</strong> la cache di WP Cache (tasto in alto &#8220;disable&#8221; nelle impostazioni di WP Cache) e semplicemente <strong>riabilitarla dopo averla ripulita</strong>.</p>
<p>Allego qualche screenshot di questo blog visto da un iPod touch perche&#8217; merita veramente, complimenti all&#8217;autore per questa piccola ma importantissima rivoluzione.</p>

<a href='http://www.michelem.org/2010/02/03/wordpress-plugin-for-mobile-touch-device-how-to-take-ipod-iphone-screenshots/photo/' title='L&#039;homepage dall&#039;iPhone/iPod'><img width="200" height="200" src="http://www.michelem.org/wp-content/uploads/2010/02/photo-200x200.jpg" class="attachment-thumbnail" alt="L&#039;homepage dall&#039;iPhone/iPod" title="L&#039;homepage dall&#039;iPhone/iPod" /></a>
<a href='http://www.michelem.org/2010/02/03/wordpress-plugin-for-mobile-touch-device-how-to-take-ipod-iphone-screenshots/photo-2/' title='Menu, tags e categorie'><img width="200" height="200" src="http://www.michelem.org/wp-content/uploads/2010/02/photo-2-200x200.jpg" class="attachment-thumbnail" alt="Menu, tags e categorie" title="Menu, tags e categorie" /></a>
<a href='http://www.michelem.org/2010/02/03/wordpress-plugin-for-mobile-touch-device-how-to-take-ipod-iphone-screenshots/photo-3/' title='Funzioni sociali'><img width="200" height="200" src="http://www.michelem.org/wp-content/uploads/2010/02/photo-3-200x200.jpg" class="attachment-thumbnail" alt="Funzioni sociali" title="Funzioni sociali" /></a>
<a href='http://www.michelem.org/2010/02/03/wordpress-plugin-for-mobile-touch-device-how-to-take-ipod-iphone-screenshots/photo-4/' title='Commenti dall&#039;iPhone/iPod'><img width="200" height="200" src="http://www.michelem.org/wp-content/uploads/2010/02/photo-4-200x200.jpg" class="attachment-thumbnail" alt="Commenti dall&#039;iPhone/iPod" title="Commenti dall&#039;iPhone/iPod" /></a>

<p>Quasi dimenticavo, per <strong><a href="http://www.michelem.org/2010/02/03/wordpress-plugin-for-mobile-touch-device-how-to-take-ipod-iphone-screenshots/">fare </a></strong><strong><a href="http://www.michelem.org/2010/02/03/wordpress-plugin-for-mobile-touch-device-how-to-take-ipod-iphone-screenshots/">uno screenshot del vostro iPod touch o iPhone</a></strong> non serve alcuna applicazione basta andare nella schermata che volete fotografare e mentre <strong>tenete premuto il tasto di spegnimento</strong> del device (quello in alto a sinistra su un iPod Touch) <strong>premete una volta l&#8217;altro unico tasto</strong> che esiste (si quello centrale in basso). Troverete gli screenshot del vostro device tra le foto.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelem.org/2010/02/03/wordpress-plugin-for-mobile-touch-device-how-to-take-ipod-iphone-screenshots/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>bbPress database integration on WordPress</title>
		<link>http://www.michelem.org/2009/05/09/bbpress-database-integration-on-wordpress/</link>
		<comments>http://www.michelem.org/2009/05/09/bbpress-database-integration-on-wordpress/#comments</comments>
		<pubDate>Sat, 09 May 2009 11:27:41 +0000</pubDate>
		<dc:creator>michele</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[stats]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.michelem.org/?p=901</guid>
		<description><![CDATA[Integrare i dati di un forum bbPress in WordPress e&#8217; estremamente semplice, soprattutto se il database e&#8217; lo stesso e cambia solo il prefix delle tabelle. Quindi se avete un blog WordPress con associato un forum bbPress bastera&#8217; creare delle corrette query nel template di WordPress per ottenere i dati del forum collegato. Per esempio, [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>Integrare i dati di un <strong>forum <a href="http://bbpress.org/">bbPress</a></strong> in WordPress e&#8217; estremamente semplice, soprattutto se il <strong>database</strong> e&#8217; lo stesso e cambia solo il prefix delle tabelle. Quindi se avete un blog <strong>WordPress</strong> con associato un forum bbPress bastera&#8217; creare delle corrette <strong>query</strong> nel template di WordPress per ottenere i <strong>dati</strong> del forum collegato.</p>
<p><strong>Per esempio, per ottenere la lista dei forums disponibli potete usare qualcosa come questo:</strong></p>
<pre class="brush: php">
&lt;h2&gt;Support Forums&lt;/h2&gt;
&lt;ul&gt;
&lt;?php
$bb_forums = $wpdb-&gt;get_results(
&quot;SELECT * FROM bb_forums ORDER BY topics DESC&quot;
);

foreach ($bb_forums as $bb_forum) {

print &quot;&lt;li&gt;&lt;a href=\&quot;/&quot;.$bb_forum-&gt;slug.&quot;\&quot;
title=\&quot;&quot;.$bb_forum-&gt;forum_name.&quot;\&quot;&gt;
&quot;.$bb_forum-&gt;forum_name.&quot;
&lt;/a&gt;&quot;.$bb_forum-&gt;forum_desc.&quot;&lt;/li&gt;&quot;;

}
?&gt;
&lt;/ul&gt;
</pre>
<p><strong>Oppure per visualizzare la lista degli ultimi 5 topic aggiornati:</strong></p>
<pre class="brush: php">
&lt;h2&gt;Latest Forum&#039;s Topics&lt;/h2&gt;
&lt;ul&gt;
&lt;?php
$bb_topics = $wpdb-&gt;get_results(
&quot;SELECT * FROM bb_topics ORDER BY topic_start_time DESC LIMIT 5&quot;);
$bb_posts = array();

foreach($bb_topics as $bb_topic){

$bb_first_post = $wpdb-&gt;get_results(
&quot;SELECT post_text FROM bb_posts
WHERE post_position = &#039;1&#039;
AND topic_id = $bb_topic-&gt;topic_id&quot;, ARRAY_A);

$bb_post-&gt;post_date = $bb_topic-&gt;topic_start_time;
$bb_post-&gt;post_title = $bb_topic-&gt;topic_title;
$bb_post-&gt;post_name = &quot;forums/topic/&quot;.$bb_topic-&gt;topic_slug;
$bb_post-&gt;comment_count = $bb_topic-&gt;topic_posts;

print &quot;&lt;li&gt;&lt;a href=\&quot;/&quot;.$bb_post-&gt;post_name.&quot;\&quot;
title=\&quot;&quot;.$bb_post-&gt;post_title.&quot;\&quot;&gt;&quot;.$bb_post-&gt;post_title.&quot;&lt;/a&gt;
&lt;br /&gt;&lt;a href=\&quot;/&quot;.$bb_post-&gt;post_name.&quot;\&quot;
title=\&quot;&quot;.$bb_post-&gt;post_title.&quot;\&quot; &gt;
&quot;.$bb_post-&gt;comment_count.&quot; comments&lt;/a&gt;
- &quot;.$bb_post-&gt;post_date.&quot;&lt;/li&gt;&quot;;

};
?&gt;
&lt;/ul&gt;
</pre>
<p>Potete vedere un esempio pratico nel sito di WassUp, il <strong><a href="http://www.wpwp.org">plugin WordPress per le statistiche</a></strong> che sviluppo e mantengo da tempo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelem.org/2009/05/09/bbpress-database-integration-on-wordpress/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Import/Synchronizing your imap email into Gmail with imapsync</title>
		<link>http://www.michelem.org/2009/03/13/importsynchronizing-your-imap-email-into-gmail-with-imapsync/</link>
		<comments>http://www.michelem.org/2009/03/13/importsynchronizing-your-imap-email-into-gmail-with-imapsync/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 08:54:49 +0000</pubDate>
		<dc:creator>michele</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[import]]></category>

		<guid isPermaLink="false">http://www.michelem.org/?p=889</guid>
		<description><![CDATA[- Installare &#8220;imapsync&#8221; (su Debian/Ubuntu &#8220;apt-get install imapsync&#8221;) - Procedere alla sincronizzazione con il seguente comando: imapsync --host1 my_mail_server --port1 143 \ --user1 changeme@yourdomain --password1 mypassword \ --host2 imap.gmail.com --port2 993 \ --user2 changeme@gmail.com --password2 mypassword \ --syncinternaldates --ssl2 --noauthmd5 --split1 100 --split2 100 - Se volete sincronizzare solo specifiche direcotry Imap bastera&#8217; aggiungere l&#8217;opzione [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>- Installare &#8220;imapsync&#8221; (su Debian/Ubuntu &#8220;apt-get install imapsync&#8221;)</p>
<p>- Procedere alla sincronizzazione con il seguente comando:</p>
<pre class="brush: bash">
imapsync --host1 my_mail_server --port1 143 \
--user1 changeme@yourdomain --password1 mypassword \
--host2 imap.gmail.com --port2 993 \
--user2 changeme@gmail.com --password2 mypassword \
--syncinternaldates --ssl2 --noauthmd5 --split1 100 --split2 100
</pre>
<p>- Se volete sincronizzare solo specifiche direcotry Imap bastera&#8217; aggiungere l&#8217;opzione <code>"--folder yourfolder"</code></p>
<p>- Se volete prima provare senza che nulla venga toccato aggiungete l&#8217;opzione <code>"--dry"</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelem.org/2009/03/13/importsynchronizing-your-imap-email-into-gmail-with-imapsync/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Increase VirtualBox disk size / Resizing vdi disk</title>
		<link>http://www.michelem.org/2009/03/11/increase-virtualbox-disk-size-resizing-vdi-disk/</link>
		<comments>http://www.michelem.org/2009/03/11/increase-virtualbox-disk-size-resizing-vdi-disk/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 16:23:31 +0000</pubDate>
		<dc:creator>michele</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[parted]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[vdi]]></category>
		<category><![CDATA[virtual]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.michelem.org/?p=884</guid>
		<description><![CDATA[Scenario: VirtualBox installato su macchina Linux, un virtuale Windows XP con disco da 4 GB che non basta piu&#8217;. Come faccio ad aumentare lo spazio del disco virtuale senza perdere tutto? - Creo un nuovo disco virtuale su VirtualBox piu&#8217; grande del precedente (non serve sia con dimensione fissa, dinamico andra&#8217; benissimo) - Collego il [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>Scenario:<br />
VirtualBox installato su macchina Linux, un virtuale Windows XP con disco da 4 GB che non basta piu&#8217;.<br />
Come faccio ad aumentare lo spazio del disco virtuale senza perdere tutto?</p>
<p>- Creo un nuovo disco virtuale su VirtualBox piu&#8217; grande del precedente (non serve sia con dimensione fissa, dinamico andra&#8217; benissimo)</p>
<p>- Collego il <strong>nuovo disco virtuale</strong> alla macchina Windows XP in modo che lo veda anche lei</p>
<p>- Scarico una qualunque ISO Live di un sistema Linux, l&#8217;importante e&#8217; che abbia <strong>gparted</strong> (o parted se vi basta la console)</p>
<p>- Avvio la macchina virtuale Windows XP con il <strong>CD collegato alla ISO Live Linux</strong> appena scaricata</p>
<p>- una volta su Linux faccio partire <strong>X</strong> ed apro gparted</p>
<p>- Seleziono il disco (solitamente targato come &#8220;sda&#8221;) primario di Windows e clicclo su &#8220;<strong>Copia</strong>&#8220;</p>
<p>- Seleziono il disco secondario, appena creato da VirtualBox, e clicco su &#8220;<strong>Incolla</strong>&#8220;</p>
<p>- Clicclo &#8220;Applica&#8221; e ora bastera&#8217; attendere che tutti i dati del disco A vengano copiati sul disco B</p>
<p>- Al termine dell&#8217;operazione seleziono il disco B e attivo il flag &#8220;Bootable&#8221;</p>
<p>- Spengo la macchina virtuale</p>
<p>- Scollego il cd dalla ISO Live</p>
<p>- dico a VirtualBox di usare il disco B come disco master primario</p>
<p>- Ed ecco partire il vecchio Windows XP ma su un disco molto piu&#8217; grande</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelem.org/2009/03/11/increase-virtualbox-disk-size-resizing-vdi-disk/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Groundwork/Nagios &amp; NSCAFE Plugin: How to work with passive checks</title>
		<link>http://www.michelem.org/2009/02/13/groundworknagios-nscafe-plugin-how-to-work-with-passive-checks/</link>
		<comments>http://www.michelem.org/2009/02/13/groundworknagios-nscafe-plugin-how-to-work-with-passive-checks/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 10:52:30 +0000</pubDate>
		<dc:creator>michele</dc:creator>
				<category><![CDATA[about michele]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[groundwork]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.michelem.org/?p=879</guid>
		<description><![CDATA[Scaricate e seguite le istruzioni del pacchetto nscafe_1.0.tar, in linea di massima dovreste riuscire a disabilitare nsca e abilitare nscafe, ricordatevi di sostituire le righe nel file /usr/local/groundwork/ctlscript.sh per fare questo. Ora il punto fondamentale per attivare i passive check tra un Nagios che fa il polling di una rete e un Nagios master che [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>Scaricate e seguite le istruzioni del pacchetto<strong> <a href="http://nagiosexchange.altinity.org/nagiosexchange/NSCAFE_-_a_forwarding_version_of_NSCA/nscafe_1.0.tar">nscafe_1.0.tar</a></strong>, in linea di massima dovreste riuscire a disabilitare nsca e abilitare nscafe, ricordatevi di sostituire le righe nel file /usr/local/groundwork/ctlscript.sh per fare questo.</p>
<p>Ora il punto fondamentale per attivare i <strong>passive check</strong> tra un Nagios che fa il polling di una rete e un Nagios master che amministra il tutto sta nel far dialogare questi due (o piu&#8217;) server.<br />
Una volta messo in piedi il demone di nscafe il tutto sta nel configurare Nagios ad hoc. Per configurare nscafe riporto sotto le conf sia per un polling server che per un master:</p>
<p><strong>Polling server</strong> (inoltra i check al master):</p>
<blockquote><p><code>debug=0<br />
forward=1<br />
nagios=1<br />
listener_port=5668<br />
allowed_hosts=*<br />
client_inactivity_timeout=10<br />
nagios_command_file=/usr/local/groundwork/nagios/var/spool/nagios.cmd<br />
forward_host=&lt;IPADDRESS_MASTER_SERVER&gt;<br />
forward_port=5668<br />
forward_queue_directory=/usr/local/groundwork/nscafe<br />
forward_purge_queue_on_entry=1</code></p></blockquote>
<p><strong>Master server</strong> (riceve i check da altri polling server)</p>
<blockquote><p><code>debug=0<br />
forward=0<br />
nagios=1<br />
listener_port=5668<br />
allowed_hosts=*<br />
client_inactivity_timeout=10<br />
nagios_command_file=/usr/local/groundwork/nagios/var/spool/nagios.cmd</code></p></blockquote>
<p>L&#8217;ultima cosa da fare e&#8217; configurare Nagios sul polling server perche&#8217; mandi i messaggi di controllo, in pratica c&#8217;e&#8217; da modificare un paio di righe del nagios.cfg e creare un paio di nuovi comandi.</p>
<p>Prima di tutto create i due nuovi comandi per l&#8217;inoltro degli host e dei servizi:</p>
<p>Su Groudwork: <strong>Configuration-&gt;Commands-&gt;New</strong></p>
<blockquote><p><strong>Host</strong>:</p>
<p><code>Command name: <em>process-host-perfdata-nscafe </em><br />
Type: <em>Other</em><br />
Command: <em>/usr/local/groundwork/nscafe/script/nscafe_perfdata_handler.pl<br />
HOST "$HOSTNAME$" "$LASTHOSTCHECK$" "$HOSTSTATE$" "$HOSTOUTPUT$" "$HOSTPERFDATA$"</em></code></p></blockquote>
<blockquote><p><strong>Service</strong>:</p>
<p><code>Command name:<em> process-service-perfdata-nscafe </em><br />
Type: <em>Other</em><br />
Command: <em>/usr/local/groundwork/nscafe/script/nscafe_perfdata_handler.pl<br />
SERVICE "$HOSTNAME$" "$SERVICEDESC$" "$LASTSERVICECHECK$" "$SERVICESTATE$"<br />
"$SERVICEOUTPUT$" "$SERVICEPERFDATA$"</em></code></p></blockquote>
<p>Ora associamo questi due nuovi comandi alla configurazione generale di Nagios.</p>
<p>Su Groundwork: <strong>Configuration-&gt;Control-&gt;Nagios main configuration</strong>:</p>
<blockquote><p>Host perfdata command: <em>Selezionate &#8220;process-host-perfdata-nscafe&#8221;</em></p>
<p>Service perfdata command: <em>Selezionate &#8220;process-service-perfdata-nscafe&#8221;</em></p></blockquote>
<p>Ricordatevi di dare il commit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelem.org/2009/02/13/groundworknagios-nscafe-plugin-how-to-work-with-passive-checks/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Screen rotation on ATI Radeon card with xrandr</title>
		<link>http://www.michelem.org/2009/01/19/screen-rotation-on-ati-radeon-card-with-xrandr/</link>
		<comments>http://www.michelem.org/2009/01/19/screen-rotation-on-ati-radeon-card-with-xrandr/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 11:41:13 +0000</pubDate>
		<dc:creator>michele</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[ati]]></category>
		<category><![CDATA[card]]></category>
		<category><![CDATA[graphic]]></category>
		<category><![CDATA[radeon]]></category>
		<category><![CDATA[rotation]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[xrandr]]></category>

		<guid isPermaLink="false">http://www.michelem.org/?p=874</guid>
		<description><![CDATA[Prima di tutto e&#8217; indispensabile installare gli ultimi driver ATI disponibili (al momento il file si chiama ati-driver-installer-8-12-x86.x86_64.run). Installati i driver, va lanciato l&#8217;inserimento dei moduli nel kernel: modprobe fglrx Infine va abilitato il support a RandR per poter modificare al volo il layout dello schermo, cosi&#8217; come la sua rotazione e molte altre cose. [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>Prima di tutto e&#8217; indispensabile installare gli ultimi driver <strong>ATI</strong> disponibili (al momento il file si chiama <strong>ati-driver-installer-8-12-x86.x86_64.run</strong>).</p>
<p>Installati i driver, va lanciato l&#8217;inserimento dei moduli nel kernel:</p>
<blockquote><p><code>modprobe fglrx</code></p></blockquote>
<p>Infine va abilitato il support a <strong>RandR</strong> per poter modificare al volo il layout dello schermo, cosi&#8217; come la sua rotazione e molte altre cose.</p>
<blockquote><p><code>aticonfig --set-pcs-str="DDX,EnableRandr12,TRUE"</code></p></blockquote>
<p>A questo punto saremo pronti per effettuare tutte le modifiche che vogliamo. Assicuratevi che X sia partito e da un terminale lanciamo una query con xrandr:</p>
<blockquote><p><code>xrandr -q -d :0</code></p></blockquote>
<p>L&#8217;output sara&#8217; qualcosa di simile a questo:</p>
<blockquote><p>Screen 0: minimum 320 x 200, current 640 x 480, maximum 1600 x 1600<br />
LCD connected 640&#215;480+0+0 (normal left inverted right x axis y axis) 400mm x 300mm<br />
640&#215;480Â Â Â Â Â Â Â  60.0*+<br />
640&#215;400Â Â Â Â Â Â Â  60.0<br />
512&#215;384Â Â Â Â Â Â Â  60.0<br />
400&#215;300Â Â Â Â Â Â Â  60.0<br />
320&#215;240Â Â Â Â Â Â Â  60.0<br />
320&#215;200Â Â Â Â Â Â Â  60.0<br />
DFP_EXTTMDS disconnected (normal left inverted right x axis y axis)<br />
CRT1 connected 640&#215;480+0+0 (normal left inverted right x axis y axis) 0mm x 0mm<br />
1600&#215;1200Â Â Â Â Â  60.0 +<br />
1400&#215;1050Â Â Â Â Â  60.0<br />
1280&#215;1024Â Â Â Â Â  60.0Â Â Â Â  47.0Â Â Â Â  43.0<br />
1440&#215;900Â Â Â Â Â Â  59.9<br />
1280&#215;960Â Â Â Â Â Â  60.0<br />
1152&#215;864Â Â Â Â Â Â  60.0Â Â Â Â  47.0Â Â Â Â  43.0<br />
1280&#215;768Â Â Â Â Â Â  59.9<br />
1280&#215;720Â Â Â Â Â Â  60.0<br />
1024&#215;768Â Â Â Â Â Â  60.0Â Â Â Â  60.0Â Â Â Â  43.5<br />
800&#215;600Â Â Â Â Â Â Â  60.3Â Â Â Â  60.3Â Â Â Â  56.2Â Â Â Â  47.0<br />
720&#215;480Â Â Â Â Â Â Â  60.0<br />
640&#215;480Â Â Â Â Â Â Â  60.0*<br />
640&#215;400Â Â Â Â Â Â Â  59.9<br />
512&#215;384Â Â Â Â Â Â Â  60.0<br />
400&#215;300Â Â Â Â Â Â Â  60.7<br />
320&#215;240Â Â Â Â Â Â Â  60.0<br />
320&#215;200Â Â Â Â Â Â Â  60.1</p></blockquote>
<p>Noterete subito le varie opzioni possibili, per effettuare qualche cambiamento al volo bastera&#8217; interagire con il comando xrandr, se per esempio vorremo <strong>ruotare lo schermo di 90Â°</strong> bastera&#8217; lanciare il seguente comando:</p>
<blockquote><p><code>xrandrÂ  --output CRT1 --rotate left -d :0</code></p></blockquote>
<p>E il gioco e&#8217; fatto :) Per approfondire consiglio la lettura del wiki <a href="http://www.thinkwiki.org/wiki/Xorg_RandR_1.2">Xorg RandR 1.2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelem.org/2009/01/19/screen-rotation-on-ati-radeon-card-with-xrandr/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Slax la distro live portabile e altamente configurabile</title>
		<link>http://www.michelem.org/2009/01/13/slax-la-distro-live-portabile-e-altamente-configurabile/</link>
		<comments>http://www.michelem.org/2009/01/13/slax-la-distro-live-portabile-e-altamente-configurabile/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 15:14:42 +0000</pubDate>
		<dc:creator>michele</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[cd]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[ext3]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[hdd]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[lcd]]></category>
		<category><![CDATA[live]]></category>
		<category><![CDATA[pico]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[slax]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[xfs]]></category>

		<guid isPermaLink="false">http://www.michelem.org/?p=855</guid>
		<description><![CDATA[Slax e&#8217; una distribuzione Linux basataÂ  su Slackware 12 che riesce a partire da qualsiasi supporto bootabile in appena 190MB. E&#8217; un&#8217;ottima distribuzione sopratutto per chi sta cercando qualcosa di facilmente personalizzabile e semplice da usare. Io in particolare la sto usando per un progetto lavorativo che mi vede impegnato nella creazione e configurazione di [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p><a href="http://www.slax.org/"><strong>Slax</strong></a> e&#8217; una distribuzione <a href="tag/linux">Linux</a> basataÂ  su Slackware 12 che riesce a partire da qualsiasi supporto bootabile in appena 190MB.</p>
<p>E&#8217; un&#8217;ottima distribuzione sopratutto per chi sta cercando qualcosa di facilmente personalizzabile e semplice da usare. Io in particolare la sto usando per un progetto lavorativo che mi vede impegnato nella creazione e configurazione di un sistema Linux ad-hoc che giri su un ridottissimo hardware collegato a schermi LCD giganti.<br />
Un po&#8217; quello che vedete in giro per i centri commerciali o negli Autogrill, avete presente quegli enormi LCD che visualizzano le informazioni sul traffico, il meteo e le ultime notizie in tempo reale? Ecco il mio progetto e&#8217; qualcosa di molto simile.</p>
<p>Ho deciso di basarlo su Slax perche&#8217; l&#8217;ho trovata piacevolmente adatta a tale lavoro. Slax e&#8217; <strong>modulare</strong>, si puo&#8217; decidere quali moduli farle caricare per ottenere sistemi piu&#8217; o meno complessi ma la cosa veramente entusiasmante e&#8217; la facilita&#8217; con la quale si puo&#8217; estendere, clonare e riusare praticamente ovunque dai supporti meno convenzionali come le <strong>DOM</strong> a 44 pin (Disk On Module) alle piu&#8217; comuni chiavette <strong>USB</strong> fino ai classici <strong>HDD</strong> (sata/ide), e tutto sempre con la stessa <strong>immagine ISO</strong> senza cambiare una virgola. Anche l&#8217;hardware sul quale farla girare non dovra&#8217; avere alcun particolare requisito, di default ho provato che parte piuttosto bene su diversi tipi di schede madri e cpu oltre a supportare una vastissima quantita&#8217; di device piu&#8217;o meno conosciuti senza l&#8217;aggiunta o la scocciatura della compilazione di driver esterni o peggio kernel interi.</p>
<p>Slax impressiona per la sua enorme <strong>compatibilita</strong>&#8216;, attualmente la sto configurando su sistemi <a href="http://en.wikipedia.org/wiki/Pico-ITX"><strong>Pico-ITX</strong></a>, hardware ridotto al minimo nelle dimensioni ma non certo nelle prestazioni, se poi pensate che senza toccare nulla schede wireless, webcam, audio e quant&#8217;altro funzionano &#8220;al volo&#8221;, beh lo stupore e&#8217; d&#8217;obbligo.</p>
<p>Il caricamento di Slax su un qualsiasi supporto storage e&#8217; alquanto semplice, una volta scaricata e decompressa si presentano due directory: <strong>boot</strong> e <strong>slax</strong>.</p>
<p>La directory boot e&#8217; quella che contiene <strong>bootloader</strong> e <strong>kernel</strong> mentre la directory slax e&#8217; quella che contiene moduli aggiuntivi, il sistema vero e proprio e una directory &#8220;<strong>changes</strong>&#8221; nella quale vengono scritte tutte le modifiche che mano a mano vengono apportate al sistema una volta lanciato.</p>
<p>Quando la vostra distribuzione vi sembra matura e stabile bastera&#8217; semplicemente montare la partizione contenente Slax e lanciare lo script per la creazione automatica dell&#8217;immagine ISO, a quel punto potrete ri-distribuirla ovunque con pochi e semplici passi.</p>
<p>Lo sviluppatore consiglia, inizialmente, di formattare il vostro supporto in FAT32, copiare le directory boot e slax al suo interno e lanciare lo script che carica il bootloader nell&#8217;MBR del supporto.<br />
Io dopo averci lavorato per parecchie settimane posso dire che la partizione FAT32 si corrompe molto facilmente (soprattutto se usata su chiavette USB) e dopo svariati usi del sistema prima o poi si dovra&#8217; per forza ricrearlo da zero (partendo dalla ISO creata come backup).<br />
Molto scomodo e poco usabile, per questo da poco ho deciso di passare a una partizione <strong>EXT3</strong> anche per il supporto principale, da quel momento tutto il sistema e&#8217; diventato molto piu&#8217; stabile (ma si puo&#8217; usare anche un filesystem <strong>XFS</strong> volendo)</p>
<p>Insomma Slax e&#8217; qualcosa che mancava nel panorama delle distribuzioni Linux e permette anche al sistemista junior di crearsi la sua personalissima distribuzione senza doversi sforzare troppo nell&#8217;intento di mettere tutti i pezzi al loro posto, per quello ci pensa Slax, voi dovrete solo apportare le vostre, spesso banali, modifiche, e il gioco e&#8217; fatto.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelem.org/2009/01/13/slax-la-distro-live-portabile-e-altamente-configurabile/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 1773/2050 objects using disk: basic

Served from: www.michelem.org @ 2012-02-10 12:48:35 -->
