<?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>Sébastien Barbieri's blog &#187; Projects</title>
	<atom:link href="http://blog.sbw.be/category/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sbw.be</link>
	<description>My life, my work, my projects</description>
	<lastBuildDate>Sat, 24 Dec 2011 00:12:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Continuous Integration phpunit code coverage use a bit less than 2 Gigs !!!</title>
		<link>http://blog.sbw.be/2010/11/30/continuous-integration-phpunit-code-coverage-use-a-bit-less-than-2-gigs/</link>
		<comments>http://blog.sbw.be/2010/11/30/continuous-integration-phpunit-code-coverage-use-a-bit-less-than-2-gigs/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 18:28:08 +0000</pubDate>
		<dc:creator>Sébastien Barbieri</dc:creator>
				<category><![CDATA[freelance]]></category>
		<category><![CDATA[je bosse là]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[truc de g33k]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://blog.sbw.be/?p=450</guid>
		<description><![CDATA[2 gigs !!! gasp&#8230; I had several: Generating code coverage report, this may take a moment.PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 21503527 bytes) in /usr/share/php/PHPUnit/Util/Report/Node/File.php on line 406 And here is how it started: At work we are using phpunit to test our framework, we flew from SimpleTest [...]]]></description>
			<content:encoded><![CDATA[<p><strong>2 gigs !!!</strong> <em>gasp</em>&#8230; </p>
<p>I had several:</p>
<p><strong>Generating code coverage report, this may take a moment.PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 21503527 bytes) in /usr/share/php/PHPUnit/Util/Report/Node/File.php on line 406<br />
</strong></p>
<p>And here is how it started:</p>
<p>At work we are using <a href="http://www.phpunit.de/">phpunit</a> to test our framework, we flew from <a href="http://www.simpletest.org/">SimpleTest</a> as there was no real integration with our tools and no real followup of the the product.</p>
<p>So to automate the test, as there is no &#8220;build&#8221; in php (interpreted vs compiled remember?) we ran it after each commit &#8230;</p>
<p>Until it tooks 30 minutes to run throught the whole set of tests&#8230;</p>
<p><span id="more-450"></span><br />
Then we decided to run it locally before comitting&#8230; until it tooks up to 2 hours to run tests (yes we have slow laptops I know, at least 4 times slower than the servers).</p>
<p>Actually we use phpunit for recipe test, including database change, third parties, providers&#8230; everything from A to Z&#8230; and that needs a lot of time and CPU power&#8230;</p>
<p>So we solved the problem by running test in a cronjob, hourly on the integration server.</p>
<p>This was done running phpunit in command line</p>
<p><code lang="bash"><br />
&gt; phpunit --include-path ../code/ MyTestSuite.php<br />
</code></p>
<p>Of course as we had several tests suites and we had to put them all in one bigger testsuite&#8230; but that was not easy so we moved to the Phpunit config file, added code coverage reporting and send a mail everytime sometimes goes wrong</p>
<p><strong>PhpunitConfig.xml</strong></p>
<p><code lang="xml"></p>
<pre class="brush: xml; title: ;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;phpunit
         colors=&quot;true&quot;
         &gt;
         &lt;testsuites&gt;
         	&lt;testsuite name=&quot;RTBF_Service&quot;&gt;
         		&lt;file&gt;RTBF/Service/Rating/Adapter/AbstractPhpunittest.php&lt;/file&gt;
         		&lt;file&gt;RTBF/Service/Rating/Adapter/MediaPhpunittest.php&lt;/file&gt;
         	&lt;--! ... --&gt;
         	&lt;/testsuite&gt;
         	&lt;testsuite name=&quot;RTBF&quot;&gt;
         		&lt;file&gt;RTBF/AclPhpunittest.php&lt;/file&gt;
         	&lt;/testsuite&gt;
         	&lt;testsuite name=&quot;RTBF_Utility&quot;&gt;
         		&lt;file&gt;RTBF/Utility/AjaxConnectorPhpunittest.php&lt;/file&gt;
	         	&lt;--! ... --&gt;
         	&lt;/testsuite&gt;
         	&lt;--! ... --&gt;
	&lt;/testsuites&gt;
	&lt;listeners&gt;
  		&lt;listener class=&quot;SimpleTestListener&quot; file=&quot;PhpunitTestListener.php&quot;&gt;
  		&lt;/listener&gt;
  	&lt;/listeners&gt;
  	&lt;!--
	&lt;logging&gt;
		&lt;log type=&quot;coverage-html&quot; target=&quot;/reporting/phpunit/library/&quot; charset=&quot;UTF-8&quot; /&gt;
	&lt;/logging&gt;
	--&gt;
	&lt;php&gt;
		&lt;ini name=&quot;memory_limit&quot; value=&quot;2047M&quot; /&gt;
	&lt;/php&gt;
	&lt;filter&gt;
	  &lt;blacklist&gt;
	    &lt;directory suffix=&quot;.php&quot;&gt;library/code/Zend&lt;/directory&gt;
	  &lt;/blacklist&gt;
	&lt;/filter&gt;
&lt;/phpunit&gt;
</pre>
<p></code></p>
<p><strong>PhpunitTestListener.php</strong></p>
<p><code lang="php"></p>
<pre class="brush: php; title: ;">
class SimpleTestListener implements PHPUnit_Framework_TestListener
{
	private $emailContent=array(self::Error=&gt;&quot;&quot;,self::Failure=&gt;&quot;&quot;,self::Incomplete=&gt;&quot;&quot;,self::Skipped=&gt;&quot;&quot;);
	private $assertions=0;
	private $itemCount=array(self::Error=&gt;0,self::Failure=&gt;0,self::Incomplete=&gt;0,self::Skipped=&gt;0);
	private $totalItems=0;

	const Error=&quot;Error&quot;;
	const Failure=&quot;Failure&quot;;
	const Incomplete=&quot;Incomplete&quot;;
	const Skipped=&quot;Skipped&quot;;

	private function addEmailContent($severity,$test,$e){
		$result = $test-&gt;getResult();
		$traces = $e-&gt;getTrace();
		$continue=true;
		$tracingMessage=&quot;&quot;;
		for($i=1;$i&lt;count($traces)&amp;&amp;$continue;$i++){
			if(isset($traces[$i]['file'])){
				$tracingMessage.=$traces[$i]['file'].&quot;:(&quot;.$traces[$i]['line'].&quot;)\n\t&quot;;
			}else{
				$continue=false;
			}
		}
		$this-&gt;itemCount[$severity]++;
		$this-&gt;emailContent[$severity].=$this-&gt;itemCount[$severity].&quot;)\t&quot;.get_class($test).'::'.$test-&gt;getName(TRUE).&quot;\n\t&quot;.str_replace(&quot;\n&quot;,&quot;\n\t&quot;,PHPUnit_Framework_TestFailure::exceptionToString($e)).&quot;&quot;.$tracingMessage.&quot;\n\n&quot;;
		$this-&gt;totalItems++;
	}

	public function addError(PHPUnit_Framework_Test $test,Exception $e,$time){
		$this-&gt;addEmailContent(self::Error,$test,$e);
	}

	public function addFailure(PHPUnit_Framework_Test $test,PHPUnit_Framework_AssertionFailedError $e,$time){
		$this-&gt;addEmailContent(self::Failure,$test,$e);
	}

	public function addIncompleteTest(PHPUnit_Framework_Test $test,Exception $e,$time){
		$this-&gt;addEmailContent(self::Incomplete,$test,$e);
	}

	public function addSkippedTest(PHPUnit_Framework_Test $test,Exception $e,$time){
		$this-&gt;addEmailContent(self::Skipped,$test,$e);
	}

	public function startTest(PHPUnit_Framework_Test $test){
	}

	public function endTest(PHPUnit_Framework_Test $test, $time){
	}

	public function startTestSuite(PHPUnit_Framework_TestSuite $suite){
	}

	public function endTestSuite(PHPUnit_Framework_TestSuite $suite){
	}

	public function __destruct(){
		if($this-&gt;totalItems&gt;0){
			// HIDDEN but concat everything from $this-&gt;emailContent nicely and send the mail
			//print(&quot;\n\nMail sent: &quot;.$text.&quot;\n&quot;);
		}
	}
}
</pre>
<p></code></p>
<p>That&#8217;s it for the big picture&#8230;</p>
<p>And as you can see there are several point in the XML that are quite important:</p>
<p><strong>memory limit 2047MB</strong>that&#8217;s huge&#8230; but this is the price to pay to have a fully working code-coverage HTML report. As we are using <a href="http://www.hardened-php.net/suhosin/">suhosin</a> we had to change the memory limit in suhosin too&#8230; and yes when the limit is 2048 MB don&#8217;t try to set the memory to 2048 MB it really means this is a limit you have to be under that limit (here 2047 MB).</p>
<p><strong>2 Gigs!!!</strong> I know this is huge but believe me I went through several tries and 128 MB was not enought, nor 256 MB, nor 512 MB, not even 1 GB &#8230; I didn&#8217;t try to see where is my limit &#8230; I put 2 gigs and then it worked&#8230; we have about 30% of lines covered so I think that if we shift to 100% we will have to give more memory&#8230; I&#8217;m pretty sure, there is something leaking somewhere&#8230; but according to phpunit.de site&#8230; I have the answer remains: <a href="https://github.com/sebastianbergmann/php-code-coverage/issues/closed/#issue/26">Give more memory</a></p>
<p><strong>/etc/php5/conf.d/suhosin.ini</strong><br />
<code></p>
<p>...<br />
suhosin.memory_limit = 2048M<br />
...</p>
<p></code></p>
<p><strong>logging</strong> is commented out because logging needs xdebug and while we stay with ZendServer CE we do not have xdebug&#8230; (see my previous post for more info). </p>
<p>But the server which is not running Zend Server CE does!</p>
<p>So I commented out the line in the config to let developers run the unit test and pasted it as command line argument on the server&#8217;s cronjob.</p>
<p><code lang="bash"></p>
<pre class="brush: bash; title: ;">
phpunit --include-path ../code/ --coverage-html /reporting/phpunit/library/ --configuration PhpunitConfig.xml
</pre>
<p></code></p>
<p><strong>the listener</strong> This is a simple easy listener. It&#8217;s always useful to have one sample so I pasted here above, feel free to copy, enhance&#8230; The only &#8216;hack&#8217; we use it to call the send email on listener destruction, so the email will be sent at the end. But there is a drawback&#8230; if there is a php error somewhere, nothing is sent. And as nothing is sent when everythign goes well&#8230; we dont know if everythings goes well or if there is a real bug&#8230;<br />
This problem will be addressed later. Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sbw.be/2010/11/30/continuous-integration-phpunit-code-coverage-use-a-bit-less-than-2-gigs/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bru-GTUG #1 Date Poll</title>
		<link>http://blog.sbw.be/2009/11/24/bru-gtug-1-date-poll/</link>
		<comments>http://blog.sbw.be/2009/11/24/bru-gtug-1-date-poll/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 07:37:44 +0000</pubDate>
		<dc:creator>Sébastien Barbieri</dc:creator>
				<category><![CDATA[freelance]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[bru-gtug]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[hackaton]]></category>

		<guid isPermaLink="false">http://blog.sbw.be/?p=334</guid>
		<description><![CDATA[Feel free to participate in the Bru-GTUG #1]]></description>
			<content:encoded><![CDATA[<p>Feel free to participate in the Bru-GTUG #1</p>
<p><iframe width="300" height="250" frameborder="0" src="http://www.doodle.com/summary.html?pollId=6939wknuzkwkwweq"> </iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sbw.be/2009/11/24/bru-gtug-1-date-poll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox Ubiquity php search handy command</title>
		<link>http://blog.sbw.be/2009/08/26/firefox-ubiquity-php-search-handy-command/</link>
		<comments>http://blog.sbw.be/2009/08/26/firefox-ubiquity-php-search-handy-command/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 14:22:35 +0000</pubDate>
		<dc:creator>Sébastien Barbieri</dc:creator>
				<category><![CDATA[freelance]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[truc de g33k]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ubiquity]]></category>

		<guid isPermaLink="false">http://blog.sbw.be/?p=301</guid>
		<description><![CDATA[Just created a Firfow Ubiquity php search command based on 2 other work: http://download.sbw.be/projects/ubiquity/php-search.html]]></description>
			<content:encoded><![CDATA[<p>Just created a Firfow Ubiquity php search command based on 2 other work: <a href="http://download.sbw.be/projects/ubiquity/php-search.html">http://download.sbw.be/projects/ubiquity/php-search.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sbw.be/2009/08/26/firefox-ubiquity-php-search-handy-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Distance between cities</title>
		<link>http://blog.sbw.be/2009/06/12/distance-between-cities/</link>
		<comments>http://blog.sbw.be/2009/06/12/distance-between-cities/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 07:06:45 +0000</pubDate>
		<dc:creator>Sébastien Barbieri</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[truc de g33k]]></category>
		<category><![CDATA[belgium]]></category>
		<category><![CDATA[cities]]></category>
		<category><![CDATA[latitude]]></category>
		<category><![CDATA[longitude]]></category>
		<category><![CDATA[zip]]></category>

		<guid isPermaLink="false">http://blog.sbw.be/?p=256</guid>
		<description><![CDATA[First of all I need to cite my sources: Calculate distance, bearing and more between two Latitude/Longitude points Geocoding Belgium Postal Codes The goal of my project was to find out which cities are nearby (within a user specified distance). Of course users don&#8217;t know their city coordinate, so you will have to find out [...]]]></description>
			<content:encoded><![CDATA[<p>First of all I need to cite my sources: </p>
<ul>
<li>
		<a href="http://www.movable-type.co.uk/scripts/latlong.html">Calculate distance, bearing and more between two Latitude/Longitude points</a>
	</li>
<li>
		<a href="http://www.jedi.be/blog/2009/04/29/geocoding-belgium-postal-codes/">Geocoding Belgium Postal Codes</a>
	</li>
</ul>
<p>The goal of my project was to find out which cities are nearby (within a user specified distance).<br />
Of course users don&#8217;t know their city coordinate, so you will have to find out by yourself. To do so, I used the JEDI trick (<a href="http://www.jedi.be/blog/2009/04/29/geocoding-belgium-postal-codes/">Geocoding Belgium Postal Codes</a>) which is:</p>
<ul>
<ol>Downloading the csv of cities and zip code (available on the <a href="http://www.post.be/site/fr/residential/customerservice/search/postal_codes.html">national mail </a>site for Belgium, I don&#8217;t know for other countries)</ol>
<ol>Writing a small piece of code to parse the csv and retrieve the right latitude and longitude via google geo service</ol>
</ul>
<p>I could have downloaded <a href="http://www.jedi.be/blog/wp-content/uploads/2009/04/geocodes.csv">the file from the JEDI site</a> but I really needed to do it by myself.</p>
<p>So the next thing to do is: finding the cities within an arbitrary distance.</p>
<p>This was based on the documentation I found on the movable-type math site.</p>
<p>All I did is translating the Javascript function to PHP functions:</p>
<pre class="brush: php; title: ;">
    private function sphericalDistance($lat1,$lon1,$lat2,$lon2){
        $R = 6371.0; // km
        $d = acos(
                sin(deg2rad($lat1))*sin(deg2rad($lat2))
                + cos(deg2rad($lat1))*cos(deg2rad($lat2))
                * cos(deg2rad($lon2-$lon1))
             )
             * $R;
        return $d;
    }

    private function haversineDistance($lat1,$lon1,$lat2,$lon2){
        $R = 6371.0; // km
        $dLat = deg2rad($lat2-$lat1);
        $dLon = deg2rad($lon2-$lon1);
        $a = sin($dLat/2) * sin($dLat/2)
            + cos(deg2rad($lat1)) * cos(deg2rad($lat2))
            * sin($dLon/2) * sin($dLon/2);
        $c = 2.0 * atan2(sqrt($a), sqrt(1-$a));
        $d = $R * $c;
        return $d;
    }

    private function vincentyDistance($lat1,$lon1,$lat2,$lon2){
        $a = 6378137.0; $b = 6356752.3142;  $f = 1/298.257223563;  // WGS-84 ellipsiod
        $L = deg2rad($lon2-$lon1);
        $U1 = atan((1-$f) * tan(deg2rad($lat1)));
        $U2 = atan((1-$f) * tan(deg2rad($lat2)));
        $sinU1 = sin($U1);
        $cosU1 = cos($U1);
        $sinU2 = sin($U2);
        $cosU2 = cos($U2);
        $lambda = $L;
        $lambdaP = $L;
        $iterLimit = 100;
        do{
            $sinLambda = sin($lambda);
            $cosLambda = cos($lambda);
            $sinSigma = sqrt(($cosU2*$sinLambda) * ($cosU2*$sinLambda) +
                        ($cosU1*$sinU2-$sinU1*$cosU2*$cosLambda) * ($cosU1*$sinU2-$sinU1*$cosU2*$cosLambda));
            if($sinSigma==0) return 0;
            $cosSigma = $sinU1 * $sinU2 + $cosU1*$cosU2*$cosLambda;
            $sigma = atan2($sinSigma, $cosSigma);
            $sinAlpha = $cosU1 * $cosU2 * $sinLambda / $sinSigma;
            $cosSqAlpha = 1 - $sinAlpha*$sinAlpha;
            if($cosSqAlpha!=0){
                $cos2SigmaM = $cosSigma - 2*$sinU1*$sinU2/$cosSqAlpha;
            }else{
                $cos2SigmaM =0;
            }
            $C = $f/16*$cosSqAlpha*(4+$f*(4-3*$cosSqAlpha));
            $lambdaP = $lambda;
            $lambda = $L + (1-$C) * $f * $sinAlpha *
                    ($sigma + $C*$sinSigma*($cos2SigmaM+$C*$cosSigma*(-1+2*$cos2SigmaM*$cos2SigmaM)));
        }while(abs($lambda-$lambdaP) &gt; 1e-12 &amp;&amp; --$iterLimit&gt;0);
        if($iterLimit == 0) return false; // formula failed to converge
        $uSq = $cosSqAlpha * ($a*$a - $b*$b) / ($b*$b);
        $A = 1 + $uSq/16384.0*(4096+$uSq*(-768+$uSq*(320-175*$uSq)));
        $B = $uSq/1024.0 * (256+$uSq*(-128+$uSq*(74-47*$uSq)));
        $deltaSigma = $B*$sinSigma*($cos2SigmaM+$B/4*($cosSigma*(-1+2*$cos2SigmaM*$cos2SigmaM)
                    - $B/6*$cos2SigmaM*(-3+4*$sinSigma*$sinSigma)*(-3+4*$cos2SigmaM*$cos2SigmaM)));
        $s = $b*$A*($sigma-$deltaSigma);
        return $s/1000.0;
    }
</pre>
<p>And that&#8217;s it&#8230;</p>
<p>So if you want the<a href="http://code.sbw.be/php/belgianCitiesCoord.data"> php serialized cities of Belgium with Zip, cityname, uppercase cityname, longitude,latitude</a>.</p>
<p>I didn&#8217;t do a lot at all, just put every source together.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sbw.be/2009/06/12/distance-between-cities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quechup is selling (let steal) e-mail adresses: honey pot #1 triggered</title>
		<link>http://blog.sbw.be/2009/04/03/quechup-is-selling-let-steal-e-mail-adresses-honey-pot-1-triggered/</link>
		<comments>http://blog.sbw.be/2009/04/03/quechup-is-selling-let-steal-e-mail-adresses-honey-pot-1-triggered/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 07:41:24 +0000</pubDate>
		<dc:creator>Sébastien Barbieri</dc:creator>
				<category><![CDATA[freelance]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[truc de g33k]]></category>
		<category><![CDATA[email marketing]]></category>

		<guid isPermaLink="false">http://blog.sbw.be/2009/04/03/quechup-is-selling-let-steal-e-mail-adresses-honey-pot-1-triggered/</guid>
		<description><![CDATA[My subscription to quechup was used for spam mail such has: Cindy Foster &#8211; CindyFoster1533@live.com to quechupxxx@xxx.sbw.be H! I find your post interesting. I am pretty chick. I am moving to your area from russia I am looking for a good man to show me around and may be more ;) Could you please kindly [...]]]></description>
			<content:encoded><![CDATA[<p>My subscription to <a href="http://www.quechup.com/">quechup</a> was used for spam mail such has:</p>
<blockquote><p>Cindy Foster &#8211; CindyFoster1533@live.com<br />
 to quechupxxx@xxx.sbw.be</p>
<p>H! I find your post interesting. I am pretty chick. I am moving to your area from russia<br />
I am looking for a good man to show me around and may be more ;)<br />
Could you please kindly reply to me at jclapptakomapark@gmail.com<br />
I will send you some of my pictures back in reply.<br />
Could you reply to my email account I am supplying in the body of this email as I am writing from my work email which i don&#8217;t use for personal correspondence</p>
<p>Windows Live™: Keep your life in sync. Check it out.
</p></blockquote>
<p>&#8211;> Don&#8217;t use quechup</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sbw.be/2009/04/03/quechup-is-selling-let-steal-e-mail-adresses-honey-pot-1-triggered/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Deezer embed test</title>
		<link>http://blog.sbw.be/2008/12/23/deezer-embed-test/</link>
		<comments>http://blog.sbw.be/2008/12/23/deezer-embed-test/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 09:54:52 +0000</pubDate>
		<dc:creator>Sébastien Barbieri</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://blog.sbw.be/2008/12/23/deezer-embed-test/</guid>
		<description><![CDATA[Discover K&#8217;s Choice!]]></description>
			<content:encoded><![CDATA[<div style="width:220px;height:35px;overflow:hidden;border-right: 1px solid black;border-bottom: 1px solid black;"><object width="220" height="55"><param name="movie" value="http://www.deezer.com/embedded/small-widget-v2.swf?idSong=561298&#038;colorBackground=0xFFFFFF&#038;textColor1=0x000000&#038;colorVolume=0xCCCCCC&#038;autoplay=0"></param><embed src="http://www.deezer.com/embedded/small-widget-v2.swf?idSong=561298&#038;colorBackground=0xFFFFFF&#038;textColor1=0x000000&#038;colorVolume=0xCCCCCC&#038;autoplay=0" type="application/x-shockwave-flash" width="220" height="55"></embed></object><br /><font size='1' color ='#000000' face='Arial'>Discover <a href='http://www.deezer.com/en/k-s-choice.html'>K&#8217;s Choice</a>!</font></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.sbw.be/2008/12/23/deezer-embed-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Not aligned&#8230;</title>
		<link>http://blog.sbw.be/2008/09/01/not-aligned/</link>
		<comments>http://blog.sbw.be/2008/09/01/not-aligned/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 10:15:24 +0000</pubDate>
		<dc:creator>Sébastien Barbieri</dc:creator>
				<category><![CDATA[Mon blog]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://blog.sbw.be/2008/09/01/not-aligned/</guid>
		<description><![CDATA[&#8230; with my managment&#8230; I prefere to do research and to develop than to maintain out-sourced code&#8230; Why do they outsource the great applications and concepts&#8230; and leave us with the day to day operationnal work&#8230; That&#8217;s not nice&#8230; So I decided to resign&#8230; Bye bye Skynet&#8230; I hope that you will see the light [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230; with my managment&#8230;</p>
<p>I prefere to do research and to develop than to maintain out-sourced code&#8230;</p>
<p>Why do they outsource the great applications and concepts&#8230; and leave us with the day to day operationnal work&#8230;</p>
<p>That&#8217;s not nice&#8230;</p>
<p>So I decided to resign&#8230; Bye bye Skynet&#8230; I hope that you will see the light sooner or later&#8230; and stop your self-destruction&#8230;</p>
<p>S.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sbw.be/2008/09/01/not-aligned/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>create a patch with subversion</title>
		<link>http://blog.sbw.be/2008/02/06/create-a-patch-with-subversion/</link>
		<comments>http://blog.sbw.be/2008/02/06/create-a-patch-with-subversion/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 01:06:12 +0000</pubDate>
		<dc:creator>Sébastien Barbieri</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[truc de g33k]]></category>

		<guid isPermaLink="false">http://blog.sbw.be/2008/02/06/create-a-patch-with-subversion/</guid>
		<description><![CDATA[Before the commit: svn diff > mypatch_xx.diff After the commit: svn diff -r > mypatch_xx.diff copy the mypatch_xx.diff file at the same relative place on the other computer/directory/&#8230; and do: patch --dry-run -p0 -i ~/mypatch_xx.diff to see what will be done and then patch -p0 -i ~/mypatch_xx.diff to do it really to install patch: apt-get [...]]]></description>
			<content:encoded><![CDATA[<p>Before the commit:</p>
<p><code>svn diff > mypatch_xx.diff</code></p>
<p>After the commit:</p>
<p><code>svn diff -r <PREVIOUS REVISION NUMBER> > mypatch_xx.diff</code></p>
<p>copy the mypatch_xx.diff file at the same relative place on the other computer/directory/&#8230;</p>
<p>and do:</p>
<p><code>patch --dry-run -p0 -i ~/mypatch_xx.diff</code></p>
<p>to see what will be done and then</p>
<p><code>patch -p0 -i ~/mypatch_xx.diff</code></p>
<p>to do it really</p>
<p>to install patch: <code>apt-get install patch</code><br />
to install subversion: <code>apt-get install subversion</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sbw.be/2008/02/06/create-a-patch-with-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install php 5 mode cgi on apache 1.3 with mod php 4 / Debian stable</title>
		<link>http://blog.sbw.be/2007/08/01/how-to-install-php-5-mode-cgi-on-apache-13-with-mod-php-4-debian-stable/</link>
		<comments>http://blog.sbw.be/2007/08/01/how-to-install-php-5-mode-cgi-on-apache-13-with-mod-php-4-debian-stable/#comments</comments>
		<pubDate>Wed, 01 Aug 2007 21:55:38 +0000</pubDate>
		<dc:creator>Sébastien Barbieri</dc:creator>
				<category><![CDATA[freelance]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[truc de g33k]]></category>

		<guid isPermaLink="false">http://blog.sbw.be/2007/08/01/how-to-install-php-5-mode-cgi-on-apache-13-with-mod-php-4-debian-stable/</guid>
		<description><![CDATA[php4 and php5 on same server is not that complex You must be root (or able to sudo)! 1. check that cgi-bin mod_alias is activated in /etc/apache/httpd.conf search for: &#60;IfModule mod_alias.c&#62; #ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ ... the line should be uncommented 2. Install php5-cgi update: apt-get update simulate install: apt-get -s install php5-cgi Reading package lists... [...]]]></description>
			<content:encoded><![CDATA[<p>php4 and php5 on same server is not that complex</p>
<p>You must be root (or able to sudo)!</p>
<p>1. check that cgi-bin mod_alias is activated</p>
<p>in /etc/apache/httpd.conf search for:</p>
<p><code>&lt;IfModule mod_alias.c&gt;<br />
  #ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
...<br />
</code></p>
<p>the line should be uncommented</p>
<p>2. Install php5-cgi</p>
<p>update:</p>
<p><code><br />
apt-get update<br />
</code></p>
<p>simulate install:</p>
<p><code><br />
apt-get -s install php5-cgi<br />
Reading package lists... Done<br />
Building dependency tree... Done<br />
The following NEW packages will be installed<br />
  php5-cgi<br />
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.<br />
...<br />
</code></p>
<p>if you have something similar, let&#8217;s do it for real</p>
<p><code>apt-get install php5-cgi<br />
</code></p>
<p>3. add an handler in the directory where php5 files are</p>
<p>in the directory where you want to have php5 running (ex: /var/www/myphp5site/)<br />
create an .htaccess file containing:</p>
<p><code>AddHandler x-httpd-php5 .php<br />
Action x-httpd-php5 /cgi-bin/php5<br />
</code></p>
<p>4. gracefuly restart apache</p>
<p><code>apachectl graceful<br />
</code></p>
<p>It&#8217;s done, enjoy.</p>
<p>sources:</p>
<p><a href="http://www.generation-linux.net/article.php3?id_article=26">http://www.generation-linux.net/article.php3?id_article=26</a></p>
<p><a href="http://www.siteduzero.com/tuto-3-19975-1-php4-et-php5-en-meme-temps-sur-un-serveur-linux.html">http://www.siteduzero.com/&#8230;serveur-linux.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sbw.be/2007/08/01/how-to-install-php-5-mode-cgi-on-apache-13-with-mod-php-4-debian-stable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Company site</title>
		<link>http://blog.sbw.be/2007/04/27/company-site/</link>
		<comments>http://blog.sbw.be/2007/04/27/company-site/#comments</comments>
		<pubDate>Fri, 27 Apr 2007 06:00:26 +0000</pubDate>
		<dc:creator>Sébastien Barbieri</dc:creator>
				<category><![CDATA[freelance]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://blog.sbw.be/2007/04/27/company-site/</guid>
		<description><![CDATA[My company site is under construction: http://www.sbw.be/ feel free to comment suggestions.]]></description>
			<content:encoded><![CDATA[<p>My company site is under construction: <a href="http://www.sbw.be/ ">http://www.sbw.be/</a> feel free to comment suggestions.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sbw.be/2007/04/27/company-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

