<?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>ma.tthi.eu</title>
	<atom:link href="http://ma.tthi.eu/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://ma.tthi.eu/blog</link>
	<description>pense-bête</description>
	<lastBuildDate>Mon, 05 Sep 2011 09:59:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>PHPStorm Theme</title>
		<link>http://ma.tthi.eu/blog/2011/07/10/phpstorm-theme/</link>
		<comments>http://ma.tthi.eu/blog/2011/07/10/phpstorm-theme/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 17:47:59 +0000</pubDate>
		<dc:creator>Matthieu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ma.tthi.eu/blog/?p=82</guid>
		<description><![CDATA[Here is my theme for PHPStorm : weebox.xml (copy the file in ~/Library/Preferences/WebIDE10/colors/) &#160;]]></description>
			<content:encoded><![CDATA[<p>Here is my theme for <a href="http://www.jetbrains.com/phpstorm/">PHPStorm</a> : <a href="http://ma.tthi.eu/public/weebox.xml">weebox.xml</a> (copy the file in ~/Library/Preferences/WebIDE10/colors/)</p>

<a href='http://ma.tthi.eu/blog/2011/07/10/phpstorm-theme/phpstorm-weebox-theme-html/' title='phpstorm-weebox-theme-HTML'><img width="150" height="150" src="http://ma.tthi.eu/blog/wp-content/uploads/2011/07/phpstorm-weebox-theme-HTML-150x150.png" class="attachment-thumbnail" alt="phpstorm-weebox-theme-HTML" title="phpstorm-weebox-theme-HTML" /></a>
<a href='http://ma.tthi.eu/blog/2011/07/10/phpstorm-theme/phpstorm-weebox-theme-php/' title='phpstorm-weebox-theme-PHP'><img width="150" height="150" src="http://ma.tthi.eu/blog/wp-content/uploads/2011/07/phpstorm-weebox-theme-PHP-150x150.png" class="attachment-thumbnail" alt="phpstorm-weebox-theme-PHP" title="phpstorm-weebox-theme-PHP" /></a>

<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://ma.tthi.eu/blog/2011/07/10/phpstorm-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>convert HTML from TinyMCE to HTML readable by Flash</title>
		<link>http://ma.tthi.eu/blog/2011/02/16/convert-html-from-tinymce-to-html-readable-by-flash/</link>
		<comments>http://ma.tthi.eu/blog/2011/02/16/convert-html-from-tinymce-to-html-readable-by-flash/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 16:12:02 +0000</pubDate>
		<dc:creator>Matthieu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://ma.tthi.eu/blog/?p=75</guid>
		<description><![CDATA[This as3 class is usefull to convert HTML from TinyMCE to HTML readable by Flash TODO : find a way to center images The class is available on this repository : http://www.wbxdev.com/svn/TinyMCEHtmlParser/]]></description>
			<content:encoded><![CDATA[<p>This as3 class is usefull to convert HTML from TinyMCE to HTML readable by Flash<br />
TODO : find a way to center images</p>
<p>The class is available on this repository : <a href="http://www.wbxdev.com/svn/TinyMCEHtmlParser/">http://www.wbxdev.com/svn/TinyMCEHtmlParser/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ma.tthi.eu/blog/2011/02/16/convert-html-from-tinymce-to-html-readable-by-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony : Fatal error: Call to undefined function content_tag()</title>
		<link>http://ma.tthi.eu/blog/2011/02/11/symfony-fatal-error-call-to-undefined-function-content_tag/</link>
		<comments>http://ma.tthi.eu/blog/2011/02/11/symfony-fatal-error-call-to-undefined-function-content_tag/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 17:27:24 +0000</pubDate>
		<dc:creator>Matthieu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://ma.tthi.eu/blog/?p=69</guid>
		<description><![CDATA[If you get this error Fatal error: Call to undefined function content_tag() in (...)/lib/vendor/symfony/lib/helper/JavascriptBaseHelper.php on line 82 when trying to output HTML from an action like this : $this-&#62;getResponse()-&#62;setContentType('text/html'); $this-&#62;getResponse()-&#62;setContent("Hello World"); return sfView::NONE; that&#8217;s because you need to include the Tag helper : sfContext::getInstance()-&#62;getConfiguration()-&#62;loadHelpers('Tag');]]></description>
			<content:encoded><![CDATA[<p>If you get this error<br />
<code>Fatal error: Call to undefined function content_tag() in (...)/lib/vendor/symfony/lib/helper/JavascriptBaseHelper.php on line 82 </code><br />
when trying to output HTML from an action like this :<br />
<code>$this-&gt;getResponse()-&gt;setContentType('text/html');<br />
$this-&gt;getResponse()-&gt;setContent("<html><body>Hello World</body></html>");<br />
return sfView::NONE;</code><br />
that&#8217;s because you need to include the Tag helper :<br />
<code>sfContext::getInstance()-&gt;getConfiguration()-&gt;loadHelpers('Tag');</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ma.tthi.eu/blog/2011/02/11/symfony-fatal-error-call-to-undefined-function-content_tag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CKEditor to Flash HTML</title>
		<link>http://ma.tthi.eu/blog/2010/11/10/ckeditor-to-flash-html/</link>
		<comments>http://ma.tthi.eu/blog/2010/11/10/ckeditor-to-flash-html/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 09:58:22 +0000</pubDate>
		<dc:creator>Matthieu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://ma.tthi.eu/blog/?p=54</guid>
		<description><![CDATA[This as3 class is usefull to convert HTML from CKEditor to HTML readable by Flash It doesn&#8217;t process the &#60;image&#62; tag and the class attribute yet. package com.weebox &#123; &#160; public class CKEditorHtmlParser &#123; &#160; public static function parse&#40;p_str:String&#41;:String &#123; var xml:XML= new XML&#40;&#34;&#60;html&#62;&#34;+p_str+&#34;&#60;/html&#62;&#34;&#41;; &#160; calcXml&#40;xml&#41;; &#160; var str:String= xml.children&#40;&#41;.toString&#40;&#41;; &#160; str= str.replace&#40;/&#60;&#40;&#91;\/&#93;*&#41;em&#62;/gi, &#34;&#60;$1I&#62;&#34;&#41;; str= [...]]]></description>
			<content:encoded><![CDATA[<p>This as3 class is usefull to convert HTML from CKEditor to HTML readable by Flash<br />
It doesn&#8217;t process the &lt;image&gt; tag and the class attribute yet.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">weebox</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CKEditorHtmlParser <span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> parse<span style="color: #66cc66;">&#40;</span>p_str:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">String</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">xml</span>:<span style="color: #0066CC;">XML</span>= <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;&lt;html&gt;&quot;</span>+p_str+<span style="color: #ff0000;">&quot;&lt;/html&gt;&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			calcXml<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">xml</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> str:<span style="color: #0066CC;">String</span>= <span style="color: #0066CC;">xml</span>.<span style="color: #006600;">children</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			str= str.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">/&lt;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>\<span style="color: #66cc66;">/</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span>em<span style="color: #66cc66;">&gt;/</span>gi, <span style="color: #ff0000;">&quot;&lt;$1I&gt;&quot;</span><span style="color: #66cc66;">&#41;</span>;
			str= str.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">/&lt;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>\<span style="color: #66cc66;">/</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span>strong<span style="color: #66cc66;">&gt;/</span>gi, <span style="color: #ff0000;">&quot;&lt;$1B&gt;&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// saut de ligne entre paragraphes</span>
			str= str.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">/&lt;</span>\<span style="color: #66cc66;">/</span>p<span style="color: #66cc66;">&gt;/</span>gi, <span style="color: #ff0000;">&quot;&lt;/p&gt;&lt;br&gt;&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #b1b100;">return</span> str;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> calcXml<span style="color: #66cc66;">&#40;</span>p_xml:<span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">Number</span>, k:<span style="color: #0066CC;">Number</span>;
&nbsp;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>p_xml.<span style="color: #006600;">localName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">&quot;a&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>				
				<span style="color: #b1b100;">for</span> <span style="color: #b1b100;">each</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> attr <span style="color: #b1b100;">in</span> p_xml.<span style="color: #0066CC;">attributes</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>attr.<span style="color: #006600;">localName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">!</span>= <span style="color: #ff0000;">&quot;href&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
						<span style="color: #0066CC;">delete</span> p_xml.<span style="color: #66cc66;">@</span><span style="color: #66cc66;">&#91;</span>attr.<span style="color: #006600;">localName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>;
					<span style="color: #66cc66;">&#125;</span>
				<span style="color: #66cc66;">&#125;</span>
&nbsp;
				p_xml.<span style="color: #66cc66;">*</span>= <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;&lt;U&gt;&quot;</span> + p_xml.<span style="color: #66cc66;">*</span> + <span style="color: #ff0000;">&quot;&lt;/U&gt;&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
				p_xml.<span style="color: #006600;">setLocalName</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;A&quot;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>p_xml.<span style="color: #006600;">localName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">&quot;p&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>p_xml.<span style="color: #66cc66;">@</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;class&quot;</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					<span style="color: #0066CC;">delete</span> p_xml.<span style="color: #66cc66;">@</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;class&quot;</span><span style="color: #66cc66;">&#93;</span>;
				<span style="color: #66cc66;">&#125;</span>
&nbsp;
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>p_xml.<span style="color: #66cc66;">@</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;style&quot;</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					p_xml.<span style="color: #66cc66;">*</span>= <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;&lt;FONT &quot;</span> + calcStyle<span style="color: #66cc66;">&#40;</span>p_xml.<span style="color: #66cc66;">@</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;style&quot;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">&quot;&gt;&quot;</span> + p_xml.<span style="color: #66cc66;">*</span> + <span style="color: #ff0000;">&quot;&lt;/FONT&gt;&quot;</span><span style="color: #66cc66;">&#41;</span>;
					<span style="color: #0066CC;">delete</span> p_xml.<span style="color: #66cc66;">@</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;style&quot;</span><span style="color: #66cc66;">&#93;</span>;
				<span style="color: #66cc66;">&#125;</span>
&nbsp;
				p_xml.<span style="color: #006600;">setLocalName</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;P&quot;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>p_xml.<span style="color: #006600;">localName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">&quot;span&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">var</span> style:<span style="color: #0066CC;">String</span>, astyle:<span style="color: #0066CC;">Array</span>;
&nbsp;
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>p_xml.<span style="color: #66cc66;">@</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;style&quot;</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					style= calcStyle<span style="color: #66cc66;">&#40;</span>p_xml.<span style="color: #66cc66;">@</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;style&quot;</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
					astyle= style.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;;&quot;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
&nbsp;
				<span style="color: #b1b100;">for</span> <span style="color: #b1b100;">each</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> attr <span style="color: #b1b100;">in</span> p_xml.<span style="color: #0066CC;">attributes</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					<span style="color: #0066CC;">delete</span> p_xml.<span style="color: #66cc66;">@</span><span style="color: #66cc66;">&#91;</span>attr.<span style="color: #006600;">localName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
				<span style="color: #66cc66;">&#125;</span>
&nbsp;
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>astyle <span style="color: #66cc66;">&amp;&amp;</span> astyle.<span style="color: #0066CC;">length</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					<span style="color: #b1b100;">for</span> <span style="color: #b1b100;">each</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> s:<span style="color: #0066CC;">String</span> <span style="color: #b1b100;">in</span> astyle<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
						<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>s.<span style="color: #0066CC;">length</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&amp;&amp;</span> s.<span style="color: #006600;">match</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;=&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">length</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
							<span style="color: #000000; font-weight: bold;">var</span> a:<span style="color: #0066CC;">Array</span>= s.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;=&quot;</span><span style="color: #66cc66;">&#41;</span>;
							p_xml.<span style="color: #66cc66;">@</span><span style="color: #66cc66;">&#91;</span>a<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span>= a<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">/</span><span style="color: #66cc66;">&#91;</span>\s<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">*</span><span style="color: #ff0000;">&quot;[<span style="color: #000099; font-weight: bold;">\s</span>]*/ig, &quot;</span><span style="color: #ff0000;">&quot;);
						}
					}
				}
&nbsp;
				p_xml.setLocalName(&quot;</span><span style="color: #0066CC;">FONT</span><span style="color: #ff0000;">&quot;);
			}
&nbsp;
			for (i=0; i&lt;p_xml.children().length(); i++) {
				calcXml(p_xml.children()[i]);
			}
		}
&nbsp;
		private static function calcStyle(p_style:String):String {
			// delete unwanted style attributes
			p_style= p_style.match(/(<span style="color: #000099; font-weight: bold;">\s</span>+|&quot;</span>+<span style="color: #66cc66;">|</span>^<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>font-<span style="color: #0066CC;">size</span><span style="color: #66cc66;">|</span>font-family<span style="color: #66cc66;">|</span>color<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span>\s<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">*</span>:<span style="color: #66cc66;">&#91;</span>\s<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#91;</span>^;<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">*</span>;<span style="color: #66cc66;">/</span>gi<span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">join</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot; &quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// replace color attribute</span>
			p_style= p_style.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">/</span><span style="color: #0066CC;">color</span>:<span style="color: #66cc66;">&#91;</span>\s<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#40;</span>.<span style="color: #66cc66;">*</span>?<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span> <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">*</span>;<span style="color: #66cc66;">/</span>gi, <span style="color: #000000; font-weight: bold;">function</span> regexpColorReplace<span style="color: #66cc66;">&#40;</span>p_matched_substr:<span style="color: #0066CC;">String</span>, p_match_1:<span style="color: #0066CC;">String</span>, p_index:<span style="color: #0066CC;">int</span>, p_str:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">String</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #b1b100;">return</span> <span style="color: #ff0000;">'COLOR=&quot;'</span> + calcColor<span style="color: #66cc66;">&#40;</span>p_match_1<span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">'&quot; '</span>; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// replace font-size attribute</span>
			p_style = p_style.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">/</span>font-<span style="color: #0066CC;">size</span>:<span style="color: #66cc66;">&#91;</span>\s<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>\d<span style="color: #66cc66;">&#93;</span>+<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>^;<span style="color: #66cc66;">&#93;</span>+<span style="color: #66cc66;">&#41;</span>;<span style="color: #66cc66;">/</span>gi, <span style="color: #ff0000;">&quot;SIZE=<span style="color: #000099; font-weight: bold;">\&quot;</span>$1<span style="color: #000099; font-weight: bold;">\&quot;</span> &quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// replace font-family attribute</span>
			p_style = p_style.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">/</span>font-family:<span style="color: #66cc66;">&#91;</span>\s<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#40;</span>.<span style="color: #66cc66;">*</span>?<span style="color: #66cc66;">&#41;</span>;<span style="color: #66cc66;">/</span>gi, <span style="color: #ff0000;">&quot;FACE=<span style="color: #000099; font-weight: bold;">\&quot;</span>$1<span style="color: #000099; font-weight: bold;">\&quot;</span> &quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #b1b100;">return</span> p_style;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> calcColor<span style="color: #66cc66;">&#40;</span>p_color:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">String</span> <span style="color: #66cc66;">&#123;</span>
			p_color = p_color.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;black&quot;</span>, <span style="color: #ff0000;">&quot;#000000&quot;</span><span style="color: #66cc66;">&#41;</span>;
			p_color = p_color.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;white&quot;</span>, <span style="color: #ff0000;">&quot;#ffffff&quot;</span><span style="color: #66cc66;">&#41;</span>;
			p_color = p_color.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;red&quot;</span>, <span style="color: #ff0000;">&quot;#ff0000&quot;</span><span style="color: #66cc66;">&#41;</span>;
			p_color = p_color.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;green&quot;</span>, <span style="color: #ff0000;">&quot;#00ff00&quot;</span><span style="color: #66cc66;">&#41;</span>;
			p_color = p_color.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;blue&quot;</span>, <span style="color: #ff0000;">&quot;#0000ff&quot;</span><span style="color: #66cc66;">&#41;</span>;
			p_color = p_color.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;yellow&quot;</span>, <span style="color: #ff0000;">&quot;#ffff00&quot;</span><span style="color: #66cc66;">&#41;</span>;
			p_color = p_color.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;aqua&quot;</span>, <span style="color: #ff0000;">&quot;#00ffff&quot;</span><span style="color: #66cc66;">&#41;</span>;
			p_color = p_color.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;fuchsia&quot;</span>, <span style="color: #ff0000;">&quot;#ff00ff&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// rgb(r, g, b) =&gt; #rgb</span>
			p_color = p_color.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">/</span>rgb<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>\d<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span>, <span style="color: #66cc66;">&#93;</span>+<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>\d<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span>, <span style="color: #66cc66;">&#93;</span>+<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>\d<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">/</span>gi, <span style="color: #000000; font-weight: bold;">function</span> regexpColorReplace<span style="color: #66cc66;">&#40;</span>p_matched_substr:<span style="color: #0066CC;">String</span>, p_match_1:<span style="color: #0066CC;">String</span>, p_match_2:<span style="color: #0066CC;">String</span>, p_match_3:<span style="color: #0066CC;">String</span>, p_index:<span style="color: #0066CC;">int</span>, p_str:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">String</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">var</span> n:<span style="color: #0066CC;">Number</span>= <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span>p_match_1<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span>0x10000 + <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span>p_match_2<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span>0x100 + <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span>p_match_3<span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">return</span> <span style="color: #ff0000;">&quot;#&quot;</span> + n.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #b1b100;">return</span> p_color;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://ma.tthi.eu/blog/2010/11/10/ckeditor-to-flash-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>flash compilation problem : white screen</title>
		<link>http://ma.tthi.eu/blog/2010/06/27/flash-compilation-problem-white-screen/</link>
		<comments>http://ma.tthi.eu/blog/2010/06/27/flash-compilation-problem-white-screen/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 16:31:19 +0000</pubDate>
		<dc:creator>Matthieu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://ma.tthi.eu/blog/?p=48</guid>
		<description><![CDATA[if error &#8220;5005: Unknown error optimizing byte code&#8221; and white screen at compilation, we can increase the memory given to the compilator : create the file ~/.MacOSX/environment.plist and copy : &#60;?xml version="1.0" encoding="UTF-8"?&#62; &#60;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&#62; &#60;plist version="1.0"&#62; &#60;dict&#62; &#60;key&#62;JAVA_TOOL_OPTIONS&#60;/key&#62; &#60;string&#62;-Xmx512m&#60;/string&#62; &#60;/dict&#62; &#60;/plist&#62; then log out for the change to take [...]]]></description>
			<content:encoded><![CDATA[<p>if error &#8220;5005: Unknown error optimizing byte code&#8221; and white screen at compilation, we can increase the memory given to the compilator :</p>
<p>create the file ~/.MacOSX/environment.plist and copy :<br />
<code><br />
&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;<br />
&lt;plist version="1.0"&gt;<br />
&lt;dict&gt;<br />
&lt;key&gt;JAVA_TOOL_OPTIONS&lt;/key&gt;<br />
&lt;string&gt;-Xmx512m&lt;/string&gt;<br />
&lt;/dict&gt;<br />
&lt;/plist&gt;<br />
</code></p>
<p>then log out for the change to take effect</p>
<p>with CS5 we also should modify this file : ~/Library/Application Support/Adobe/Flash CS5/en_US/Configuration/ActionScript3.0/jvm.ini<br />
and change -Xmx128m by -Xmx512m</p>
<p>restart flash and it should be ok</p>
]]></content:encoded>
			<wfw:commentRss>http://ma.tthi.eu/blog/2010/06/27/flash-compilation-problem-white-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a Debian Virtual Machine as local server in OS X (2)</title>
		<link>http://ma.tthi.eu/blog/2010/06/20/using-a-debian-virtual-machine-as-local-server-in-os-x-2/</link>
		<comments>http://ma.tthi.eu/blog/2010/06/20/using-a-debian-virtual-machine-as-local-server-in-os-x-2/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 13:00:22 +0000</pubDate>
		<dc:creator>Matthieu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://ma.tthi.eu/blog/?p=41</guid>
		<description><![CDATA[install debian virtualbox preferences &#62; network &#62; adapter : 192.168.3.1 dhcp server : off settings &#62; network : adapter 1 : host-only adapter adapter 2 : NAT settings &#62; storage : CD/DVD : VBoxGuestAdditions restart virtualbox start vm nano /etc/network/interface auto eth0 iface eth0 inet static address 192.168.3.3 netmask 255.255.255.0 auto eth1 iface eth1 inet [...]]]></description>
			<content:encoded><![CDATA[<p>install debian</p>
<p>virtualbox preferences &gt; network &gt;<br />
adapter : 192.168.3.1<br />
dhcp server : off</p>
<p>settings &gt; network :<br />
adapter 1 : host-only adapter<br />
adapter 2 : NAT</p>
<p>settings &gt; storage :<br />
CD/DVD : VBoxGuestAdditions</p>
<p>restart virtualbox</p>
<p>start vm</p>
<p>nano /etc/network/interface<br />
<code>auto eth0<br />
iface eth0 inet static<br />
address 192.168.3.3<br />
netmask 255.255.255.0</code></p>
<p>auto eth1<br />
iface eth1 inet dhcp</p>
<p>(use ifconfig -a to get the right interface name : eth0, eth1, eth2, …)</p>
<p>aptitude install virtualbox-ose-guest-dkms</p>
<p>virtualbox : settings &gt; shared folders &gt; add</p>
<p>rm -f /var/www/*</p>
<p>nano /etc/fstab</p>
<p><code>Sites    /var/www/    vboxsf    defaults,uid=33,gid=33    0    0</code></p>
<p>uid=33, gid=33 -&gt; mount as user www-data so that apache can write to disk (file upload, etc ..)</p>
<p>EDIT: there is an annoying cache bug with apache which is solved by turning off EnableSendfile (source : http://forums.virtualbox.org/viewtopic.php?f=3&#038;t=33201#p148839) :<br />
nano /etc/apache2/apache2.conf<br />
<code>EnableSendfile off</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ma.tthi.eu/blog/2010/06/20/using-a-debian-virtual-machine-as-local-server-in-os-x-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>GeekTool for Snow Leopard</title>
		<link>http://ma.tthi.eu/blog/2010/05/11/geektool-for-snow-leopard/</link>
		<comments>http://ma.tthi.eu/blog/2010/05/11/geektool-for-snow-leopard/#comments</comments>
		<pubDate>Tue, 11 May 2010 19:00:31 +0000</pubDate>
		<dc:creator>Matthieu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://ma.tthi.eu/blog/?p=35</guid>
		<description><![CDATA[calendrier : cal &#124; sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e &#124; sed 's/./#/g') /" date : date +'%A %d %B %H:%M:%S' OS : echo `sw_vers -productName` `sw_vers -productVersion` `sw_vers -buildVersion` IP externe : echo "External :" `curl --silent http://checkip.dyndns.org &#124; awk '{print $6}' &#124; cut -f 1 -d "&#60;"` IP ethernet : [...]]]></description>
			<content:encoded><![CDATA[<p>calendrier :<br />
<code>cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./#/g') /"</code></p>
<p>date :<br />
<code>date +'%A %d %B %H:%M:%S'</code></p>
<p>OS :<br />
<code>echo `sw_vers -productName` `sw_vers -productVersion` `sw_vers -buildVersion`</code></p>
<p>IP externe :<br />
<code>echo "External :" `curl --silent http://checkip.dyndns.org | awk '{print $6}' | cut -f 1 -d "&lt;"`<br />
</code><br />
IP ethernet :<br />
<code>echo  Ethernet : `ifconfig en0 | grep "inet " | grep -v 127.0.0.1 | awk '{print $2}'`</code></p>
<p>IP airport :<br />
<code>echo  Airport : `ifconfig en1 | grep "inet " | grep -v 127.0.0.1 | awk '{print $2}'`<br />
</code><br />
Wifi :<br />
<code>echo wifi: `system_profiler SPAirPortDataType | grep -A 1 "Current Network Information:" | tail -1`</code></p>
<p>Top :<br />
<code>top -l1 -ocpu -F -R -l2 -n10 | tail -n 11 | cut -c 1-38</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ma.tthi.eu/blog/2010/05/11/geektool-for-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a Debian Virtual Machine as local server in OS X</title>
		<link>http://ma.tthi.eu/blog/2009/05/10/using-a-debian-virtual-machine-as-local-server-in-os-x/</link>
		<comments>http://ma.tthi.eu/blog/2009/05/10/using-a-debian-virtual-machine-as-local-server-in-os-x/#comments</comments>
		<pubDate>Sun, 10 May 2009 17:08:12 +0000</pubDate>
		<dc:creator>Matthieu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://ma.tthi.eu/blog/?p=8</guid>
		<description><![CDATA[old -&#62; updated version This post will explain how to use a Debian virtual machine as a local server in OS X instead of the LAMP packaged by Apple. If you&#8217;re like me and use OS X as your workstation but have a Debian production server, it could be very useful to be able to [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>old -&gt; <a href="http://ma.tthi.eu/blog/2010/06/20/using-a-debian-virtual-machine-as-local-server-in-os-x-2/">updated version</a></strong></span></p>
<p>This post will explain how to use a Debian virtual machine as a local server in OS X instead of the LAMP packaged by Apple.</p>
<p>If you&#8217;re like me and use OS X as your workstation but have a Debian production server, it could be very useful to be able to test your websites locally directly into a Debian server similar to your production one. To achieve that, we are going to install a Debian virtual machine in OS X and make them communicate by NFS. That way we will be able to develop with our favorite tool (like <a href="http://macromates.com/">textmate</a>) in OS X with our websites in ~/Sites being read by the Debian VM</p>
<p>1) First we need to install a VM engine (like <a href="http://www.virtualbox.org/">VirtualBox</a>) and install a Debian Linux with Apache, PHP. etc &#8230;</p>
<p>[EDIT]<br />
By default the network adapter is in NAT mode and get its IP directly from your router, which means that you can&#8217;t access your VM if you&#8217;re not connected.<br />
By using the &#8220;host-only adapter&#8221; mode you can access your VM at 192.168.56.3 (default IP, you can change that in VirtualBox preferences) with or without being connected to a network<br />
-&gt; &#8220;Settings / Network / Adapter 1 / Attached To&#8221; select &#8220;host-only Adapter&#8221;<br />
[/EDIT]</p>
<p>[EDIT 2]<br />
you can set up a second adapter as NAT to give internet access to the VM<br />
-&gt; &#8220;Settings / Network / Adapter 2 / Attached To &#8220;NAT&#8221;</p>
<p>and configure /etc/network/interface according :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">auto eth0
iface eth0 inet dhcp
&nbsp;
auto eth1
iface eth1 inet dhcp</pre></div></div>

<p>(use ifconfig -a to get the right interface name : eth0, eth1, eth2, &#8230;)<br />
[/EDIT 2]</p>
<p>2) Setup NFS export on OS X (you will need to be root for that) to allow NFS connection for the OS X user.</p>
<p>You need to know your user uid and gid. You can get them by typing (as your user, not as root) :</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">id</pre></div></div>

<p>and you should get something like that :</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">uid=501(myusername) gid=20(staff)</pre></div></div>

<p>Now setup the NFS export :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>exports</pre></div></div>

<p>and add this line :</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">/Users/myusername/Sites -network=192.168.0.0 -mask=255.255.0.0 -rw,no_root_squash,anonuid=501, anongid=20</pre></div></div>

<p>then type</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">nfsd update</pre></div></div>

<p>and</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">showmount <span style="color: #660033;">-e</span></pre></div></div>

<p>if the NFS export is correct you should see :</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">/Users/myusername/Sites              192.168.0.0</pre></div></div>

<p>3) Now on the Debian side we create the same user (myusername, uid=501, gid=20) :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">adduser myusername <span style="color: #660033;">--home</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>myusername <span style="color: #660033;">--shell</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #660033;">--uid</span> <span style="color: #000000;">501</span> <span style="color: #660033;">--gid</span> <span style="color: #000000;">20</span></pre></div></div>

<p>and we create a folder www in myusername home folder which will be the mount point for the NFS connection :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>myusername<span style="color: #000000; font-weight: bold;">/</span>www</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chown</span> myusername: <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>myusername<span style="color: #000000; font-weight: bold;">/</span>www</pre></div></div>

<p>we install portmap and nfs-common:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> portmap nfs-common</pre></div></div>

<p>and edit /etc/fstab to automatically mount the NFS connection at boot time :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>fstab</pre></div></div>

<p>and add this line (machostname is the OS X hostname) :</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">192.168.56.1:/Users/myusername/Sites /home/myusername/www nfs user,rw,exec 0 0</pre></div></div>

<p>reboot (the Debian VM)</p>
<p>after reboot is completed you should be able to access the /Users/myusername/Sites content from OS X in the /home/myusername/www in the Debian VM</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> 192.168.56.3 - l myusername</pre></div></div>

<p>5) configure apache</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites-available<span style="color: #000000; font-weight: bold;">/</span>default</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">NameVirtualHost *
&nbsp;
ServerAdmin webmaster@localhost
DocumentRoot /home/myusername/www</pre></div></div>

<p>and reload apache configuration :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d apache2 reload</pre></div></div>

<p>voila, you should be able to see the website in Sites by going to the url http://192.168.56.3</p>
]]></content:encoded>
			<wfw:commentRss>http://ma.tthi.eu/blog/2009/05/10/using-a-debian-virtual-machine-as-local-server-in-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PageFlip with shadows</title>
		<link>http://ma.tthi.eu/blog/2009/05/07/pageflip-with-shadows/</link>
		<comments>http://ma.tthi.eu/blog/2009/05/07/pageflip-with-shadows/#comments</comments>
		<pubDate>Wed, 06 May 2009 23:25:54 +0000</pubDate>
		<dc:creator>Matthieu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://ma.tthi.eu/blog/?p=3</guid>
		<description><![CDATA[I took the very good PageFlip class from Didier Brun and added support for shadows. It adds 3 different shadows : one shadow on the fixed page side one shadow on the inside of the flipped page one shadow on the outside of the flipped page It doesn&#8217;t work with the vertical mode (!ish) but [...]]]></description>
			<content:encoded><![CDATA[<p>I took the very good <a href="http://www.bytearray.org/?p=77">PageFlip class from Didier Brun</a> and added support for shadows. It adds 3 different shadows :</p>
<ol>
<li>one shadow on the fixed page side</li>
<li>one shadow on the inside of the flipped page</li>
<li>one shadow on the outside of the flipped page</li>
</ol>
<p>It doesn&#8217;t work with the vertical mode (!ish) but works ok with the horizontal mode</p>
<p><a href="http://ma.tthi.eu/dev/pageflip/">demo</a></p>
<p><a href="http://ma.tthi.eu/dev/pageflip/PageFlip.as.zip">download source</a></p>
<p><a href="http://ma.tthi.eu/dev/pageflip/demo.src.zip">download demo source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ma.tthi.eu/blog/2009/05/07/pageflip-with-shadows/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

