<?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>Luscarpa Blog &#187; Snippets</title>
	<atom:link href="http://www.luscarpa.com/category/snippets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.luscarpa.com</link>
	<description>Php, Zend Framework, Symfony, jQuery, Mootools, Joomla, Wordpress</description>
	<lastBuildDate>Thu, 02 Feb 2012 07:43:39 +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>Change the Time Machine backup interval</title>
		<link>http://www.luscarpa.com/snippets/mac-snippets/change-the-time-machine-backup-interval/</link>
		<comments>http://www.luscarpa.com/snippets/mac-snippets/change-the-time-machine-backup-interval/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 07:43:39 +0000</pubDate>
		<dc:creator>Luscarpa</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://www.luscarpa.com/?p=334</guid>
		<description><![CDATA[Do you think that Time Machine backups are done too often? If you want to change the backup interval, you have to do the following steps: Open Terminal Go to /System/Lybrary/LaunchDaemons Open with your prefer text editor the file com.apple.backupd-auto.plist Find this row: &#60;key&#62;StartInterval&#60;/key&#62; Change the number on the next row: &#60;integer&#62;3600&#60;/integer&#62; 3600 is the interval of backup in [...]]]></description>
			<content:encoded><![CDATA[<p>Do you think that Time Machine backups are done too often? <span id="more-334"></span>If you want to change the backup interval, you have to do the following steps:</p>
<ol>
<li>Open Terminal</li>
<li>Go to /System/Lybrary/LaunchDaemons</li>
<li>Open with your prefer text editor the file <em>com.apple.backupd-auto.plist</em></li>
<li>Find this row: &lt;key&gt;StartInterval&lt;/key&gt;</li>
<li>Change the number on the next row: &lt;integer&gt;3600&lt;/integer&gt;</li>
</ol>
<p><strong>3600</strong> is the interval of backup in seconds, you can increase or decrease the number as you like!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luscarpa.com/snippets/mac-snippets/change-the-time-machine-backup-interval/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Start &amp; Stop Jenkins daemon on Mac OS X</title>
		<link>http://www.luscarpa.com/snippets/jenkins/start-stop-jenkins-daemon-on-mac-os-x/</link>
		<comments>http://www.luscarpa.com/snippets/jenkins/start-stop-jenkins-daemon-on-mac-os-x/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 08:36:31 +0000</pubDate>
		<dc:creator>Luscarpa</dc:creator>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[jenkins]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://www.luscarpa.com/?p=326</guid>
		<description><![CDATA[These are two small snippets to start and stop Jenkins in daemon mode on Mac OS X. Start Jenkins: sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist Stop Jenkins: sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist]]></description>
			<content:encoded><![CDATA[<p>These are two small snippets to start and stop Jenkins in daemon mode on Mac OS X.<span id="more-326"></span></p>
<p><strong>Start Jenkins:</strong></p>
<pre>sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist</pre>
<p><strong>Stop Jenkins:</strong></p>
<pre>sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.luscarpa.com/snippets/jenkins/start-stop-jenkins-daemon-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Zend_Application &amp; Boostrap &#8211; A hidden secret</title>
		<link>http://www.luscarpa.com/snippets/zend-framework/zend_application-boostrapp-a-hidden-secret/</link>
		<comments>http://www.luscarpa.com/snippets/zend-framework/zend_application-boostrapp-a-hidden-secret/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 08:50:26 +0000</pubDate>
		<dc:creator>Luscarpa</dc:creator>
				<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Hidden Secret]]></category>
		<category><![CDATA[Tip]]></category>
		<category><![CDATA[ZF]]></category>

		<guid isPermaLink="false">http://www.luscarpa.com/?p=308</guid>
		<description><![CDATA[From Zend Framework 1.8, the way to use ZF is changed, Zend_Application and Zend_Application_Resource have improved exponentially the way to start up a ZF project. In this short post I don&#8217;t want to show you how to use them, but I want to give you a simple hidden secret. If you have already used them [...]]]></description>
			<content:encoded><![CDATA[<p>From Zend Framework 1.8, the way to use ZF is changed, Zend_Application and Zend_Application_Resource have improved exponentially the way to start up a ZF project.<br />
In this short post I don&#8217;t want to show you how to use them, but I want to give you a simple hidden secret.</p>
<p>If you have already used them you know that to launch your ZF application you need to add these lines to your application.ini</p>
<pre class="php">
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
</pre>
<p>and create the file boostrapp.php with the following code</p>
<pre class="php">&lt;?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
}</pre>
<p>This is the best boostrapp that you can have, without any method. You can obtain this moving all your methods on the resources.<br />
But if I have an empty class why should I create this file?</p>
<p>There is a little tip to remove this file from execution of your scripts, you have to change the previous lines of your application.ini with these</p>
<pre class="php">bootstrap.path = APPLICATION_PATH "/../library/Zend/Application/Bootstrap/Bootstrap.php"
bootstrap.class = "Zend_Application_Bootstrap_Bootstrap"</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luscarpa.com/snippets/zend-framework/zend_application-boostrapp-a-hidden-secret/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Comments number without pingbacks and trackbacks</title>
		<link>http://www.luscarpa.com/snippets/wordpress/comments-number-without-pingbacks-and-trackbacks/</link>
		<comments>http://www.luscarpa.com/snippets/wordpress/comments-number-without-pingbacks-and-trackbacks/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 11:33:32 +0000</pubDate>
		<dc:creator>Luscarpa</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.luscarpa.com/?p=226</guid>
		<description><![CDATA[Snippet to get the total comments number for a post without pingbacks and trackbacks.]]></description>
			<content:encoded><![CDATA[<p>Using this snippet you can get the total comments number for a post without pingbacks and trackbacks.</p>
<p>Open the <span class="highlight">functions.php</span> file that you can find into your template folder, if you haven&#8217;t it you have to create it. After this, add this code at the bottom of file:</p>
<pre class="php">function comment_count( $count ) {
	if ( ! is_admin() ) {
		global $id;
		$comments_by_type = &amp;separate_comments(get_comments('status=approve&amp;post_id=' . $id));
		return count($comments_by_type['comment']);
	} else {
		return $count;
	}
}
add_filter('get_comments_number', 'comment_count', 0);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.luscarpa.com/snippets/wordpress/comments-number-without-pingbacks-and-trackbacks/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Disable layout and view render</title>
		<link>http://www.luscarpa.com/snippets/zend-framework/disable-layout-and-view-render/</link>
		<comments>http://www.luscarpa.com/snippets/zend-framework/disable-layout-and-view-render/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 15:56:11 +0000</pubDate>
		<dc:creator>Luscarpa</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.luscarpa.com/?p=218</guid>
		<description><![CDATA[Simple snippet to switch off layout and view render for a specific action or all actions of a specific controller in Zend Framework.]]></description>
			<content:encoded><![CDATA[<p>These are two simple lines that help you to <span class="highlight-underline">disable layout and view render</span> for a specific action:</p>
<pre class="php">
public function indexAction()
{
  $this->_helper->layout()->disableLayout();
  $this->_helper->viewRenderer->setNoRender(true);
}
</pre>
<p>If you want switch off them for all actions of controller put these lines into <span class="highlight">preDispatch()</span> method:</p>
<pre class="php">
public function preDispatch()
{
  $this->_helper->layout()->disableLayout();
  $this->_helper->viewRenderer->setNoRender(true);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.luscarpa.com/snippets/zend-framework/disable-layout-and-view-render/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

