<?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>CookedApple &#187; Mac</title>
	<atom:link href="http://cookedapple.net/category/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://cookedapple.net</link>
	<description>All our thoughts. Broadcasted.</description>
	<lastBuildDate>Tue, 24 Aug 2010 10:03:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>CakePhp, MacOs Snow Leopard, Apache e malditesta</title>
		<link>http://cookedapple.net/2010/05/29/cakephp-macos-snow-leopard-apache-e-malditesta/</link>
		<comments>http://cookedapple.net/2010/05/29/cakephp-macos-snow-leopard-apache-e-malditesta/#comments</comments>
		<pubDate>Sat, 29 May 2010 08:42:59 +0000</pubDate>
		<dc:creator>Piero Bozzolo</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[403 forbidden]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache.conf]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[RewriteRule]]></category>

		<guid isPermaLink="false">http://cookedapple.net/?p=276</guid>
		<description><![CDATA[CakePhp, un mac e Snow Leopard mi hanno causato dei bei malditesta oggi. Il problema principale è che la catena di RewriteRule negli .htaccess non funzionava correttamente per via del fatto che mettevo la root di cakephp sotto la cartella Sites del mio utente, e nonostante abbia modificato /etc/apache2/httpd.conf e il file /etc/apache2/users/&#60;my_user&#62;.conf aggiungendo &#8216;AllowOverride All&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>CakePhp, un mac e Snow Leopard mi hanno causato dei bei malditesta oggi.</p>
<p>Il problema principale è che la catena di RewriteRule negli .htaccess non funzionava correttamente per via del fatto che mettevo la root di cakephp sotto la cartella Sites del mio utente, e nonostante abbia modificato /etc/apache2/httpd.conf e il file /etc/apache2/users/&lt;my_user&gt;.conf aggiungendo &#8216;AllowOverride All&#8217; i file statici nella cartella webroot (come le immagini e i css) non mi venivano serviti.</p>
<p>La mia soluzione con virtual host<br />
1) ho modificato  /etc/apache2/users/&lt;my_user&gt;.conf aggiungendo un virtual host con document root uguale alla root di Cake e impostando &#8216;AllowOverride All&#8217; sulla document root in questo modo:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">Directory</span> <span style="color: #7f007f;">&quot;/Users/&lt;my_user&gt;/Sites/&quot;</span>&gt;
    <span style="color: #00007f;">Options</span> <span style="color: #0000ff;">Indexes</span> MultiViews <span style="color: #0000ff;">FollowSymLinks</span>
    <span style="color: #00007f;">AllowOverride</span> <span style="color: #00007f;">All</span>
    <span style="color: #00007f;">Order</span> <span style="color: #00007f;">allow</span>,<span style="color: #00007f;">deny</span>
    <span style="color: #00007f;">Allow</span> <span style="color: #00007f;">from</span> <span style="color: #00007f;">all</span>
&lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;
&nbsp;
&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *&gt;
    <span style="color: #00007f;">DocumentRoot</span> /Users/&lt;my_user&gt;/Sites/MyNewSite
    <span style="color: #00007f;">ServerName</span> mynewsite.dev
    <span style="color: #00007f;">ServerAlias</span> www.mynewsite.dev
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;
&nbsp;
&lt;<span style="color: #000000; font-weight:bold;">Directory</span> <span style="color: #7f007f;">&quot;/Users/piero/&lt;my_user&gt;/MyNewSite&quot;</span>&gt;
    <span style="color: #00007f;">Options</span> <span style="color: #0000ff;">Indexes</span> MultiViews <span style="color: #0000ff;">FollowSymLinks</span>
    <span style="color: #00007f;">AllowOverride</span> <span style="color: #00007f;">All</span>
    <span style="color: #00007f;">Order</span> <span style="color: #00007f;">allow</span>,<span style="color: #00007f;">deny</span>
    <span style="color: #00007f;">Allow</span> <span style="color: #00007f;">from</span> <span style="color: #00007f;">all</span>
&lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;</pre></div></div>

<p>2) Ho inserito una entry manuale nel file /etc/hosts</p>
<pre>
127.0.0.1	mynewsite.dev
</pre>
<p>Ora funziona tutto correttamente compresi i vari RuleRewrite dei tre .htaccess di cakephp</p>
<p>Ciao<br />
P.</p>
]]></content:encoded>
			<wfw:commentRss>http://cookedapple.net/2010/05/29/cakephp-macos-snow-leopard-apache-e-malditesta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby: Getting current method name</title>
		<link>http://cookedapple.net/2008/10/22/ruby-getting-current-method-name/</link>
		<comments>http://cookedapple.net/2008/10/22/ruby-getting-current-method-name/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 12:25:22 +0000</pubDate>
		<dc:creator>Piero Bozzolo</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[1.8]]></category>
		<category><![CDATA[1.9]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[reflection]]></category>

		<guid isPermaLink="false">http://cookedapple.net/?p=235</guid>
		<description><![CDATA[In ruby 1.9 è possibile utilizzare la variabile __method__ per ottenere il nome del metodo attualmente chiamato. In ruby 1.8 non esiste un modo diretto per accedere al nome del metodo ma è possibile accedere alla variabile caller che, tra le altre informazioni, contiene il nome del metodo chiamante (tips trovato su internet). Ecco come [...]]]></description>
			<content:encoded><![CDATA[<p>In ruby 1.9 è possibile utilizzare la variabile __method__ per ottenere il nome del metodo attualmente chiamato. In ruby 1.8 non esiste un modo diretto per accedere al nome del metodo ma è possibile accedere alla variabile caller che, tra le altre informazioni, contiene il nome del metodo chiamante (tips trovato su internet). Ecco come creare un metodo funzionante su entrambe le versioni:</p>
<blockquote><p>def method_name<br />
if RUBY_VERSION.to_f &lt; 1.9<br />
caller[0]=~/`(.*?)&#8217;/<br />
$1<br />
else<br />
__method__<br />
end<br />
end</p></blockquote>
<p>Se chiamerò da un metodo <em>foo()</em> <strong>method_name</strong> otterò sempre &#8216;foo&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://cookedapple.net/2008/10/22/ruby-getting-current-method-name/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installazione gem mysql su MacOS X</title>
		<link>http://cookedapple.net/2008/08/06/installazione-gem-mysql-su-macos-x/</link>
		<comments>http://cookedapple.net/2008/08/06/installazione-gem-mysql-su-macos-x/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 08:01:02 +0000</pubDate>
		<dc:creator>"The" Apple</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://cookedapple.net/?p=229</guid>
		<description><![CDATA[Quando attivi Mongrel su una macchina MacOS X (Intel) puoi avere questo messaggio: &#8220;WARNING: You&#8217;re using&#160;the&#160;Ruby-based&#160;MySQL&#160;library&#160;that ships with&#160; Rails. This&#160;library&#160;is not suited for production.&#160;Please&#160;install&#160;the&#160; C-based&#160;MySQL&#160;library&#160;instead&#160;(gem&#160;install&#160;mysql).&#8221; L&#8217;installazione corretta della gemma mysql è la seguente: sudo env ARCHFLAGS=&#8221;-arch i386&#8243; gem install mysql &#8212; &#8211;with-mysql-config=/usr/local/mysql/bin/mysql_config -with-mysql-dir=/usr/local/mysql]]></description>
			<content:encoded><![CDATA[<p>Quando attivi Mongrel su una macchina MacOS X (Intel) puoi avere questo messaggio:</p>
<blockquote><p><span style="border-collapse: collapse; font-family: verdana;"><span>&#8220;WARNING: You&#8217;re using&nbsp;<b style="background-color: rgb(255, 255, 102);">the</b>&nbsp;Ruby-<b style="background-color: rgb(255, 255, 102);">based</b>&nbsp;<b style="background-color: rgb(255, 255, 102);">MySQL</b>&nbsp;<b style="background-color: rgb(255, 255, 102);">lib<wbr>rary</b>&nbsp;that ships with&nbsp;</span><br />
<span>Rails. This&nbsp;<b style="background-color: rgb(255, 255, 102);">library</b>&nbsp;is not suited for production.&nbsp;<b style="background-color: rgb(255, 255, 102);">Please</b>&nbsp;<b style="background-color: rgb(255, 255, 102);">install</b>&nbsp;<b style="background-color: rgb(255, 255, 102);">the</b><wbr>&nbsp;</span><br />
<span><b style="background-color: rgb(255, 255, 102);">C</b>-<b style="background-color: rgb(255, 255, 102);">based</b>&nbsp;<b style="background-color: rgb(255, 255, 102);">MySQL</b>&nbsp;<b style="background-color: rgb(255, 255, 102);">library</b>&nbsp;<b style="background-color: rgb(255, 255, 102);">instead</b>&nbsp;<wbr>(gem&nbsp;<b style="background-color: rgb(255, 255, 102);">install</b>&nbsp;<b style="background-color: rgb(255, 255, 102);">mysql</b>).&#8221; </span></span></p>
</blockquote>
<p></p>
<p><span style="border-collapse: collapse; font-family: verdana;">L&#8217;installazione corretta della gemma mysql è la seguente:</span></p>
<blockquote><div>sudo env ARCHFLAGS=&#8221;-arch i386&#8243; gem install mysql &#8212; &#8211;with-mysql-config=/usr/<wbr>local/mysql/bin/mysql_config -with-mysql-dir=/usr/local/<wbr>mysql</div>
</blockquote>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://cookedapple.net/2008/08/06/installazione-gem-mysql-su-macos-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby e Del.Icio.Us per Spotlight</title>
		<link>http://cookedapple.net/2008/05/25/ruby-e-delicious-per-spotlight/</link>
		<comments>http://cookedapple.net/2008/05/25/ruby-e-delicious-per-spotlight/#comments</comments>
		<pubDate>Sun, 25 May 2008 09:29:33 +0000</pubDate>
		<dc:creator>Piero Bozzolo</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[spotlight]]></category>

		<guid isPermaLink="false">http://cookedapple.net/?p=212</guid>
		<description><![CDATA[Forse avrò scoperto l&#8217;acqua calda amici rubysti e maclover, ma questo importer/plugin per spotlight è veramente comodo. Per chi fosse uno utente windows Spotlight è una utility straordinaria di MacOs che permette di cercare in pochissimi istanti un file, esso sia sul disco o sulla rete, basandosi non solo sul nome del file ma anche [...]]]></description>
			<content:encoded><![CDATA[<p>Forse avrò scoperto l&#8217;acqua calda amici rubysti e maclover, ma questo importer/plugin per spotlight è veramente comodo.</p>
<p>Per chi fosse uno utente windows Spotlight è una utility straordinaria di MacOs che permette di cercare in pochissimi istanti un file, esso sia sul disco o sulla rete, basandosi non solo sul nome del file ma anche sul suo contenuto. L&#8217;indicizziazione avviene per una gran moltitudine di formati, dai semplici file di testo, alle mail, ai pdf, ai file OpenOffice/Office/iWork, ecc&#8230; (ovviamente questa cosa è stata mal copiata in windows vista)</p>
<p>Questo plugin permette di:</p>
<p>&#8220;Extracts metadata including modules, classes, methods, text and comments from Ruby scripts. Use Spotlight to search for every source file that references a particular class, or search for a comment you know you added to a particularly interesting method whose name you can’t remember.&#8221; (apple)</p>
<p><a href="http://www.apple.com/downloads/macosx/spotlight/rubyimporter.html" target="_blank">Clicca qui per la pagina di download sul sito di apple</a></p>
<p>Se invece siete utenti dell&#8217;utilissimo del.icio.us esiste anche l&#8217;importer per la famosa piattaforma di shared bookmarking: <a href="http://ianhenderson.org/delimport.html" target="_blank">Delimport</a></p>
<p>Ciao Piero</p>
]]></content:encoded>
			<wfw:commentRss>http://cookedapple.net/2008/05/25/ruby-e-delicious-per-spotlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
