<?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>0x4142</title>
	<atom:link href="http://thomasfischer.biz/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://thomasfischer.biz</link>
	<description>Just Another Blog About Bits And Bytes</description>
	<lastBuildDate>Wed, 04 Aug 2010 08:03:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>using libcurl to download files</title>
		<link>http://thomasfischer.biz/?p=421</link>
		<comments>http://thomasfischer.biz/?p=421#comments</comments>
		<pubDate>Sun, 25 Jul 2010 16:10:21 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[cpp]]></category>

		<guid isPermaLink="false">http://thomasfischer.biz/?p=421</guid>
		<description><![CDATA[this example shows how to use curl for downloading a file in c++ with a class and a progress callback. this is pseudocode, means you need some header for this to work, etc 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687#define CURL_STATICLIB #include &#60;stdio.h&#62; #include &#60;curl/curl.h&#62; #include &#60;curl/types.h&#62; #include &#60;curl/easy.h&#62; #include &#60;string&#62; class MyClass; typedef struct job_info_t &#123; &#160;int jobID; &#160;MyClass *parent; [...]


Related posts:<ol><li><a href='http://thomasfischer.biz/?p=382' rel='bookmark' title='Permanent Link: embedding Ogre 1.7 into wxWidgets 2.9 cross platform'>embedding Ogre 1.7 into wxWidgets 2.9 cross platform</a></li>
<li><a href='http://thomasfischer.biz/?p=191' rel='bookmark' title='Permanent Link: boost::asio'>boost::asio</a></li>
<li><a href='http://thomasfischer.biz/?p=262' rel='bookmark' title='Permanent Link: cross platform timer class'>cross platform timer class</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>this example shows how to use curl for downloading a file in c++ with a class and a progress callback.</p>
<p>this is pseudocode, means you need some header for this to work, etc <img src='http://thomasfischer.biz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="codecolorer-container cpp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br /></div></td><td><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339900;">#define CURL_STATICLIB</span><br />
<span style="color: #339900;">#include &lt;stdio.h&gt;</span><br />
<span style="color: #339900;">#include &lt;curl/curl.h&gt;</span><br />
<span style="color: #339900;">#include &lt;curl/types.h&gt;</span><br />
<span style="color: #339900;">#include &lt;curl/easy.h&gt;</span><br />
<span style="color: #339900;">#include &lt;string&gt;</span><br />
<br />
<span style="color: #0000ff;">class</span> MyClass<span style="color: #008080;">;</span><br />
<br />
<span style="color: #0000ff;">typedef</span> <span style="color: #0000ff;">struct</span> job_info_t <span style="color: #008000;">&#123;</span><br />
&nbsp;<span style="color: #0000ff;">int</span> jobID<span style="color: #008080;">;</span><br />
&nbsp;MyClass <span style="color: #000040;">*</span>parent<span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span> <span style="color: #0000ff;">struct</span> job_info_t<span style="color: #008080;">;</span><br />
<br />
<span style="color: #0000ff;">int</span> progress_callback<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">void</span> <span style="color: #000040;">*</span>data, <span style="color: #0000ff;">double</span> download_total_size, <span style="color: #0000ff;">double</span> download_total_size_done, <span style="color: #0000ff;">double</span> ultotal, <span style="color: #0000ff;">double</span> uldone<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; job_info_t <span style="color: #000040;">*</span>jinfo <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>job_info_t <span style="color: #000040;">*</span><span style="color: #008000;">&#41;</span>data<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span><span style="color: #000040;">!</span>jinfo<span style="color: #008000;">&#41;</span> <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; jinfo<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>parent<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>reportProgress<span style="color: #008000;">&#40;</span>jinfo<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>jobID, download_total_size, download_total_size_done<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #0000ff;">void</span> MyClass<span style="color: #008080;">::</span><span style="color: #007788;">reportProgress</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> jobID, <span style="color: #0000ff;">double</span> download_total_size, <span style="color: #0000ff;">double</span> download_total_size_done<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;DLFile-%04d|progress: %0.3f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, jobID, download_total_size_done <span style="color: #000040;">/</span> download_total_size<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #0000ff;">int</span> MyClass<span style="color: #008080;">::</span><span style="color: #007788;">downloadFile</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> jobID, std<span style="color: #008080;">::</span><span style="color: #007788;">string</span> localFile, string url<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; job_info jinfo<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; jinfo.<span style="color: #007788;">parent</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">this</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; jinfo.<span style="color: #007788;">jobID</span> <span style="color: #000080;">=</span> jobID<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; CURL <span style="color: #000040;">*</span>curl <span style="color: #000080;">=</span> curl_easy_init<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span><span style="color: #000040;">!</span>curl<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;DLFile-%04d|error creating curl: %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, jobID, localFile.<span style="color: #007788;">string</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>.<span style="color: #007788;">c_str</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;DLFile-%04d|download URL: %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, jobID, url.<span style="color: #007788;">c_str</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">FILE</span> <span style="color: #000040;">*</span>outFile <span style="color: #000080;">=</span> <span style="color: #0000dd;">fopen</span><span style="color: #008000;">&#40;</span>localFile.<span style="color: #007788;">string</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>.<span style="color: #007788;">c_str</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>, <span style="color: #FF0000;">&quot;wb&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span><span style="color: #000040;">!</span>outFile<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">perror</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;error opening file&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;DLFile-%04d|error opening local file: %s.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, jobID, localFile.<span style="color: #007788;">string</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>.<span style="color: #007788;">c_str</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;DLFile-%04d|download URL: %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, jobID, url.<span style="color: #007788;">c_str</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">2</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>curl_err_str<span style="color: #008000;">&#91;</span>CURL_ERROR_SIZE<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000dd;">memset</span><span style="color: #008000;">&#40;</span>curl_err_str, <span style="color: #0000dd;">0</span>, CURL_ERROR_SIZE<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; CURLcode res<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; curl_easy_setopt<span style="color: #008000;">&#40;</span>curl, CURLOPT_URL, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;url.<span style="color: #007788;">c_str</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666;">// logging stuff</span><br />
<span style="color: #666666;">//&nbsp; curl_easy_setopt(curl, CURLOPT_STDERR, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InstallerLog::getSingleton()-&gt;getLogFilePtr());</span><br />
&nbsp; &nbsp; curl_easy_setopt<span style="color: #008000;">&#40;</span>curl, CURLOPT_ERRORBUFFER, &nbsp; &nbsp; &nbsp;curl_err_str<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666;">// progess stuff</span><br />
&nbsp; &nbsp; curl_easy_setopt<span style="color: #008000;">&#40;</span>curl, CURLOPT_NOPROGRESS, &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; curl_easy_setopt<span style="color: #008000;">&#40;</span>curl, CURLOPT_PROGRESSDATA, &nbsp; &nbsp; <span style="color: #000040;">&amp;</span>jinfo<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; curl_easy_setopt<span style="color: #008000;">&#40;</span>curl, CURLOPT_PROGRESSFUNCTION, <span style="color: #000040;">&amp;</span>progress_callback<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; curl_easy_setopt<span style="color: #008000;">&#40;</span>curl, CURLOPT_WRITEDATA, &nbsp; &nbsp; &nbsp; &nbsp;outFile<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666;">// http related settings</span><br />
&nbsp; &nbsp; curl_easy_setopt<span style="color: #008000;">&#40;</span>curl, CURLOPT_FOLLOWLOCATION, &nbsp; <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// follow redirects</span><br />
&nbsp; &nbsp; curl_easy_setopt<span style="color: #008000;">&#40;</span>curl, CURLOPT_AUTOREFERER, &nbsp; &nbsp; &nbsp;<span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// set the Referer: field in requests where it follows a Location: redirect. </span><br />
&nbsp; &nbsp; curl_easy_setopt<span style="color: #008000;">&#40;</span>curl, CURLOPT_MAXREDIRS, &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000dd;">20</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; curl_easy_setopt<span style="color: #008000;">&#40;</span>curl, CURLOPT_USERAGENT, &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #FF0000;">&quot;YourUserAgent&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; curl_easy_setopt<span style="color: #008000;">&#40;</span>curl, CURLOPT_FILETIME, &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; res <span style="color: #000080;">=</span> curl_easy_perform<span style="color: #008000;">&#40;</span>curl<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; curl_easy_cleanup<span style="color: #008000;">&#40;</span>curl<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000dd;">fclose</span><span style="color: #008000;">&#40;</span>outFile<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666;">// print curl error if existing</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>res <span style="color: #000040;">!</span><span style="color: #000080;">=</span> CURLE_OK<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;DLFile-%04d| CURL returned: %d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, jobID, res<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;DLFile-%04d| CURL error: %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, jobID, curl_err_str<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">3</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>


<p>Related posts:<ol><li><a href='http://thomasfischer.biz/?p=382' rel='bookmark' title='Permanent Link: embedding Ogre 1.7 into wxWidgets 2.9 cross platform'>embedding Ogre 1.7 into wxWidgets 2.9 cross platform</a></li>
<li><a href='http://thomasfischer.biz/?p=191' rel='bookmark' title='Permanent Link: boost::asio'>boost::asio</a></li>
<li><a href='http://thomasfischer.biz/?p=262' rel='bookmark' title='Permanent Link: cross platform timer class'>cross platform timer class</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://thomasfischer.biz/?feed=rss2&amp;p=421</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>automatic crash logging on linux using gdb</title>
		<link>http://thomasfischer.biz/?p=415</link>
		<comments>http://thomasfischer.biz/?p=415#comments</comments>
		<pubDate>Wed, 14 Jul 2010 22:29:38 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://thomasfischer.biz/?p=415</guid>
		<description><![CDATA[The service we wrote for linux has still some segfaults and other problems, so we needed a way of automatically logging and restarting broken servers. When using the crashhandler mode of our init script, the whole service will be wrapped in gdb. Upon crash, it logs the callstack and the last 3 frames to a [...]


Related posts:<ol><li><a href='http://thomasfischer.biz/?p=371' rel='bookmark' title='Permanent Link: wxWidgets logging quickstart'>wxWidgets logging quickstart</a></li>
<li><a href='http://thomasfischer.biz/?p=155' rel='bookmark' title='Permanent Link: capture video of 3d applications under linux'>capture video of 3d applications under linux</a></li>
<li><a href='http://thomasfischer.biz/?p=198' rel='bookmark' title='Permanent Link: clone discs over the network'>clone discs over the network</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The service we wrote for linux has still some segfaults and other problems, so we needed a way of automatically logging and restarting broken servers. When using the crashhandler mode of our init script, the whole service will be wrapped in gdb. Upon crash, it logs the callstack and the last 3 frames to a file and quits. The init script will then restart the service again.</p>
<p><a href="http://redmine.rigsofrods.org/projects/rorserver/repository/revisions/465/entry/trunk/contrib/rorserver-initscript.in#L68">you can view the init-script code here</a></p>


<p>Related posts:<ol><li><a href='http://thomasfischer.biz/?p=371' rel='bookmark' title='Permanent Link: wxWidgets logging quickstart'>wxWidgets logging quickstart</a></li>
<li><a href='http://thomasfischer.biz/?p=155' rel='bookmark' title='Permanent Link: capture video of 3d applications under linux'>capture video of 3d applications under linux</a></li>
<li><a href='http://thomasfischer.biz/?p=198' rel='bookmark' title='Permanent Link: clone discs over the network'>clone discs over the network</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://thomasfischer.biz/?feed=rss2&amp;p=415</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>install latest lighttpd 1.5 under debian</title>
		<link>http://thomasfischer.biz/?p=403</link>
		<comments>http://thomasfischer.biz/?p=403#comments</comments>
		<pubDate>Tue, 13 Jul 2010 22:47:43 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://thomasfischer.biz/?p=403</guid>
		<description><![CDATA[simple and straight forward: 12345678910apt-get install build-essential libtool autoconf libglib2.0-dev libpcre3-dev zlib1g-dev libbz2-dev automake1.9 &#160;libssl-dev libldap2-dev wget http://cgit.lighttpd.net/lighttpd/lighttpd-1.x/snapshot/lighttpd-1.x-trunk.tar.gz tar xvfz lighttpd-1.x-trunk.tar.gz cd lighttpd-1.x-trunk sh autogen.sh ./configure --prefix=/usr --with-openssl --with-ldap make -j3 sudo make install cd .. you will also want spawn-fcgi: 12345678wget http://download.lighttpd.net/spawn-fcgi/releases-1.6.x/spawn-fcgi-1.6.3.tar.gz tar xvfz spawn-fcgi-1.6.3.tar.gz cd spawn-fcgi* sh autogen.sh ./configure --prefix=/usr make sudo make [...]


Related posts:<ol><li><a href='http://thomasfischer.biz/?p=355' rel='bookmark' title='Permanent Link: install buildbot on debian lenny'>install buildbot on debian lenny</a></li>
<li><a href='http://thomasfischer.biz/?p=172' rel='bookmark' title='Permanent Link: munin on amd64'>munin on amd64</a></li>
<li><a href='http://thomasfischer.biz/?p=415' rel='bookmark' title='Permanent Link: automatic crash logging on linux using gdb'>automatic crash logging on linux using gdb</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>simple and straight forward:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential libtool <span style="color: #c20cb9; font-weight: bold;">autoconf</span> libglib2.0-dev libpcre3-dev zlib1g-dev libbz2-dev automake1.9 &nbsp;libssl-dev libldap2-dev<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>cgit.lighttpd.net<span style="color: #000000; font-weight: bold;">/</span>lighttpd<span style="color: #000000; font-weight: bold;">/</span>lighttpd-<span style="color: #000000;">1</span>.x<span style="color: #000000; font-weight: bold;">/</span>snapshot<span style="color: #000000; font-weight: bold;">/</span>lighttpd-<span style="color: #000000;">1</span>.x-trunk.tar.gz<br />
<span style="color: #c20cb9; font-weight: bold;">tar</span> xvfz lighttpd-<span style="color: #000000;">1</span>.x-trunk.tar.gz<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> lighttpd-<span style="color: #000000;">1</span>.x-trunk<br />
<span style="color: #c20cb9; font-weight: bold;">sh</span> autogen.sh<br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-openssl</span> <span style="color: #660033;">--with-ldap</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-j3</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span><br />
<span style="color: #7a0874; font-weight: bold;">cd</span> ..</div></td></tr></tbody></table></div>
<p>you will also want spawn-fcgi:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>download.lighttpd.net<span style="color: #000000; font-weight: bold;">/</span>spawn-fcgi<span style="color: #000000; font-weight: bold;">/</span>releases-<span style="color: #000000;">1.6</span>.x<span style="color: #000000; font-weight: bold;">/</span>spawn-fcgi-1.6.3.tar.gz<br />
<span style="color: #c20cb9; font-weight: bold;">tar</span> xvfz spawn-fcgi-1.6.3.tar.gz<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> spawn-fcgi<span style="color: #000000; font-weight: bold;">*</span><br />
<span style="color: #c20cb9; font-weight: bold;">sh</span> autogen.sh<br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span><br />
<span style="color: #7a0874; font-weight: bold;">cd</span> ..</div></td></tr></tbody></table></div>
<p>and php:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-xmlrpc php5-sqlite php5-snmp php5-pspell php5-recode php5-mysql php5-mhash php5-mcrypt php5-ldap &nbsp;php5-interbase php5-imap php5-gmp php5-gd php5-dev php5-curl php5-common php5-cli php5-cgi php-pear php5-xcache</div></td></tr></tbody></table></div>
<p>and some init scripts:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>thomasfischer.biz<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2010</span><span style="color: #000000; font-weight: bold;">/</span>07<span style="color: #000000; font-weight: bold;">/</span>lighttpd.txt<br />
<span style="color: #c20cb9; font-weight: bold;">mv</span> lighttpd.txt <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>lighttpd<br />
<span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>lighttpd<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>thomasfischer.biz<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2010</span><span style="color: #000000; font-weight: bold;">/</span>07<span style="color: #000000; font-weight: bold;">/</span>spawn-fcgi.txt<br />
<span style="color: #c20cb9; font-weight: bold;">mv</span> spawn-fcgi.txt <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>spawn-fcgi<br />
<span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>spawn-fcgi</div></td></tr></tbody></table></div>


<p>Related posts:<ol><li><a href='http://thomasfischer.biz/?p=355' rel='bookmark' title='Permanent Link: install buildbot on debian lenny'>install buildbot on debian lenny</a></li>
<li><a href='http://thomasfischer.biz/?p=172' rel='bookmark' title='Permanent Link: munin on amd64'>munin on amd64</a></li>
<li><a href='http://thomasfischer.biz/?p=415' rel='bookmark' title='Permanent Link: automatic crash logging on linux using gdb'>automatic crash logging on linux using gdb</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://thomasfischer.biz/?feed=rss2&amp;p=403</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>extended XEN wiki a bit</title>
		<link>http://thomasfischer.biz/?p=399</link>
		<comments>http://thomasfischer.biz/?p=399#comments</comments>
		<pubDate>Tue, 13 Jul 2010 11:29:02 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://thomasfischer.biz/?p=399</guid>
		<description><![CDATA[so the XEN Networking page is really nice, but misses some actual usage examples, so i started with that and added our setup there: http://wiki.xensource.com/xenwiki/XenNetworking#head-c68ea7b3a6b235b59401445549210309cdac6a82 No related posts.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>so the <a href="http://wiki.xensource.com/xenwiki/XenNetworking">XEN Networking page</a> is really nice, but misses some actual usage examples, so i started with that and added our setup there:</p>
<p><a href="http://wiki.xensource.com/xenwiki/XenNetworking#head-c68ea7b3a6b235b59401445549210309cdac6a82">http://wiki.xensource.com/xenwiki/XenNetworking#head-c68ea7b3a6b235b59401445549210309cdac6a82</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://thomasfischer.biz/?feed=rss2&amp;p=399</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>working a bit on litesql</title>
		<link>http://thomasfischer.biz/?p=397</link>
		<comments>http://thomasfischer.biz/?p=397#comments</comments>
		<pubDate>Tue, 29 Jun 2010 19:09:58 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://thomasfischer.biz/?p=397</guid>
		<description><![CDATA[created two tickets for litesql: - MSVS compile problem: 27 (fixed already) - CMake buildsystem improvements: 28 Related posts:working with litesql


Related posts:<ol><li><a href='http://thomasfischer.biz/?p=394' rel='bookmark' title='Permanent Link: working with litesql'>working with litesql</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>created two tickets for litesql:<br />
- MSVS compile problem: <a href="https://sourceforge.net/apps/trac/litesql/ticket/27">27</a> (fixed already)<br />
- CMake buildsystem improvements: <a href="https://sourceforge.net/apps/trac/litesql/ticket/28">28</a></p>


<p>Related posts:<ol><li><a href='http://thomasfischer.biz/?p=394' rel='bookmark' title='Permanent Link: working with litesql'>working with litesql</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://thomasfischer.biz/?feed=rss2&amp;p=397</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>working with litesql</title>
		<link>http://thomasfischer.biz/?p=394</link>
		<comments>http://thomasfischer.biz/?p=394#comments</comments>
		<pubDate>Sun, 27 Jun 2010 21:41:23 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://thomasfischer.biz/?p=394</guid>
		<description><![CDATA[reported a bug that was quickly fixed by gulliver: http://sourceforge.net/apps/trac/litesql/ticket/27 Related posts:working a bit on litesql syncing sourceforge SVN repos


Related posts:<ol><li><a href='http://thomasfischer.biz/?p=397' rel='bookmark' title='Permanent Link: working a bit on litesql'>working a bit on litesql</a></li>
<li><a href='http://thomasfischer.biz/?p=218' rel='bookmark' title='Permanent Link: syncing sourceforge SVN repos'>syncing sourceforge SVN repos</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>reported a bug that was quickly fixed by gulliver: <a href="http://sourceforge.net/apps/trac/litesql/ticket/27">http://sourceforge.net/apps/trac/litesql/ticket/27</a></p>


<p>Related posts:<ol><li><a href='http://thomasfischer.biz/?p=397' rel='bookmark' title='Permanent Link: working a bit on litesql'>working a bit on litesql</a></li>
<li><a href='http://thomasfischer.biz/?p=218' rel='bookmark' title='Permanent Link: syncing sourceforge SVN repos'>syncing sourceforge SVN repos</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://thomasfischer.biz/?feed=rss2&amp;p=394</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>finding out the linux distribution and version in CMake</title>
		<link>http://thomasfischer.biz/?p=390</link>
		<comments>http://thomasfischer.biz/?p=390#comments</comments>
		<pubDate>Wed, 23 Jun 2010 00:26:25 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://thomasfischer.biz/?p=390</guid>
		<description><![CDATA[actually its quite hacky, but works well here: 1234567891011121314151617181920212223242526&#160; &#160;# use the LSB stuff if possible :) &#160; &#160;EXECUTE_PROCESS( &#160; &#160; &#160; COMMAND cat /etc/lsb-release &#160; &#160; &#160; COMMAND grep DISTRIB_ID &#160; &#160; &#160; COMMAND awk -F= &#34;{ print $2 }&#34; &#160; &#160; &#160; COMMAND tr &#34;\n&#34; &#34; &#34; &#160; &#160; &#160; COMMAND sed &#34;s/ [...]


Related posts:<ol><li><a href='http://thomasfischer.biz/?p=159' rel='bookmark' title='Permanent Link: scons tutorial 1'>scons tutorial 1</a></li>
<li><a href='http://thomasfischer.biz/?p=229' rel='bookmark' title='Permanent Link: failmail &#8211; forum mail integration for failed emails'>failmail &#8211; forum mail integration for failed emails</a></li>
<li><a href='http://thomasfischer.biz/?p=367' rel='bookmark' title='Permanent Link: CPU flags explained (linux)'>CPU flags explained (linux)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>actually its quite hacky, but works well here:</p>
<div class="codecolorer-container cmake default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br /></div></td><td><div class="cmake codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># use the LSB stuff if possible :)</span><br />
&nbsp; &nbsp;<a href="http://www.cmake.org/cmake/help/cmake2.6docs.html#command:execute_process"><span style="color: #1f3f81; font-style: bold;">EXECUTE_PROCESS</span></a><span style="color: #197d8b;">(</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #077807; font-sytle: italic;">COMMAND</span> cat /etc/lsb-release<br />
&nbsp; &nbsp; &nbsp; <span style="color: #077807; font-sytle: italic;">COMMAND</span> grep DISTRIB_ID<br />
&nbsp; &nbsp; &nbsp; <span style="color: #077807; font-sytle: italic;">COMMAND</span> awk -F= <span style="color: #912f11;">&quot;{ print $2 }&quot;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #077807; font-sytle: italic;">COMMAND</span> tr <span style="color: #912f11;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #912f11;">&quot; &quot;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #077807; font-sytle: italic;">COMMAND</span> sed <span style="color: #912f11;">&quot;s/ //&quot;</span><br />
&nbsp; &nbsp; &nbsp; OUTPUT_VARIABLE LSB_ID<br />
&nbsp; &nbsp; &nbsp; RESULT_VARIABLE LSB_ID_RESULT<br />
&nbsp; &nbsp;<span style="color: #197d8b;">)</span><br />
&nbsp; &nbsp;<a href="http://www.cmake.org/cmake/help/cmake2.6docs.html#command:execute_process"><span style="color: #1f3f81; font-style: bold;">EXECUTE_PROCESS</span></a><span style="color: #197d8b;">(</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #077807; font-sytle: italic;">COMMAND</span> cat /etc/lsb-release<br />
&nbsp; &nbsp; &nbsp; <span style="color: #077807; font-sytle: italic;">COMMAND</span> grep DISTRIB_RELEASE<br />
&nbsp; &nbsp; &nbsp; <span style="color: #077807; font-sytle: italic;">COMMAND</span> awk -F= <span style="color: #912f11;">&quot;{ print $2 }&quot;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #077807; font-sytle: italic;">COMMAND</span> tr <span style="color: #912f11;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #912f11;">&quot; &quot;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #077807; font-sytle: italic;">COMMAND</span> sed <span style="color: #912f11;">&quot;s/ //&quot;</span><br />
&nbsp; &nbsp; &nbsp; OUTPUT_VARIABLE LSB_VER<br />
&nbsp; &nbsp; &nbsp; RESULT_VARIABLE LSB_VER_RESULT<br />
&nbsp; &nbsp;<span style="color: #197d8b;">)</span><br />
&nbsp; &nbsp;<span style="color: #666666; font-style: italic;">#message(&quot;LSB output: ${LSB_ID_RESULT}:${LSB_ID} ${LSB_VER_RESULT}:${LSB_VER}&quot;)</span><br />
&nbsp; &nbsp;<a href="http://www.cmake.org/cmake/help/cmake2.6docs.html#command:if"><span style="color: #1f3f81; font-style: bold;">if</span></a><span style="color: #197d8b;">(</span><span style="color: #077807; font-sytle: italic;">NOT</span> <span style="color: #b08000;">${LSB_ID}</span> <span style="color: #077807; font-sytle: italic;">STREQUAL</span> <span style="color: #912f11;">&quot;&quot;</span><span style="color: #197d8b;">)</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># found some, use it :D</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.cmake.org/cmake/help/cmake2.6docs.html#command:set"><span style="color: #1f3f81; font-style: bold;">set</span></a><span style="color: #197d8b;">(</span>INSTALLER_PLATFORM <span style="color: #912f11;">&quot;<span style="color: #b08000;">${LSB_ID}</span>-<span style="color: #b08000;">${LSB_VER}</span>&quot;</span> <span style="color: #077807; font-sytle: italic;">CACHE</span> <span style="color: #077807; font-sytle: italic;">PATH</span> <span style="color: #912f11;">&quot;Installer chosen platform&quot;</span><span style="color: #197d8b;">)</span><br />
&nbsp; &nbsp;<a href="http://www.cmake.org/cmake/help/cmake2.6docs.html#command:else"><span style="color: #1f3f81; font-style: bold;">else</span></a><span style="color: #197d8b;">(</span><span style="color: #077807; font-sytle: italic;">NOT</span> <span style="color: #b08000;">${LSB_ID}</span> <span style="color: #077807; font-sytle: italic;">STREQUAL</span> <span style="color: #912f11;">&quot;&quot;</span><span style="color: #197d8b;">)</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.cmake.org/cmake/help/cmake2.6docs.html#command:set"><span style="color: #1f3f81; font-style: bold;">set</span></a><span style="color: #197d8b;">(</span>INSTALLER_PLATFORM <span style="color: #912f11;">&quot;linux-generic&quot;</span> <span style="color: #077807; font-sytle: italic;">CACHE</span> <span style="color: #077807; font-sytle: italic;">PATH</span> <span style="color: #912f11;">&quot;Installer chosen platform&quot;</span><span style="color: #197d8b;">)</span><br />
&nbsp; &nbsp;<a href="http://www.cmake.org/cmake/help/cmake2.6docs.html#command:endif"><span style="color: #1f3f81; font-style: bold;">endif</span></a><span style="color: #197d8b;">(</span><span style="color: #077807; font-sytle: italic;">NOT</span> <span style="color: #b08000;">${LSB_ID}</span> <span style="color: #077807; font-sytle: italic;">STREQUAL</span> <span style="color: #912f11;">&quot;&quot;</span><span style="color: #197d8b;">)</span></div></td></tr></tbody></table></div>


<p>Related posts:<ol><li><a href='http://thomasfischer.biz/?p=159' rel='bookmark' title='Permanent Link: scons tutorial 1'>scons tutorial 1</a></li>
<li><a href='http://thomasfischer.biz/?p=229' rel='bookmark' title='Permanent Link: failmail &#8211; forum mail integration for failed emails'>failmail &#8211; forum mail integration for failed emails</a></li>
<li><a href='http://thomasfischer.biz/?p=367' rel='bookmark' title='Permanent Link: CPU flags explained (linux)'>CPU flags explained (linux)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://thomasfischer.biz/?feed=rss2&amp;p=390</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tuning the eclipse look (and feel)</title>
		<link>http://thomasfischer.biz/?p=388</link>
		<comments>http://thomasfischer.biz/?p=388#comments</comments>
		<pubDate>Thu, 10 Jun 2010 16:45:47 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://thomasfischer.biz/?p=388</guid>
		<description><![CDATA[well, to say it right off, the default eclipse GUI for me is: bloated with features far too big unusable without tuning following are some hints and tips how to tune eclipse to your likings: a) tune fontsize in gtk get the gtk-chtheme program. Under gentoo: 12emerge -av x11-themes/gtk-engines x11-themes/gtk-chtheme gtk-chtheme select a theme you [...]


Related posts:<ol><li><a href='http://thomasfischer.biz/?p=25' rel='bookmark' title='Permanent Link: how to get your openpgp card working with ssh (under gentoo)'>how to get your openpgp card working with ssh (under gentoo)</a></li>
<li><a href='http://thomasfischer.biz/?p=193' rel='bookmark' title='Permanent Link: linux custom firefox protocols the easy way'>linux custom firefox protocols the easy way</a></li>
<li><a href='http://thomasfischer.biz/?p=179' rel='bookmark' title='Permanent Link: about mysql&#8230;'>about mysql&#8230;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>well, to say it right off, the default eclipse GUI for me is:</p>
<ul>
<li>bloated with features</li>
<li>far too big</li>
<li>unusable without tuning</li>
</ul>
<p>following are some hints and tips how to tune eclipse to your likings:</p>
<p>a) tune fontsize in gtk<br />
get the gtk-chtheme program. Under gentoo:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">emerge <span style="color: #660033;">-av</span> x11-themes<span style="color: #000000; font-weight: bold;">/</span>gtk-engines x11-themes<span style="color: #000000; font-weight: bold;">/</span>gtk-chtheme<br />
gtk-chtheme</div></td></tr></tbody></table></div>
<p>select a theme you like and use the font button on the lower left side of the dialog. (for example i use Verdana regular, size 6)</p>
<p>b) tune eclipse fontsize:<br />
open via the menu in eclipse:<br />
Window -> Preferences : type &#8220;font&#8221; in the search bar on the top left side.</p>
<p>select &#8220;General -> Appearance -> Colors and Fonts&#8221;<br />
type &#8220;font&#8221; in the new search bar on the right side.</p>
<p>Change the fonts as you like.</p>


<p>Related posts:<ol><li><a href='http://thomasfischer.biz/?p=25' rel='bookmark' title='Permanent Link: how to get your openpgp card working with ssh (under gentoo)'>how to get your openpgp card working with ssh (under gentoo)</a></li>
<li><a href='http://thomasfischer.biz/?p=193' rel='bookmark' title='Permanent Link: linux custom firefox protocols the easy way'>linux custom firefox protocols the easy way</a></li>
<li><a href='http://thomasfischer.biz/?p=179' rel='bookmark' title='Permanent Link: about mysql&#8230;'>about mysql&#8230;</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://thomasfischer.biz/?feed=rss2&amp;p=388</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>new personal record</title>
		<link>http://thomasfischer.biz/?p=386</link>
		<comments>http://thomasfischer.biz/?p=386#comments</comments>
		<pubDate>Wed, 09 Jun 2010 19:29:24 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://thomasfischer.biz/?p=386</guid>
		<description><![CDATA[working day from 8:45 am to 12:57pm &#8230; No related posts.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>working day from 8:45 am to 12:57pm &#8230;</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://thomasfischer.biz/?feed=rss2&amp;p=386</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>embedding Ogre 1.7 into wxWidgets 2.9 cross platform</title>
		<link>http://thomasfischer.biz/?p=382</link>
		<comments>http://thomasfischer.biz/?p=382#comments</comments>
		<pubDate>Sun, 16 May 2010 23:13:24 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[cpp]]></category>

		<guid isPermaLink="false">http://thomasfischer.biz/?p=382</guid>
		<description><![CDATA[well, its harder than you might think, but i finally found this to be working quite well: wxutils.h: 12345678910111213141516/* &#160;* File: &#160; wxutils.h &#160;* Author: thomas &#160;* &#160;* Created on May 12, 2010, 9:23 AM &#160;*/ #ifndef _WXUTILS_H #define _WXUTILS_H #include &#60;wx/wx.h&#62; #include &#60;string.h&#62; std::string getWindowHandle&#40;wxWindow *window&#41;; #endif&#160; /* _WXUTILS_H */ wxutils.cpp: 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980#include &#34;wxutils.h&#34; #include [...]


Related posts:<ol><li><a href='http://thomasfischer.biz/?p=262' rel='bookmark' title='Permanent Link: cross platform timer class'>cross platform timer class</a></li>
<li><a href='http://thomasfischer.biz/?p=252' rel='bookmark' title='Permanent Link: useful c++ assert macro snippets'>useful c++ assert macro snippets</a></li>
<li><a href='http://thomasfischer.biz/?p=421' rel='bookmark' title='Permanent Link: using libcurl to download files'>using libcurl to download files</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>well, its harder than you might think, but i finally found this to be working quite well:</p>
<p>wxutils.h:</p>
<div class="codecolorer-container cpp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0000; font-style: italic;">/* <br />
&nbsp;* File: &nbsp; wxutils.h<br />
&nbsp;* Author: thomas<br />
&nbsp;*<br />
&nbsp;* Created on May 12, 2010, 9:23 AM<br />
&nbsp;*/</span><br />
<br />
<span style="color: #339900;">#ifndef _WXUTILS_H</span><br />
<span style="color: #339900;">#define _WXUTILS_H</span><br />
<br />
<span style="color: #339900;">#include &lt;wx/wx.h&gt;</span><br />
<span style="color: #339900;">#include &lt;string.h&gt;</span><br />
<br />
std<span style="color: #008080;">::</span><span style="color: #007788;">string</span> getWindowHandle<span style="color: #008000;">&#40;</span>wxWindow <span style="color: #000040;">*</span>window<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
<span style="color: #339900;">#endif&nbsp; /* _WXUTILS_H */</span></div></td></tr></tbody></table></div>
<p>wxutils.cpp:</p>
<div class="codecolorer-container cpp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br /></div></td><td><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339900;">#include &quot;wxutils.h&quot;</span><br />
<br />
<span style="color: #339900;">#include &lt;iostream&gt;</span><br />
<span style="color: #339900;">#include &lt;sstream&gt;</span><br />
<br />
<span style="color: #666666;">// this is in a separate file to reduce the clutter in the global namespace and their conflicts</span><br />
<br />
<span style="color: #339900;">#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX</span><br />
<span style="color: #339900;"># ifdef __WXGTK__</span><br />
<span style="color: #339900;">#include &lt;gdk/gdk.h&gt;</span><br />
<span style="color: #339900;">#include &lt;gtk/gtk.h&gt; // just this should suffice as it should include gdk.h itself</span><br />
<span style="color: #ff0000; font-style: italic;">/* Seems to be needed under Linux */</span><br />
<span style="color: #666666;">//#include &lt;wx/gtk/win_gtk.h&gt;</span><br />
<span style="color: #339900;">#include &quot;wx/gtk/private/win_gtk.h&quot;</span><br />
<span style="color: #339900;">#include &lt;gdk/gdkx.h&gt;</span><br />
<span style="color: #339900;">#include &lt;GL/glx.h&gt;</span><br />
<br />
<span style="color: #339900;">#if &nbsp;wxCHECK_VERSION(2, 9, 0)</span><br />
<span style="color: #339900;">#define piz(wxwin) WX_PIZZA((wxwin)-&gt;m_wxwindow)</span><br />
<span style="color: #339900;">#define GetXWindow(wxwin) (wxwin)-&gt;m_wxwindow ? \<br />
&nbsp; &nbsp; &nbsp; &nbsp; GDK_WINDOW_XWINDOW(((GtkWidget*)piz(wxwin))-&gt;window) : \<br />
&nbsp; &nbsp; &nbsp; &nbsp; GDK_WINDOW_XWINDOW((wxwin)-&gt;m_widget-&gt;window)</span><br />
<span style="color: #339900;">#else</span><br />
<span style="color: #339900;">#define GetXWindow(wxwin) (wxwin)-&gt;m_wxwindow ? \<br />
&nbsp; &nbsp; &nbsp; &nbsp; GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)-&gt;m_wxwindow)-&gt;bin_window) : \<br />
&nbsp; &nbsp; &nbsp; &nbsp; GDK_WINDOW_XWINDOW((wxwin)-&gt;m_widget-&gt;window)</span><br />
<span style="color: #339900;">#endif</span><br />
<br />
<span style="color: #339900;">#ifdef __WXX11__</span><br />
<span style="color: #339900;">#include &quot;wx/x11/privx.h&quot;</span><br />
<span style="color: #339900;">#define GetXWindow(wxwin) &nbsp; ((Window)(wxwin)-&gt;GetHandle())</span><br />
<span style="color: #339900;">#endif</span><br />
<br />
<span style="color: #339900;"># endif //__WXGTK__</span><br />
<span style="color: #339900;">#endif //OGRE_PLATFORM_LINUX</span><br />
<br />
std<span style="color: #008080;">::</span><span style="color: #007788;">string</span> getWindowHandle<span style="color: #008000;">&#40;</span>wxWindow <span style="color: #000040;">*</span>window<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
<span style="color: #339900;">#if WIN32</span><br />
&nbsp; &nbsp; std<span style="color: #008080;">::</span><span style="color: #007788;">stringstream</span> sstr<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">size_t</span> hWnd <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">size_t</span><span style="color: #008000;">&#41;</span>window<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>GetHandle<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; sstr <span style="color: #000080;">&lt;&lt;</span> hWnd<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; std<span style="color: #008080;">::</span><span style="color: #007788;">string</span> result <span style="color: #000080;">=</span> sstr.<span style="color: #007788;">str</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">return</span> result<span style="color: #008080;">;</span><br />
<span style="color: #339900;">#else</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666;">// TODO: Someone test this. you might to use &quot;parentWindowHandle&quot; if this</span><br />
&nbsp; &nbsp; <span style="color: #666666;">// does not work. &nbsp;Ogre 1.2 + Linux + GLX platform wants a string of the</span><br />
&nbsp; &nbsp; <span style="color: #666666;">// format display:screen:window, which has variable types ulong:uint:ulong.</span><br />
&nbsp; &nbsp; GtkWidget<span style="color: #000040;">*</span> widget <span style="color: #000080;">=</span> window<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>GetHandle<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #666666;">//gtk_widget_set_double_buffered (widget, FALSE);</span><br />
&nbsp; &nbsp; gtk_widget_realize<span style="color: #008000;">&#40;</span> widget <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> &nbsp; <span style="color: #666666;">// Mandatory. Otherwise, a segfault happens.</span><br />
&nbsp; &nbsp; <span style="color: #666666;">//XSync(GDK_WINDOW_XDISPLAY(widget-&gt;window), False);</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; Display<span style="color: #000040;">*</span> display <span style="color: #000080;">=</span> GDK_WINDOW_XDISPLAY<span style="color: #008000;">&#40;</span> widget<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>window <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666;">//Window wid = GetXWindow(window);</span><br />
&nbsp; &nbsp; Window wid <span style="color: #000080;">=</span> GDK_WINDOW_XWINDOW<span style="color: #008000;">&#40;</span> widget<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>window <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; std<span style="color: #008080;">::</span><span style="color: #007788;">stringstream</span> sstr<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #ff0000; font-style: italic;">/* Get the right display (DisplayString() returns &quot;:display.screen&quot;) */</span><br />
&nbsp; &nbsp; std<span style="color: #008080;">::</span><span style="color: #007788;">string</span> displayStr <span style="color: #000080;">=</span> DisplayString<span style="color: #008000;">&#40;</span> display <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; displayStr <span style="color: #000080;">=</span> displayStr.<span style="color: #007788;">substr</span><span style="color: #008000;">&#40;</span> <span style="color: #0000dd;">1</span>, <span style="color: #008000;">&#40;</span> displayStr.<span style="color: #007788;">find</span><span style="color: #008000;">&#40;</span> <span style="color: #FF0000;">&quot;.&quot;</span>, <span style="color: #0000dd;">0</span> <span style="color: #008000;">&#41;</span> <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span> <span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">int</span> screenNum <span style="color: #000080;">=</span> DefaultScreen<span style="color: #008000;">&#40;</span> display <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #ff0000; font-style: italic;">/* Put all together */</span><br />
&nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;using display: %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, displayStr.<span style="color: #007788;">c_str</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;using screen: %d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, screenNum<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;using window: 0x%x<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, wid<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666;">// old format:</span><br />
&nbsp; &nbsp; sstr <span style="color: #000080;">&lt;&lt;</span> displayStr <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">':'</span> <span style="color: #000080;">&lt;&lt;</span> screenNum <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">':'</span> <span style="color: #000080;">&lt;&lt;</span> wid<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; std<span style="color: #008080;">::</span><span style="color: #007788;">string</span> result <span style="color: #000080;">=</span> sstr.<span style="color: #007788;">str</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;getWindowHandle() = %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, result.<span style="color: #007788;">c_str</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">return</span> result<span style="color: #008080;">;</span><br />
<span style="color: #339900;">#endif</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>
<p>how to use (panel_viewport is the widget that should show the 3d content):</p>
<div class="codecolorer-container cpp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">...<br />
<span style="color: #007788;">mWindow</span> <span style="color: #000080;">=</span> mRoot<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>initialise<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">false</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
Ogre<span style="color: #008080;">::</span><span style="color: #007788;">NameValuePairList</span> params<span style="color: #008080;">;</span><br />
params<span style="color: #008000;">&#91;</span><span style="color: #FF0000;">&quot;externalWindowHandle&quot;</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> getWindowHandle<span style="color: #008000;">&#40;</span>panel_viewport<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
mWindow <span style="color: #000080;">=</span> Ogre<span style="color: #008080;">::</span><span style="color: #007788;">Root</span><span style="color: #008080;">::</span><span style="color: #007788;">getSingleton</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>.<span style="color: #007788;">createRenderWindow</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;OgreRenderWindow&quot;</span>, <span style="color: #0000dd;">640</span>, <span style="color: #0000dd;">480</span>, <span style="color: #0000ff;">false</span>, <span style="color: #000040;">&amp;</span>params<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
...</div></td></tr></tbody></table></div>
<p>works great so far under windows 7 and ubuntu 9.10 with Ogre 1.7 and wxWidgets 2.9</p>


<p>Related posts:<ol><li><a href='http://thomasfischer.biz/?p=262' rel='bookmark' title='Permanent Link: cross platform timer class'>cross platform timer class</a></li>
<li><a href='http://thomasfischer.biz/?p=252' rel='bookmark' title='Permanent Link: useful c++ assert macro snippets'>useful c++ assert macro snippets</a></li>
<li><a href='http://thomasfischer.biz/?p=421' rel='bookmark' title='Permanent Link: using libcurl to download files'>using libcurl to download files</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://thomasfischer.biz/?feed=rss2&amp;p=382</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
