<?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>Chaos Engine</title>
	<atom:link href="http://dev.modmancer.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.modmancer.com</link>
	<description>If you ended up here, you definitely had a good reason for that.</description>
	<lastBuildDate>Fri, 03 Sep 2010 22:31:10 +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>Wrap numbers around power of 2 borders</title>
		<link>http://dev.modmancer.com/index.php/2010/09/03/fast-wrap-numbers-around-power-of-2-borders/</link>
		<comments>http://dev.modmancer.com/index.php/2010/09/03/fast-wrap-numbers-around-power-of-2-borders/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 22:29:54 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=90</guid>
		<description><![CDATA[I was working yesterday on some texture sampler, and recalled a simple thingy that was a great help back in the 90&#8242;s, which I completely forgot in recent years. If you have a counter, sampler or whatever that has to get wrapped around e.g. 256, 512 or any other power of two, you can use [...]]]></description>
			<content:encoded><![CDATA[<p>I was working yesterday on some texture sampler, and recalled a simple thingy that was a great help back in the 90&#8242;s, which I completely forgot in recent years. If you have a counter, sampler or whatever that has to get wrapped around e.g. 256, 512 or any other power of two, you can use the following ultra fast hack:</p>
<pre>
// Wrap around 2^10
int x = some_fn(x) &#038; 1023;
</pre>
<p>This will wrap whatever x is, around 1024 limiter. For example if x is 1025, it will become 1. 1026 will turn over to 2 etc. Still better than:</p>
<pre>
x = some_fn(x);
x = x > 1023 ? x - 1024 : x;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2010/09/03/fast-wrap-numbers-around-power-of-2-borders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My darkish Komodo and QT Creator color schemes</title>
		<link>http://dev.modmancer.com/index.php/2010/07/17/my-darkish-komodo-and-qt-creator-color-schemes/</link>
		<comments>http://dev.modmancer.com/index.php/2010/07/17/my-darkish-komodo-and-qt-creator-color-schemes/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 16:43:58 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[Qt Creator]]></category>
		<category><![CDATA[color scheme]]></category>
		<category><![CDATA[dark theme]]></category>
		<category><![CDATA[Komodo]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=81</guid>
		<description><![CDATA[You can download my Komodo and Qt Creator &#8216;dark&#8217; themes from: http://www.modmancer.com/downloads/dev_blog/dew_dark.ksf http://www.modmancer.com/downloads/dev_blog/dew_dark.xml For Komodo: copy the Komodo theme to your ~/.komodoide/5.2/schemes folder. For Qt Creator 2.0: copy the Qt Creator theme to your ~/.config/Nokia/qtcreator/styles folder.]]></description>
			<content:encoded><![CDATA[<p>You can download my Komodo and Qt Creator &#8216;dark&#8217; themes from:</p>
<p><a title="Komodo Theme" href="http://www.modmancer.com/downloads/dev_blog/dew_dark.ksf">http://www.modmancer.com/downloads/dev_blog/dew_dark.ksf</a><br />
<a title="Qt Theme" href="http://www.modmancer.com/downloads/dev_blog/dew_dark.xml"> http://www.modmancer.com/downloads/dev_blog/dew_dark.xml</a></p>
<p>For Komodo:<br />
copy the Komodo theme to your ~/.komodoide/5.2/schemes folder.</p>
<p>For Qt Creator 2.0:<br />
copy the Qt Creator theme to your ~/.config/Nokia/qtcreator/styles folder.<span id="more-81"></span></p>
<p><img class="alignnone" title="dew's dark Qt Creator theme " src="http://www.modmancer.com/downloads/dev_blog/style_qtcreator.png" alt="" width="400" /><!--more--></p>
<p><img class="alignnone" title="dew's dark komodo style" src="http://www.modmancer.com/downloads/dev_blog/style_komodo.png" alt="" width="400" /></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2010/07/17/my-darkish-komodo-and-qt-creator-color-schemes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP and OpenSSL key format (&#8220;key parameter is not a valid public key&#8221;)</title>
		<link>http://dev.modmancer.com/index.php/2010/07/07/php-and-openssl-key-format/</link>
		<comments>http://dev.modmancer.com/index.php/2010/07/07/php-and-openssl-key-format/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 22:27:34 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[openssl_pkey_get_public error]]></category>
		<category><![CDATA[private key]]></category>
		<category><![CDATA[public key]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=73</guid>
		<description><![CDATA[PHP Warning: openssl_public_encrypt(): key parameter is not a valid public key in /script.php on line 175 If you experienced problems with OpenSSL and PHP, especially functions like openssl_pkey_get_public and openssl_pkey_get_private not willing to initialise from the provided public and private key strings, then you just need a few tweaks to get things running, because the [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span style="color: #ff0000;">PHP Warning:  openssl_public_encrypt(): key parameter is not a valid public key in /script.php on line 175</span></strong></p>
<p>If you experienced problems with OpenSSL and PHP, especially functions like openssl_pkey_get_public and openssl_pkey_get_private not willing to initialise from the provided public and private key strings, then you just need a few tweaks to get things running, because the key formats are not compatible. If you are used to using ssh-keygen command line tool to generate your key pair, you will need to manually edit the public key in order to make it php openssl compatible. <span id="more-73"></span>For example your tmp_rsa.pub key looks like this:</p>
<pre>ssh-rsa ABABB3NzaC1yc2EAAAABIwAAAQEAtO9f1rn1plAH5flOotX0NYFjfQH7xt0dukt7v
8Nt3g7GFijXsoc+/+1SNSusHbj4LfBPXgKQJJoaZaCoQIWjBIXXKlODv+z2pSMBvvCPRThSFetqeh
/0pWcdiHPsmPOYpHby7zzwNKPCDyMrVrlC7FsaGmOC+F7FvSGA1PLdYEiOiJV/OmxQ
2HELrmhYPDc0vVPHfOETygNjjqMUuu8QwLvBgk3OUbT1m5NRNHMnpgPOID6+BBumLs
M0t8jOp1/AQG3pQFtlLBNETOMe7nuBPuE5pPhr5HbyV+9FUGI2FiYlNl7G+d8VlibR2wZkGHsa
p6mmzmJi64x4gNDdil+QDa== xyz@computer
</pre>
<p>That&#8217;s good for shell but not good enough for PHP openssl_pkey_get_public() function. You will need to manually edit it, and in the end it should look like this:</p>
<pre>-----BEGIN PUBLIC KEY-----
ABABB3NzaC1yc2EAAAABIwAAAQEAtO9f1rn1plAH5flOotX0NYFjfQH7xt0dukt7v
8Nt3g7GFijXsoc+/+1SNSusHbj4LfBPXgKQJJoaZaCoQIWjBIXXKlODv+z2pSMBvvC
PRThSFetqeh/0pWcdiHPsmPOYpHby7zzwNKPCDyMrVrlC7FsaGmOC+F7FvSGA1
PLdYEiOiJV/OmxQ2HELrmhYPDc0vVPHfOETygNjjqMUuu8QwLvBgk3OUbT1m5N
RNHMnpgPOID6+BBumLsM0t8jOp1/AQG3pQFtlLBNETOMe7nuBPuE5pPhr5HbyV
+9FUGI2FiYlNl7G+d8VlibR2wZkGHsap6mmzmJi64x4gNDdil+QDa==
-----END PUBLIC KEY-----
</pre>
<p>Don&#8217;t ask me why, it simply won&#8217;t work (or at least in my case didn&#8217;t work) if you don&#8217;t do it. It will still be complaining about some start line:</p>
<pre>error:0906D06C:PEM routines:PEM_read_bio:no start line
</pre>
<p>But that is obviously a trivial error, which you can ignore. I haven&#8217;t figured out yet how to avoid it.</p>
<p><strong>Another thing -</strong><br />
make sure you check for ssl errors after each ssl function. Here is a simple fn which can be helpful in your openSSL wrapper class:</p>
<pre>//! Checks for recent OpenSSL errors, and logs them.
//! \return true if no errors found, otherwise false.
public static function check_ssl_error()
{
  $ret = true;
  while ($msg = openssl_error_string())
  {
    // --- todo : log the error in your log file
    $ret = false;
  }
  return $ret;
}
</pre>
<p>So in the end you will init your openssl wrapper like this:</p>
<pre>$public_key_str = file_get_contents("./public.key");
$private_key_str = file_get_contents("./private.key");

MY_ASSERT($public_key_str, "Public key not found.");
MY_ASSERT($private_key_str, "Private key not found.");

$this-&gt;public_key = openssl_pkey_get_public($public_key_str);
OpenSSLWrapper::check_ssl_error();
OpenSSLWrapper::check_ssl_error();
$this-&gt;private_key = openssl_pkey_get_private($private_key_str);
OpenSSLWrapper::check_ssl_error();
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2010/07/07/php-and-openssl-key-format/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>POUND &#8211; Reverse proxy and load-balancer</title>
		<link>http://dev.modmancer.com/index.php/2010/07/03/pound-reverse-proxy-and-load-balancer/</link>
		<comments>http://dev.modmancer.com/index.php/2010/07/03/pound-reverse-proxy-and-load-balancer/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 12:27:26 +0000</pubDate>
		<dc:creator>riddler</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[Loadbalancing]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[loadbalancer]]></category>
		<category><![CDATA[pound]]></category>
		<category><![CDATA[reverse_proxy]]></category>
		<category><![CDATA[webservers]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=67</guid>
		<description><![CDATA[Scaling up. For most people a nightmare area. What? How? Where? It usually comes down to how much money are you willing to spend and what is it that you actually need. Here is free as in free beer solution for all you geekz out there who need a simple load balancer and reverse proxy&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>Scaling up. For most people a nightmare area. What? How? Where? It usually comes down to how much money are you willing to spend and what is it that you actually need. Here is free as in free beer solution for all you geekz out there who need a simple load balancer and reverse proxy&#8230; oh and to allow for a convenient SSL wrapper for those Web servers that do not offer it natively. Guess you could go for nginx if you want &#8211; after using it for over a year it&#8217;s too bloated for what was needed. Pound came up as a far better solution.</p>
<p><span id="more-67"></span><br />
So, let&#8217;s say you have a small server farm that consists of one FreeBSD machine that acts as a firewall/router and a several GNU/Linux machines in the backend which act as web servers distributing some content. We&#8217;re not going to go as deep as to research what is going on on those machines. All we want here is that our users come through the firewall and get served.</p>
<p>Let&#8217;s install pound first:</p>
<p><em>cd /usr/ports/www/pound &amp;&amp; make install clean</em></p>
<p>Once installation is done open Pound&#8217;s configuration file (usually does not exist so just fire up your fav editor and create /usr/local/etc/pound.cfg). For very simple load balancer use the following configuration file:</p>
<p><em>Control  &#8220;/var/run/pound&#8221;<br />
ListenHTTP<br />
Address 0.0.0.0<br />
Port 80<br />
xHTTP 0<br />
LogLevel 2<br />
End</em></p>
<p><em>Service<br />
HeadRequire &#8220;Host:.*mysite.com.*&#8221;<br />
BackEnd<br />
Address 10.0.0.2<br />
Port    80<br />
End<br />
End</em></p>
<p>And that&#8217;s it. Start Pound by issuing: <strong>/usr/local/etc/rc.d/pound start</strong> and see how your content gets served. There is a variety of things you can do with Pound. My suggestion is to check: <a title="Pound" href="http://www.apsis.ch/pound/" target="_blank">http://www.apsis.ch/pound/</a> for details &#8211; their documentation is pretty short but very clear.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2010/07/03/pound-reverse-proxy-and-load-balancer/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Resurrect NTFS partition after Win XP reinstall</title>
		<link>http://dev.modmancer.com/index.php/2010/06/09/resurrect-ntfs-partition-after-win-xp-reinstall/</link>
		<comments>http://dev.modmancer.com/index.php/2010/06/09/resurrect-ntfs-partition-after-win-xp-reinstall/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 21:19:23 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[Hard drive]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[hard disk]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[lost partition]]></category>
		<category><![CDATA[ntfs]]></category>
		<category><![CDATA[partition]]></category>
		<category><![CDATA[reinstallation]]></category>
		<category><![CDATA[resurrect]]></category>
		<category><![CDATA[salvage]]></category>
		<category><![CDATA[testdisk]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows xp]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=54</guid>
		<description><![CDATA[The system was missing my partition E, or my Storage partition. It was wiped out. Storage manager denoted it as unallocated space. A quick reboot into Ubuntu ended up with same knowledge: Unallocated space.

No space for panic. Google comes, google helps. I found a marvelous little command line tool which was able to revamp my Storage NTFS partition in about 10 seconds. It's called testdisk.]]></description>
			<content:encoded><![CDATA[<p>Another unpleasant experience with windows last week. (We&#8217;ll just disregard the notorious behaviour of Win installer which eradicates any previously installed foreign OS boot manager.)</p>
<p><span id="more-54"></span>I have Ubuntu 10.04 and WinXP SP3 multiboot. I have 3 partitions:</p>
<p>1) NTFS, WinXP (defunct)<br />
2) ReiserFS (+ extra swap partition) Ubuntu<br />
3) NTFS, Storage (lots of my windows projects stored there)</p>
<p>Few days ago, my WinXP stopped working, no way to boot it, something went so terribly wrong, and from the previous long year experience with windows I could simply sense when the time for total reinstall has come. Since I have started with Ubuntu 9.04 my GRUB was the legacy mode GRUB, so I prepared an Ubuntu 9.04 live cd to be able to reinstall GRUB after installing WinXP, and naturally: I though I was ready for the operation.</p>
<p>I booted from the Windows XP SP3 installation DVD, selected partition C (NTFS) to be reformatted and chosen as destination. Everything went smooth, C was erased, new Windows appeared on it, I rebooted the computer, and was happy to see that everything is there..</p>
<p>Or at least I thought so.</p>
<p>The system was missing my partition E, or my Storage partition. It was wiped out. Storage manager denoted it as unallocated space. A quick reboot into Ubuntu ended up with same knowledge: Unallocated space.</p>
<p>No space for panic. Google comes, google helps. I found a marvelous little command line tool which was able to revamp my Storage NTFS partition in about 10 seconds. It&#8217;s called <strong>testdisk</strong>.</p>
<p>Open your synaptic, type testdisk, install it.</p>
<p>Open terminal, type<br />
&lt;pre&gt;<br />
$ sudo testdisk<br />
&lt;/pre&gt;</p>
<p>1) Now on the first screen select [ Create ] ( Create a new log file ).<br />
2) From listed hard discs select the one that you need to salvage. Then [Proceed].<br />
3) Then [Continue].<br />
4) Then [Intel] &#8211; this works in most cases, but if you have some other exotic partition types, you can tell testdisk which one it is on this screen.<br />
5) Then [Analyse].<br />
6) Then [Quick Search] &#8211; this will do most of the time. But if corruption was more severe, you might need to select another round of &#8216;deeper search&#8217;.<br />
7) On the next screen select Vista [Y/N] &#8211; N, if you used WinXP to create the controversial partition.<br />
8) &#8212; disregard the stupid smiley &#8211;  Now you will see all partitions that testdisk was able to identify. Press Enter (continue).<br />
9) Ok finally &#8211; if you are happy with the results, ie. you see your lost partition in the list, select  [ Write ] and reboot (you will be informed about that on the next screen anyway). But if testdisk wasn&#8217;t able to dig out the lost partition, then select [ Deeper Search ].</p>
<p>It saved my night. And a lot of data. I think this tool exists for windows as well. Check it out, remember it. It will come handy sooner or later!</p>
<p>[EDIT]<br />
Yep, TestDisk runs on several platforms &#8211; check it out:<br />
<a href="http://www.cgsecurity.org/wiki/TestDisk">http://www.cgsecurity.org/wiki/TestDisk</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2010/06/09/resurrect-ntfs-partition-after-win-xp-reinstall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joomla! 1.0.x and PHP 5.3 meltdown</title>
		<link>http://dev.modmancer.com/index.php/2010/05/23/joomla-1-0-x-and-php-5-3-meltdown/</link>
		<comments>http://dev.modmancer.com/index.php/2010/05/23/joomla-1-0-x-and-php-5-3-meltdown/#comments</comments>
		<pubDate>Sun, 23 May 2010 12:14:31 +0000</pubDate>
		<dc:creator>riddler</dc:creator>
				<category><![CDATA[Joomla!]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[bug]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=49</guid>
		<description><![CDATA[Here is the story: if you happen to run Joomla! 1.0, which you should not but what the heck, you&#8217;ll run into some weird issues if there is PHP 5.3.x running on your server. Everything will work fine except for one thing &#8211; there will be no content at al on your web site. And [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the story: if you happen to run Joomla! 1.0, which you should  not but what the heck, you&#8217;ll run into some weird issues if there is  PHP 5.3.x running on your server. Everything will work fine except for  one thing &#8211; there will be no content at al on your web site. And no  matter what you do content will be invisible. Since Joomla! 1.0.x is no  longer being maintained you should either upgrade to Joomla! 1.5.x/1.6.x  or apply this little hack below:</p>
<p>Replace:</p>
<pre>$arguments = func_get_args();
</pre>
<p>with</p>
<pre>$arguments = func_get_args();
$numargs = func_num_args();
for($i=1; $i &lt; $numargs; $i++){
$arguments[$i] = &amp;$arguments[$i];
}
</pre>
<p>in includes/Cache/Lite/Function.php. This should be OK till&#8230; well,  till you upgrade. It&#8217;s not like they are going to fix it in Joomla! 1.0.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2010/05/23/joomla-1-0-x-and-php-5-3-meltdown/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Syncing Firefox bookmarks and passwords</title>
		<link>http://dev.modmancer.com/index.php/2010/05/23/syncing-firefox-bookmarks-and-passwords/</link>
		<comments>http://dev.modmancer.com/index.php/2010/05/23/syncing-firefox-bookmarks-and-passwords/#comments</comments>
		<pubDate>Sun, 23 May 2010 12:11:10 +0000</pubDate>
		<dc:creator>riddler</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[bookmarks]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[WebDAV]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=46</guid>
		<description><![CDATA[I use a few computers and I like to have pretty much the same $ENV on them. Using various rsync methods helps keeping $HOME synced. Yet, sometimes that $HOME is way too big for syncing via the Internet. And what if I&#8217;d like to sync just some programes and not the whole damn $HOME dir? [...]]]></description>
			<content:encoded><![CDATA[<p>I use a few computers and I like to have pretty much the same $ENV on  them. Using various rsync methods helps keeping $HOME synced. Yet,  sometimes that $HOME is way too big for syncing via the Internet. And  what if I&#8217;d like to sync just some programes and not the whole damn  $HOME dir?<br />
<span id="more-46"></span></p>
<p>One of the things that was bothering me a lot was syncing Firefox and  it&#8217;s bookmarks/passwords on different computers. Especially when I  change a computer and forget to pickup whatever I needed on a USB  stick(encrypted one). And I need my bookmarks. I&#8217;m one of those geeks  who have been keeping a well organized bookmarks for the past 10+ years.  I&#8217;ve been digging around a bit and found a perfect solution. It comes  down to this: <a title="Lighty" href="http://www.lighttpd.net" target="_blank">Lighttpd</a> via <a title="WebDAV" href="http://en.wikipedia.org/wiki/WebDAV" target="_blank">WebDAV</a> and HTTPS and one neat plugin for Firefox.</p>
<p>This short HOWTO assumes that you know your way around with Lighty. I  won&#8217;t go too deep into details but if you need some additional help  just let me know. So, you&#8217;ll need Lighttpd compiled with WebDAV support.  Once that is done you need the following in your lighttpd.conf:</p>
<pre>$HTTP["host"] == "sync.com" {
server.document-root = "/home/user/sync"
server.errorlog      = "/var/log/sync.error.log"
accesslog.filename   = "/var/log//sync.access.log"
webdav.activate = "enable"
webdav.is-readonly = "disable"
}
</pre>
<p>This will allow you to read and write data to /home/user/sync which  will be our central location for keeping bookmarks and/or passwords. I  suggest using this location only via HTTPS.</p>
<p>Give settings will allow anyone rw access. Not a good idea. Add  something like this to your Lighttpd configuration:</p>
<pre>$HTTP["host"] =~ "sync.com" {
auth.require = ("/" =&gt; (
"method"  =&gt; "digest",
"realm"   =&gt; "Datasphere entrance",
"require" =&gt; "user=username"
))
}
</pre>
<p>Or tweak this password protection in any other way available for  Lighty &#8211;&gt; <a title="ModAuth" href="http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModAuth" target="_blank">http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModAuth</a></p>
<p>We&#8217;re almost done.</p>
<p>Next step is to install Syncplaces addon for Firefox.You can find it  here: <a href="https://addons.mozilla.org/en-US/firefox/addon/8426" target="_blank">https://addons.mozilla.org/en-US/firefox/addon/8426</a></p>
<p>It&#8217;s pretty easy to setup. There are just a few things you need to  change in the Options menu: Host should be whatever is the hostname of  your sync site and paths to files for passwords and bookmarks. By  default those are /syncplaces.xml, /syncplaces.html and /passwords.  Change them to whatever you want. Syncplaces can be tweaked to do  automatic syncing at whatever time you like. Or when you shut down  Firefox thus making sure that the latest bookmarks and passwords will be  on server once you go an pull the data from another computer.</p>
<p>I&#8217;ve tried to keep this HOWTO as simple as possible. If any part of  it is not clear enough let me know and I&#8217;ll explain.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2010/05/23/syncing-firefox-bookmarks-and-passwords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lighttpd and (network.c.529) SSL error</title>
		<link>http://dev.modmancer.com/index.php/2010/05/23/lighttpd-and-network-c-529-ssl-error/</link>
		<comments>http://dev.modmancer.com/index.php/2010/05/23/lighttpd-and-network-c-529-ssl-error/#comments</comments>
		<pubDate>Sun, 23 May 2010 12:05:11 +0000</pubDate>
		<dc:creator>riddler</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=42</guid>
		<description><![CDATA[I just realized that the latest Lighttpd you may find in FreeBSD ports (and in all Linux distros actually) is a bit buggy. Apparently there is an error in network.c which will crash your HTTPS. Once you upgrade and restart Lighty you&#8217;ll get something like this: 2010-03-05 10:23:01: (network.c.529) SSL: error:00000000:lib(0):func(0):reason(0) And that&#8217;s it. Lighty [...]]]></description>
			<content:encoded><![CDATA[<p>I just realized that the latest <a title="Lighttpd" href="http://www.lighttpd.net" target="_blank">Lighttpd</a> you may find in FreeBSD ports (and in all  Linux distros actually) is a bit buggy. Apparently there is an error in  network.c which will crash your HTTPS.<br />
<span id="more-42"></span><br />
Once you upgrade and restart  Lighty you&#8217;ll get something like this:</p>
<pre>2010-03-05 10:23:01: (network.c.529) SSL: error:00000000:lib(0):func(0):reason(0)</pre>
<p>And that&#8217;s it. Lighty will die. Well, here is a quick fix till new  port is released:</p>
<pre>cd /usr/ports/www/lighttpd
make install clean then Ctrl + C when it starts configuring
cd work/lighttpd-1..26/src/
rm network.c
fetch http://redmine.lighttpd.net/projects/lighttpd/repository/revisions/2716/
raw/branches/lighttpd-1.4.x/src/network.c
cd ../../ &amp;&amp; make install clean
</pre>
<p>And that&#8217;s it. It will fix the issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2010/05/23/lighttpd-and-network-c-529-ssl-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mysqldump rather than mysql Admin</title>
		<link>http://dev.modmancer.com/index.php/2010/05/20/mysqldump-rather-than-mysql-admin/</link>
		<comments>http://dev.modmancer.com/index.php/2010/05/20/mysqldump-rather-than-mysql-admin/#comments</comments>
		<pubDate>Thu, 20 May 2010 11:02:47 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[database dump]]></category>
		<category><![CDATA[mysql admin]]></category>
		<category><![CDATA[mysqldump]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=38</guid>
		<description><![CDATA[If you are doing whole database backup &#38; restore use mysql dump rather than mysql Admin tool, it will run *much* faster. mysqldump --verbose --compress --host -u USERNAME -pPASSWORD --databases DATABASE &#62; ~/dumps/dump.sql If dragging data through network, use &#8211;compress flag. Also check the man pages of mysqldump, you might find interesting hints for different [...]]]></description>
			<content:encoded><![CDATA[<p>If you are doing whole database backup &amp; restore use mysql dump rather than mysql Admin tool, it will run *much* faster.</p>
<pre>mysqldump --verbose --compress --host  -u USERNAME  -pPASSWORD
 --databases DATABASE &gt; ~/dumps/dump.sql
</pre>
<p>If dragging data through network, use &#8211;compress flag.<br />
Also check the man pages of mysqldump, you might find interesting hints for different needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2010/05/20/mysqldump-rather-than-mysql-admin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>M-Audio Audiophile 2496 on Ubuntu 9.10 = No sound!?</title>
		<link>http://dev.modmancer.com/index.php/2010/05/15/m-audio-audiophile-2496-on-ubuntu-9-10-no-sound/</link>
		<comments>http://dev.modmancer.com/index.php/2010/05/15/m-audio-audiophile-2496-on-ubuntu-9-10-no-sound/#comments</comments>
		<pubDate>Sat, 15 May 2010 15:37:44 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sound]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>
		<category><![CDATA[2496]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[audiophile]]></category>
		<category><![CDATA[karmic koala]]></category>
		<category><![CDATA[m-audio]]></category>
		<category><![CDATA[pulse]]></category>
		<category><![CDATA[pulse audio]]></category>
		<category><![CDATA[sound driver]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=31</guid>
		<description><![CDATA[You have Ubuntu 9.10. You own M-Audio Audiophile 2496 audio interface. And you can&#8217;t hear a thing? I had to deal with this twice. First time it was when I upgraded my Ubuntu 9.04 to 9.10. Everything was fine, except: my 2496 Audiophile stopped playing any sound at all. Daemon.log didn&#8217;t show any errors coming [...]]]></description>
			<content:encoded><![CDATA[<p><em>You have Ubuntu 9.10. You own M-Audio Audiophile 2496 audio interface. And you can&#8217;t hear a thing?</em></p>
<p>I had to deal with this twice.<br />
First time it was when I upgraded my Ubuntu 9.04 to 9.10. Everything was fine, except: my 2496 Audiophile stopped playing any sound at all. Daemon.log didn&#8217;t show any errors coming from pulse, I could clearly kill and start it without any errors whatsoever. So,  I let my xmms play a song, went to  the Pulse configuration, to see if xmms gets registered as a valid audio stream. Guess what, the bars (vu-meters) were pulsing left to right decently meaning that sound was actually been streamed.<br />
But still I couldn&#8217;t hear a thing.<br />
I then tried changing the chosen output device profile in Preferences -&gt; Sound -&gt; Hardware -&gt; Profile, but none of them helped. Googling around showed that dozens of people have experienced the same problem, and that there was not only ONE problem, but sometimes 2-3 different problems which pretty much looked alike.</p>
<p>Here are shortly the 2 problems I saw people complained about:<span id="more-31"></span></p>
<ol>
<li>Ubuntu didn&#8217;t recognize hardware / didn&#8217;t load any drivers whatsoever</li>
<li>Ubuntu recognized the driver but still no sound coming outC</li>
</ol>
<p>My problem belonged to the second group.</p>
<p>Solutions for this problem were mostly these:</p>
<p><strong>Solution #1</strong></p>
<p>create /etc/udev/rules.d/yourown_ice1712.rules file and copy into it:</p>
<pre>SUBSYSTEM!="sound", GOTO="ice1712_end"
 ACTION!="change", GOTO="ice1712_end"
 KERNEL!="card*", GOTO="ice1712_end"</pre>
<pre>SUBSYSTEMS=="pci", ATTRS{vendor}=="0x1412", ATTRS{device}=="0x1712", ATTRS{subsystem_vendor}=="0x1412", ATTRS{subsystem_device}=="0xd634", ENV{PULSE_PROFILE_SET}="via-ice1712.conf"</pre>
<pre> LABEL="ice1712_end"</pre>
<p>Then edit another file: /usr/share/pulseaudio/alsa-mixer/profile-sets/via-ice1712.conf<br />
and copy/paste the contents from: <a href="http://launchpadlibrarian.net/34620379/via-ice1712.conf">http://launchpadlibrarian.net/34620379/via-ice1712.conf</a></p>
<p>After this you should restart Pulse:</p>
<pre>$ pulseaudio --kill
$ pulseaudio --start
</pre>
<p>This helped some people but it did not help me. So I&#8217;ve searched on.<br />
Maybe it will fix your yours though, don&#8217;t know give it a try. Here is the link:<a href="https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/178442">https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/178442</a> to the complete discussion thread which is PRICELESS if you have sound problems with Koala.</p>
<p><strong>Solution #2</strong></p>
<p>The solution to my problem was much simpler than the aforementioned! I simply had to instruct Pulse to expect a front device which has 10 channels, by default it expects only 2 channels. Thanks to Asmo (<a href="https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/178442/comments/65">https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/178442/comments/65</a>) this was fairly easy to fix. Read the link, or just edit /usr/share/alsa/cards/ICE1712.conf and add to the ICE1712.pcm.front.0{} section these two lines:</p>
<pre>slave.format S32_LE
 slave.channels 10
</pre>
<p>A very helpful link I found out there &#8211; <a href="http://ubuntuforums.org/showthread.php?t=843012">http://ubuntuforums.org/showthread.php?t=843012</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2010/05/15/m-audio-audiophile-2496-on-ubuntu-9-10-no-sound/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
