<?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>DuoCoding: Coding together</title>
	<atom:link href="http://www.duocoding.nl/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.duocoding.nl/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 07 Oct 2010 13:56:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to: Embed dot graphs (graphviz) in LaTeX</title>
		<link>http://www.duocoding.nl/blog/249/how-to-embed-dot-graphs-graphviz-in-latex</link>
		<comments>http://www.duocoding.nl/blog/249/how-to-embed-dot-graphs-graphviz-in-latex#comments</comments>
		<pubDate>Mon, 13 Sep 2010 21:57:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How-to's]]></category>
		<category><![CDATA[dot]]></category>
		<category><![CDATA[Gedit]]></category>
		<category><![CDATA[graphs]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://www.duocoding.nl/blog/?p=249</guid>
		<description><![CDATA[Dot graphs (from GraphViz) are known for their easiness in expressing complex graphs in a plain text format and generating those graphs file into static images. For example, look at the following dot graph:
digraph Example {
rankdir=LR;

node [shape="box",color="blue"]; q_0 q_1 q_2 q_3 q_4 q_6 q_7 q_8 q_9 q_10;
node [shape="circle",color="black"]; q_5;

q_0 -&#62; q_1 [label="1"];
q_1 -&#62; q_2 [label="1"];
q_2 [...]]]></description>
			<content:encoded><![CDATA[<p>Dot graphs (from <a title="GraphViz: Graph Visualization Software" href="http://www.graphviz.org">GraphViz</a>) are known for their easiness in expressing complex graphs in a plain text format and generating those graphs file into static images. For example, look at the following dot graph:</p>
<pre>digraph Example {
rankdir=LR;

node [shape="box",color="blue"]; q_0 q_1 q_2 q_3 q_4 q_6 q_7 q_8 q_9 q_10;
node [shape="circle",color="black"]; q_5;

q_0 -&gt; q_1 [label="1"];
q_1 -&gt; q_2 [label="1"];
q_2 -&gt; q_3 [label="1"];
q_3 -&gt; q_4 [label="1"];
q_4 -&gt; q_5 [label="1"];
q_5 -&gt; q_5 [label="0, 1"];

q_0 -&gt; q_6 [label="0"];
q_1 -&gt; q_7 [label="0"];
q_2 -&gt; q_8 [label="0"];
q_3 -&gt; q_9 [label="0"];
q_4 -&gt; q_10 [label="0"];

q_6 -&gt; q_7 [label="0, 1"];
q_7 -&gt; q_8 [label="0, 1"];
q_8 -&gt; q_9 [label="0, 1"];
q_9 -&gt; q_10 [label="0, 1"];

q_10 -&gt; q_0 [label="0, 1"];
}</pre>
<p>A graph starts with &#8220;graph&#8221; or &#8220;digraph&#8221;, followed by its name. Properties of the graph are wrapped in a pair of accolades. In this example, the first property is &#8220;<code>rankdir=LR</code>&#8220;, which sets the orientation of the graph to left-to-right (instead of the default top-to-bottom). Line four and five define the appearance of each node used in the graph. At the end of this dot graph is a list of relations between the defined nodes. Below is the generated image of this graph.</p>
<div id="attachment_265" class="wp-caption aligncenter" style="width: 434px"><a href="http://www.duocoding.nl/blog/wp-content/uploads/2010/09/automata.png"><img class="size-full wp-image-265 " title="automaton generated by GraphViz' dot graphs" src="http://www.duocoding.nl/blog/wp-content/uploads/2010/09/automata.png" alt="automaton generated by GraphViz' dot graphs" width="424" height="132" /></a><p class="wp-caption-text">automaton generated by GraphViz&#39; dot graphs</p></div>
<p><span id="more-249"></span>On Debian(-based) distributions, you can install the required packages with the following command:</p>
<pre>sudo apt-get install graphviz dot2tex gedit-latex-plugin</pre>
<h3>Configuring Gedit&#8217;s LaTeX plugin</h3>
<p>Enable GeditLaTeXPlugin in Gedit using the menu Edit → Preferences. At the Preferences dialog, click on the tab &#8220;Plugins&#8221;, scroll down to &#8220;Gedit LaTeX Plugin&#8221; and check its checkbox. Close the dialog and restart Gedit.</p>
<p>GeditLaTeXPlugin does not natively support embedded dot graphs, because <code>rubber</code> is used to process the LaTeX documents instead of <code>pdflatex</code>. To fix this, you should open the following file:</p>
<pre>sudo gedit /usr/lib/gedit-2/plugins/GeditLaTeXPlugin/tools.xml</pre>
<p>At line number 3 and 7, you will find:</p>
<pre>&lt;job mustSucceed="true" postProcessor="RubberPostProcessor"&gt;
  rubber --inplace --maxerr -1 --short --force --warn all --pdf "$filename"
&lt;/job&gt;</pre>
<p>Replace the lines at line number 3 and 7 with the following:</p>
<pre>&lt;job mustSucceed="true" postProcessor="RubberPostProcessor"&gt;<span><span>
  pdflatex</span><span> -shell</span><span>-escape</span><span> -src</span><span> -<span>interaction</span></span><span>=nonstopmode "</span></span>$filename<span><span>"</span></span>
&lt;/job&gt;</pre>
<h3>Fixing dot2tex</h3>
<p>At the bottom of Gedit is a so-called &#8220;buttom-panel&#8221; containing tabs for a python console, terminal and LaTeX output (its tab name is &#8220;tools&#8221;). The latter one lists errors occurred during the compilation of a LaTeX document. The dot2tex script uses the deprecated module &#8220;md5&#8243;, which should be replaced by the module &#8220;hashlib&#8221;. Otherwise, a lot of useless warnings are logged in the LaTeX output tab. Edit the following file to fix these warnings:</p>
<pre>sudo gedit /usr/share/pyshared/dot2tex/dot2tex.py</pre>
<p>Scroll to line 2828 and replace the hashing code with the following lines of code:</p>
<pre>import hashlib, cPickle
if len(args) == 1 and options.outputfile:
    log.info('Caching enabled')
    inputfilename = args[0]
    # calculate hash from command line options and dotdata
    md5 = hashlib.md5()
    md5.update(dotdata + "".join(sys.argv))
    inputhash = md5.digest()</pre>
<h3>Embedding dot graphs</h3>
<p>Finally, it is time to demonstrate embedding dot graphs in a LaTeX document:</p>
<pre>\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

% dot graphs
\usepackage{dot2texi}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}

\author{Sander van Veen}
\title{Dot graphs in \LaTeX}

\begin{document}

\maketitle

\begin{dot2tex}[dot,options=-tmath --autosize --cache]
digraph G {
rankdir=LR;

node [shape="none"]; start ;

node [shape="box",color="blue"]; q_0;
node [shape="circle",color="black"]; q_1 q_2 q_3;

start -&gt; q_0;

q_0 -&gt; q_1 [label="1"];
q_1 -&gt; q_0 [label="1"];

q_1 -&gt; q_2 [label="0"];
q_2 -&gt; q_1 [label="0"];

q_2 -&gt; q_3 [label="1"];
q_3 -&gt; q_2 [label="1"];

q_3 -&gt; q_0 [label="0"];
q_0 -&gt; q_3 [label="0"];
}
\end{dot2tex}

\end{document}</pre>
<p>After &#8220;\begin{dot2tex}&#8221; are a couple of options shown used to alter the behaviour of dot2tex (<code>-tmath</code> substitutes for example _ with subscript, <code>--autosize</code> will reduce the dimension of the image and <code>--cache</code> will save the converted dot output). There are many possible options for dot2tex, which are documented in its manpage. Please note that dot2tex translates the dot format to tex (pstrikz to be exactly), and therefore does not support all features of dot.</p>
<p>Last but not least the output of the example LaTeX document: <a href="http://www.duocoding.nl/blog/wp-content/uploads/2010/09/example.pdf">output PDF of embedded dot graph</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.duocoding.nl/blog/249/how-to-embed-dot-graphs-graphviz-in-latex/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How-to: Install HipHop (PHP to C++ translator) on Ubuntu 9.10</title>
		<link>http://www.duocoding.nl/blog/226/installing-and-running-hiphop-php-to-c-translator-on-ubuntu-9-10</link>
		<comments>http://www.duocoding.nl/blog/226/installing-and-running-hiphop-php-to-c-translator-on-ubuntu-9-10#comments</comments>
		<pubDate>Sun, 04 Apr 2010 11:14:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How-to's]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.duocoding.nl/blog/?p=226</guid>
		<description><![CDATA[HipHop has been developed on CentOS and Fedora, building on Ubuntu 9.10 is experimental. At the moment, HipHop can only run on 64 bits systems. The following information about installing hiphop is provided by Facebook&#8217;s HipHop wiki.
Packages installation
Using sudo or as root user:
sudo apt-get install git-core cmake g++ libboost-dev flex bison re2c libmysqlclient-dev libxml2-dev libmcrypt-dev [...]]]></description>
			<content:encoded><![CDATA[<p>HipHop has been developed on CentOS and Fedora, building on Ubuntu 9.10 is experimental. At the moment, HipHop can only run on 64 bits systems. The following information about installing hiphop is provided by <a title="Building and installing Hiphop on Ubuntu 9.10" href="http://wiki.github.com/facebook/hiphop-php/building-and-installing-on-ubuntu-910" target="_blank">Facebook&#8217;s HipHop wiki</a>.</p>
<h3>Packages installation</h3>
<p>Using sudo or as root user:</p>
<pre>sudo apt-get install git-core cmake g++ libboost-dev flex bison re2c libmysqlclient-dev libxml2-dev libmcrypt-dev libicu-dev openssl binutils-dev libcap-dev libgd2-xpm-dev zlib1g-dev libtbb-dev libonig-dev libpcre3-dev git-core autoconf libtool libcurl4-openssl-dev libboost-system-dev libboost-program-options-dev libboost-filesystem-dev</pre>
<h3>Getting HipHop source-code</h3>
<pre>mkdir hiphop
cd hiphop
git clone git://github.com/facebook/hiphop-php.git
cd hiphop-php
export CMAKE_PREFIX_PATH=`/bin/pwd`/../
export HPHP_HOME=`/bin/pwd`
export HPHP_LIB=`/bin/pwd`/bin
git submodule init
git submodule update
cd ..</pre>
<h3>Building third-party libraries</h3>
<h4>libevent</h4>
<pre>wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
tar -xzvf libevent-1.4.13-stable.tar.gz
cd libevent-1.4.13-stable
cp ../hiphop-php/src/third_party/libevent.fb-changes.diff .
patch &lt; libevent.fb-changes.diff
./configure --prefix=$CMAKE_PREFIX_PATH
make
make install
cd ..</pre>
<h4>ICU4</h4>
<pre>wget http://download.icu-project.org/files/icu4c/4.2.1/icu4c-4_2_1-src.tgz
tar -xvzf icu4c-4_2_1-src.tgz
cd icu/source
./configure --prefix=$CMAKE_PREFIX_PATH
make
make install
cd ../../</pre>
<h4>libCurl</h4>
<p>Make sure that your system time is correct, otherwise ./configure will fail.</p>
<pre>wget http://curl.haxx.se/download/curl-7.20.0.tar.gz
tar -xvzf curl-7.20.0.tar.gz
cd curl-7.20.0
cp ../hiphop-php/src/third_party/libcurl.fb-changes.diff .
patch -p0 &lt; libcurl.fb-changes.diff
./configure --prefix=$CMAKE_PREFIX_PATH
make
make install
cd ..</pre>
<h3>Building HipHop</h3>
<pre>cd hiphop-php
cmake .
make</pre>
<p>Now, we have successfully compiled HipHop! The next post will contain information about using HipHop (compiling PHP code in various modes and circumventing some of HipHop&#8217;s limitations).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.duocoding.nl/blog/226/installing-and-running-hiphop-php-to-c-translator-on-ubuntu-9-10/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How-to: Profiling PHP scripts using XDebug</title>
		<link>http://www.duocoding.nl/blog/165/how-to-profiling-php-scripts-using-xdebug</link>
		<comments>http://www.duocoding.nl/blog/165/how-to-profiling-php-scripts-using-xdebug#comments</comments>
		<pubDate>Wed, 21 Oct 2009 18:20:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How-to's]]></category>
		<category><![CDATA[optimizing]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[XDebug]]></category>

		<guid isPermaLink="false">http://www.duocoding.nl/blog/?p=165</guid>
		<description><![CDATA[Today, I found a new tool the analyse PHP scripts for bottlenecks. By using XDebug you can collect a list of called functions and their runtime. That information is very useful, because the most time consuming tasks are most likely the ones you want to optimize. After collecting the information, we want to generate a [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I found a new tool the analyse PHP scripts for bottlenecks. By using <a title="XDebug: a PHP profiler and debugger" href="http://www.xdebug.org/" target="_blank">XDebug</a> you can collect a list of called functions and their runtime. That information is very useful, because the most time consuming tasks are most likely the ones you want to optimize. After collecting the information, we want to generate a graph to visualize the functions. The image below is a graph of the DuoWorks&#8217; main page. DuoWorks is a MVC PHP framework, designed for optimizing web applications performance, but that is another subject.</p>
<div id="attachment_174" class="wp-caption aligncenter" style="width: 480px"><img class="size-full wp-image-174" title="XDebug DuoWorks main page" src="http://www.duocoding.nl/blog/wp-content/uploads/2009/10/xdebug-duoworks-main-page.png" alt="An example of a dot graph of XDebug's profiling log of DuoWorks' main page" width="470" height="477" /><p class="wp-caption-text">An example of a dot graph of XDebug&#39;s profiling log of DuoWorks&#39; main page</p></div>
<p>Perhaps you already noticed that not every function is listed in the graph. This is because I generated the graph with the default threshold of at least 1% runtime. Every function with a runtime of less than 1% of 12 ms (= total runtime) is therefore not visible. These functions are useless to optimize anyway.</p>
<p><span id="more-165"></span></p>
<h3>Installing XDebug</h3>
<p>Installing XDebug is pretty easy, because it is available in the Ubuntu repositories.</p>
<pre>sudo apt-get install php5-xdebug</pre>
<p>After installing, we need to customize the XDebug configuration. Append the following lines to <code>/etc/php5/conf.d/xdebug.ini</code>:</p>
<pre>[xdebug]
; enable profiler
xdebug.profiler_enable=On
<span>xdebug.profiler_output_name=profiler-%s-%t</span>
xdebug.profiler_output_dir=/tmp/xdebug</pre>
<p><strong>Note:</strong> please make sure that the profiler output directory exists. Otherwise XDebug wouldn&#8217;t be able to write its profiler logs.</p>
<p>Finally, we restart the web server (Lighttpd in this case).</p>
<pre>sudo /etc/init.d/lighttpd restart</pre>
<h3>Profiling PHP scripts</h3>
<p>After restarting the webserver, we can start profiling PHP scripts. Simply open your browser and go to a PHP page. The XDebug log will be saved in <code>/tmp/xdebug/</code> on your webserver. Download the log file to your PC, save it as &#8220;<code>xdebug.log</code>&#8221; and we are ready to start inspecting the log.</p>
<h3>Creating a dot graph from the XDebug log</h3>
<p>Most of the times, images say more than a thousand words. Therefore we will generate a dot graph from the profiling log. We will use the <a title="XDebugToolkit on Google Code" href="http://code.google.com/p/xdebugtoolkit/" target="_blank">xdebugtoolkit</a> to convert the XDebug cachegrind (= &#8220;<code>xdebug.log</code>&#8220;) to a dot graph. Make sure that the cachegrind file is in the parent directory of the XDebugToolkit. The following line will install the XDebugToolkit:</p>
<pre>svn co http://xdebugtoolkit.googlecode.com/svn/tags/0.1.3/xdebugtoolkit/ xdebugtoolkit</pre>
<p>Make sure you have installed the GraphViz packages (which contains dot):</p>
<pre>sudo apt-get install graphviz</pre>
<p>Now, we can finally start generating the dot graph:</p>
<pre>cd xdebugtoolkit/
cg2dot.py ../xdebug.log | dot -Tpng -o ../xdebug.png</pre>
<p>As I mentioned in the introduction, the XDebugToolkit uses a default threshold of 1%. You can change this threshold by adding <code>-t THRESHOLD</code> to the argument list. If you want to disable the threshold, use <code>-t 0</code> and all called functions and their runtime will be displayed. However, disabling the threshold is not recommended, because it will generate a huge graph. The following line will generate a graph with all called the functions:</p>
<pre>cg2dot.py -t 0 ../xdebug.log | dot -Tpng -o ../xdebug-all.png</pre>
<p>Enjoy profiling your PHP scripts!</p>
<p><strong>Update:</strong> Added Daniel&#8217;s notes to the How-to. Thanks Daniel!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.duocoding.nl/blog/165/how-to-profiling-php-scripts-using-xdebug/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DuoStyle: a cross-browser, well-organized, user-friendly CSS component framework</title>
		<link>http://www.duocoding.nl/blog/148/duostyle-a-cross-browser-well-organized-user-friendly-css-component-framework</link>
		<comments>http://www.duocoding.nl/blog/148/duostyle-a-cross-browser-well-organized-user-friendly-css-component-framework#comments</comments>
		<pubDate>Sat, 10 Oct 2009 20:16:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Concepts]]></category>

		<guid isPermaLink="false">http://www.duocoding.nl/blog/?p=148</guid>
		<description><![CDATA[The framework is a collection of the following components.
User Interface

Galleries (with thumbnails)
Grids
Lists
Treeviews
Toolbars

Buttons
Dropdown boxes


Tooltips

Website

Breadcrumbs
Typography

Code blocks
Headers
Lists (bullets and numeric)
Text


Fieldsets
Forms

Check- and radio boxes
Input boxes
Textareas



]]></description>
			<content:encoded><![CDATA[<p>The framework is a collection of the following components.</p>
<h3>User Interface</h3>
<ul>
<li>Galleries (with thumbnails)</li>
<li>Grids</li>
<li>Lists</li>
<li>Treeviews</li>
<li>Toolbars
<ul>
<li>Buttons</li>
<li>Dropdown boxes</li>
</ul>
</li>
<li>Tooltips</li>
</ul>
<h3>Website</h3>
<ul>
<li>Breadcrumbs</li>
<li>Typography
<ul>
<li>Code blocks</li>
<li>Headers</li>
<li>Lists (bullets and numeric)</li>
<li>Text</li>
</ul>
</li>
<li>Fieldsets</li>
<li>Forms
<ul>
<li>Check- and radio boxes</li>
<li>Input boxes</li>
<li>Textareas</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.duocoding.nl/blog/148/duostyle-a-cross-browser-well-organized-user-friendly-css-component-framework/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How-to: Install Prism 1.0 with Adobe Flash Player 10 on Ubuntu 8.10 (Intrepid Ibex)</title>
		<link>http://www.duocoding.nl/blog/9/how-to-install-prism-1-0-with-adobe-flash-player-10-on-ubuntu-intrepid-ibex</link>
		<comments>http://www.duocoding.nl/blog/9/how-to-install-prism-1-0-with-adobe-flash-player-10-on-ubuntu-intrepid-ibex#comments</comments>
		<pubDate>Tue, 04 Aug 2009 14:53:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How-to's]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Prism]]></category>

		<guid isPermaLink="false">http://www.duocoding.nl/blog/?p=9</guid>
		<description><![CDATA[As an active Firefox user, I would like to share Prism with you. Prism is a so-called single site browser and runs each instance in a different, sandboxed process. Therefore it is useful for browsing heavyweight web applications. Tabbed browsers might slow down, when opening a webpage with many and/or large JavaScripts.
Prism allows you to [...]]]></description>
			<content:encoded><![CDATA[<p>As an active Firefox user, I would like to share <a title="Mozilla Prism" href="http://prism.mozilla.com/" target="_blank">Prism</a> with you. Prism is a so-called <a title="Background information of a single site browser" href="http://en.wikipedia.org/wiki/Site-specific_browser" target="_blank">single site browser</a> and runs each instance in a different, sandboxed process. Therefore it is useful for browsing heavyweight web applications. Tabbed browsers might slow down, when opening a webpage with many and/or large JavaScripts.</p>
<div id="attachment_20" class="wp-caption aligncenter" style="width: 480px"><img class="size-full wp-image-20" title="YouTube running in Prism" src="http://www.duocoding.nl/blog/wp-content/uploads/2009/08/prism-window-google-talks.png" alt="YouTube running in Prism" width="470" height="392" /><p class="wp-caption-text">YouTube running in Prism</p></div>
<p>Prism allows you to browse web applications with an minimalistic user interface. Applications can be opened from the dock or a shortcut on the desktop. Just like normal applications!</p>
<p>This how-to installs prism from the binaries provided by Mozilla and not from the Ubuntu repository. The version in the Ubuntu repository is a bit out of date and therefore it misses some essential features.</p>
<p>First, we get the Prism binaries and move the folder to /usr/share/prism/.</p>
<pre>mkdir prism
cd prism/
wget http://prism.mozilla.com/downloads/1.0b1/prism-1.0b1.en-US.linux-i686.tar.bz2
tar --bzip2 -xf prism-1.0b1.en-US.linux-i686.tar.bz2
sudo mv prism /usr/share/</pre>
<p>Then its time to install the Flash Player. You need to install the Flash Player plug-in in each user directory, otherwise the Flash Player wouldn&#8221;t work for that user.</p>
<pre>wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz
tar xfz install_flash_player_10_linux.tar.gz

for path in /home/*
do
 if [ -d "$path" ]
 then
 mkdir -p $path/.prism/plugins
 cp install_flash_player_10_linux/libflashplayer.so $path/.prism/plugins/libflashplayer.so
 fi
done</pre>
<p>After installing the Flash Player plugin, Prism is ready to use! You can now create shortcuts by running the following command:</p>
<pre>/usr/share/prism</pre>
<p>Enjoy the power of Prism!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.duocoding.nl/blog/9/how-to-install-prism-1-0-with-adobe-flash-player-10-on-ubuntu-intrepid-ibex/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How-to: Install Trac on Ubuntu 8.10 (Intrepid Ibex)</title>
		<link>http://www.duocoding.nl/blog/3/how-to-install-trac-on-ubuntu-8-10-intrepid-ibex</link>
		<comments>http://www.duocoding.nl/blog/3/how-to-install-trac-on-ubuntu-8-10-intrepid-ibex#comments</comments>
		<pubDate>Tue, 04 Aug 2009 12:53:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How-to's]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Trac]]></category>

		<guid isPermaLink="false">http://www.duocoding.nl/blog/?p=3</guid>
		<description><![CDATA[Download and install Trac&#8217;&#8217;s requirements from the ubuntu repositories. Please note that Subversion is optional for Trac, but handy during softwaredevelopment, so I added it to the list.
sudo apt-get install apache2 subversion mysql-server python python-mysqldb
Download and install mod_python for Apache and enable the module.
sudo apt-get install libapache2-mod-python libapache2-mod-python-doc
a2enmod mod_python
You need to add the following to [...]]]></description>
			<content:encoded><![CDATA[<p>Download and install Trac&#8217;&#8217;s requirements from the ubuntu repositories. Please note that Subversion is optional for Trac, but handy during softwaredevelopment, so I added it to the list.</p>
<pre>sudo apt-get install apache2 subversion mysql-server python python-mysqldb</pre>
<p>Download and install mod_python for Apache and enable the module.</p>
<pre>sudo apt-get install libapache2-mod-python libapache2-mod-python-doc
a2enmod mod_python</pre>
<p>You need to add the following to your &#8220;httpd.conf&#8221;, to add a simple setup of Trac:</p>
<pre>&lt;Location /projects/<strong>myproject</strong>&gt;
 SetHandler mod_python
 PythonInterpreter main_interpreter
 PythonHandler trac.web.modpython_frontend
 PythonOption TracEnv /home/trac/<strong>myproject</strong>
 PythonOption TracUriRoot /projects/<strong>myproject
</strong>&lt;/Location&gt;</pre>
<p>Download and install Trac 0.10.4 from the ubuntu repositories.</p>
<pre>sudo apt-get install trac</pre>
<p>Download the ClearSilver source, extract the source and open the directory.</p>
<pre>wget http://www.clearsilver.net/downloads/clearsilver-0.10.4.tar.gz
tar -xzf clearsilver-0.10.4.tar.gz
cd clearsilver-0.10.4/</pre>
<p>To get ClearSilver working with python2.5, I had to change one line in &#8220;configure&#8221;. So open the file and add version &#8220;2.5&#8243; to the allowed python versions.</p>
<pre>vim configure</pre>
<p>Go to line 6560, and change the line to:</p>
<pre>python_versions="2.5 2.4 2.3 2.2 2.1 2.0 1.5 24 23 22 21 20 15"</pre>
<p>and another line in &#8220;configure.in&#8221;:</p>
<pre>vim configure.in</pre>
<p>Go to line 250, and change the line to:</p>
<pre>python_versions="2.5 2.4 2.3 2.2 2.1 2.0 1.5 24 23 22 21 20 15"</pre>
<p>Build the new &#8220;neo_cgi.so&#8221; and copy it to the site-packages:</p>
<pre>./configure
make
make install
cp python/build/lib.linux-x86_64-2.5/neo_cgi.so /usr/lib/python2.5/site-packages/neo_cgi.so</pre>
<p>Create a new Trac-environment.</p>
<pre>trac-admin /home/trac/<strong>myproject</strong>/ initenv</pre>
<p>Test your installation by browsing to &#8220;<code>http://localhost/projects/myproject</code>&#8220;. An example page of Trac will be displayed. Happy bugtracking!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.duocoding.nl/blog/3/how-to-install-trac-on-ubuntu-8-10-intrepid-ibex/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

