Marc's Bloghttp://blog.marc-seeger.de2010-08-12Marc Seegermigrating mysql between servershttp://blog.marc-seeger.de/2010/08/12/migrating-mysql-between-servers2010-08-122010-08-12Marc Seeger<p>Especially if it's a large bunch of data, just using SSH, gzip and pipes is a good solution imho:<br/></p>
<div class="CodeRay">
<div class="code"><pre>mysqldump -uUSER -pPASS --single-transaction --extended-insert --quick -v <span class="co">DATABASENAME</span> | gzip | ssh -<span class="co">C</span> user<span class="iv">@newserver</span> <span class="s"><span class="dl">"</span><span class="k">gunzip | mysql -uUSER -pPASS DATABASENAME</span><span class="dl">"</span></span>
</pre></div>
</div>
<p>Especially if it's a large bunch of data, just using SSH, gzip and pipes is a good solution imho:<br/></p>
<div class="CodeRay">
<div class="code"><pre>mysqldump -uUSER -pPASS --single-transaction --extended-insert --quick -v <span class="co">DATABASENAME</span> | gzip | ssh -<span class="co">C</span> user<span class="iv">@newserver</span> <span class="s"><span class="dl">"</span><span class="k">gunzip | mysql -uUSER -pPASS DATABASENAME</span><span class="dl">"</span></span>
</pre></div>
</div>
Event-driven I/O paperhttp://blog.marc-seeger.de/2010/08/01/eventdriven_io_paper2010-08-012010-08-01Marc Seeger<p>Just another paper :)<br/>
Link: <a href="http://blog.marc-seeger.de/assets/papers/seeger-aysnc_io.pdf">[pdf]</a></p>
<p>And here the embedded version:<br/>
<object id="__sse4865674" width="477" height="510"><param name="movie" value="http://static.slidesharecdn.com/swf/doc_player.swf?doc=seeger-aysncio-100729092907-phpapp01&stripped_title=seeger-aysnc-io" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse4865674" src="http://static.slidesharecdn.com/swf/doc_player.swf?doc=seeger-aysncio-100729092907-phpapp01&stripped_title=seeger-aysnc-io" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="477" height="510"></embed></object></p>
<p>Just another paper :)<br/>
Link: <a href="http://blog.marc-seeger.de/assets/papers/seeger-aysnc_io.pdf">[pdf]</a></p>
<p>And here the embedded version:<br/>
<object id="__sse4865674" width="477" height="510"><param name="movie" value="http://static.slidesharecdn.com/swf/doc_player.swf?doc=seeger-aysncio-100729092907-phpapp01&stripped_title=seeger-aysnc-io" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse4865674" src="http://static.slidesharecdn.com/swf/doc_player.swf?doc=seeger-aysncio-100729092907-phpapp01&stripped_title=seeger-aysnc-io" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="477" height="510"></embed></object></p>
Another engine switchhttp://blog.marc-seeger.de/2010/07/31/another-engine-switch copy 22010-07-312010-07-31Marc Seeger<p>I decided that using a database for my blog was a bit of an overkill. This blog is now running on <a href="http://github.com/colszowka/serious">serious</a> and uses just a plain textfile backend.<br/>
Most of the old links should work without a lot of work. There are still some encoding errors here and there, I'll fix those when I have a few minutes of free time and motivation.<br/>
Sorry if the RSS feed exploded :)</p>
<p>I decided that using a database for my blog was a bit of an overkill. This blog is now running on <a href="http://github.com/colszowka/serious">serious</a> and uses just a plain textfile backend.<br/>
Most of the old links should work without a lot of work. There are still some encoding errors here and there, I'll fix those when I have a few minutes of free time and motivation.<br/>
Sorry if the RSS feed exploded :)</p>
rooting my t-mobile htc desirehttp://blog.marc-seeger.de/2010/06/26/rooting_my_t_mobile_htc_desire2010-06-262010-06-26Marc Seeger<p>as usual: you might brick your phone if you don't know what you're doing! so don't!</p>
<p>just a short list what I did to get my htc desire (t-mobile branded) to do what I want it to:</p>
<ol>
<li>Create Goldcard:<a href="http://android.modaco.com/content/general-discussion/305672/creating-a-goldcard/">instructions</a><br/>
I used diskutil on OSX to flash the goldcard image to the sd card like this:
<pre><code>diskutil unmountDisk /dev/disk2<br/>
sudo dd if=goldcard.img of=/dev/disk2<br/>
diskutil eject /dev/disk2</code></pre>
</li>
<li>download the bootloader 0.8 flash stuff from <a href="http://android.modaco.com/content/htc-desire-desire-modaco-com/307365/14-jun-r6-riskfreeroot-htc-desire-rooting-guide-now-with-hboot-0-80-and-os-to-1-21-support/">modaco</a> and follow the guide (this should give you root)</li>
<li>use <a href="http://unrevoked.com/recovery/">unrevoked^2</a> to permanently flash a recovery image that allows you to do nandroid backups and flash roms</li>
<li>flash whatever tickles your fancy</li>
</ol>
<p>as usual: you might brick your phone if you don't know what you're doing! so don't!</p>
<p>just a short list what I did to get my htc desire (t-mobile branded) to do what I want it to:</p>
<ol>
<li>Create Goldcard:<a href="http://android.modaco.com/content/general-discussion/305672/creating-a-goldcard/">instructions</a><br/>
I used diskutil on OSX to flash the goldcard image to the sd card like this:
<pre><code>diskutil unmountDisk /dev/disk2<br/>
sudo dd if=goldcard.img of=/dev/disk2<br/>
diskutil eject /dev/disk2</code></pre>
</li>
<li>download the bootloader 0.8 flash stuff from <a href="http://android.modaco.com/content/htc-desire-desire-modaco-com/307365/14-jun-r6-riskfreeroot-htc-desire-rooting-guide-now-with-hboot-0-80-and-os-to-1-21-support/">modaco</a> and follow the guide (this should give you root)</li>
<li>use <a href="http://unrevoked.com/recovery/">unrevoked^2</a> to permanently flash a recovery image that allows you to do nandroid backups and flash roms</li>
<li>flash whatever tickles your fancy</li>
</ol>
ingate verschenkt vserverhttp://blog.marc-seeger.de/2010/06/15/ingate_verschenkt_vserver2010-06-152010-06-15Marc Seeger<p>Klingt komisch, ist aber so.
In einem <a href="https://www.ingate.de/blog/2010/06/14/wir-verschenken-55-vserver/">Blogpost</a> verschenken die Jungs von Ingate.de einen XEN VServer.<br/>
Wie man mitmacht? Einfach die Aktion im eigenen Blog erwaehnen :)</p>
<p>Generell bekommt man bei Ingate recht interessante Server.<br/>
Hier mal die Daten zum "Basic" Modell:</p>
<pre><code>VServer Basic
5GB Speicherplatz (RAID1)
200MB RAM garantiert
200MB Swap
Traffic Flatrate
Voller Root-Zugriff per SSH
IP-Adressen gemaess RIPE
4,00 Euro / Monat
</code></pre>
<p>Klingt komisch, ist aber so.
In einem <a href="https://www.ingate.de/blog/2010/06/14/wir-verschenken-55-vserver/">Blogpost</a> verschenken die Jungs von Ingate.de einen XEN VServer.<br/>
Wie man mitmacht? Einfach die Aktion im eigenen Blog erwaehnen :)</p>
<p>Generell bekommt man bei Ingate recht interessante Server.<br/>
Hier mal die Daten zum "Basic" Modell:</p>
<pre><code>VServer Basic
5GB Speicherplatz (RAID1)
200MB RAM garantiert
200MB Swap
Traffic Flatrate
Voller Root-Zugriff per SSH
IP-Adressen gemaess RIPE
4,00 Euro / Monat
</code></pre>
June 2010 mashupshttp://blog.marc-seeger.de/2010/06/09/June_2010_mashups2010-06-092010-06-09Marc Seeger<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="100%" height="120" ><param name="movie" value="http://8tracks.com/mixes/124425/player_v2"><param name="allowscriptaccess" value="always"><param name="FlashVars" value="bg_color=_000000"><embed FlashVars="bg_color=_000000" src="http://8tracks.com/mixes/124425/player_v2" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100%" height="120" allowscriptaccess="always" ></embed></object></p>
<p>It has been a while since last time... there we go :)</p>
<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="100%" height="120" ><param name="movie" value="http://8tracks.com/mixes/124425/player_v2"><param name="allowscriptaccess" value="always"><param name="FlashVars" value="bg_color=_000000"><embed FlashVars="bg_color=_000000" src="http://8tracks.com/mixes/124425/player_v2" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100%" height="120" allowscriptaccess="always" ></embed></object></p>
<p>It has been a while since last time... there we go :)</p>
Fritzbox 7240 and KabelBWhttp://blog.marc-seeger.de/2010/05/17/Fritzbox_7240_and_KabelBW2010-05-172010-05-17Marc Seeger<p>Just in case anybody has problems setting up the FritzBox:<br/>
You have to reset the modem every time a new MAC accesses it!<br/>
--> set up standard "get internet via DHCP" stuff and then power-cycle the cable modem</p>
<p>Just in case anybody has problems setting up the FritzBox:<br/>
You have to reset the modem every time a new MAC accesses it!<br/>
--> set up standard "get internet via DHCP" stuff and then power-cycle the cable modem</p>
Dealing with invalid encodings in Ruby 1.9http://blog.marc-seeger.de/2010/04/21/Dealing_with_invalid_encodings_in_Ruby_1_92010-04-212010-04-21Marc Seeger<p>If you are trying to work with websites, you'll sooner or later find yourself in the situation that the advertised website encoding is in fact not the encoding of the stuff the server sends you.<br/>
This might show up in something like this:</p>
<pre><code>Encoding::UndefinedConversionError: "\xC3" from ASCII-8BIT to UTF-8</code></pre>
<p></p>
<p>In this case, something said the string (aka: website) you look at is ASCII-8BIT encoded, while it is in fact not.<br/>
This happened to me while trying to dump some JSON and I ended up having to look at the <a href="http://rubydoc.ruby-forum.com/doc/ruby-1.9.1-p129/classes/String.html#M000361">encode method</a> in ruby 1.9:</p>
<pre><code>ok_string = bad_string.encode("UTF-8", {:invalid => :replace, :undef => :replace})
</code></pre>
<p>This works ok for my area as I don't really care about a few missing accents or umlauts. If you actually want to keep the document in an ok form, you might want to look at the <a href="http://rubydoc.ruby-forum.com/doc/ruby-1.9.1-p129/classes/String.html#M000358">.force_encoding()</a> method.</p>
<p>If you are trying to work with websites, you'll sooner or later find yourself in the situation that the advertised website encoding is in fact not the encoding of the stuff the server sends you.<br/>
This might show up in something like this:</p>
<pre><code>Encoding::UndefinedConversionError: "\xC3" from ASCII-8BIT to UTF-8</code></pre>
<p></p>
<p>In this case, something said the string (aka: website) you look at is ASCII-8BIT encoded, while it is in fact not.<br/>
This happened to me while trying to dump some JSON and I ended up having to look at the <a href="http://rubydoc.ruby-forum.com/doc/ruby-1.9.1-p129/classes/String.html#M000361">encode method</a> in ruby 1.9:</p>
<pre><code>ok_string = bad_string.encode("UTF-8", {:invalid => :replace, :undef => :replace})
</code></pre>
<p>This works ok for my area as I don't really care about a few missing accents or umlauts. If you actually want to keep the document in an ok form, you might want to look at the <a href="http://rubydoc.ruby-forum.com/doc/ruby-1.9.1-p129/classes/String.html#M000358">.force_encoding()</a> method.</p>
Getting a google voice account for non-US residentshttp://blog.marc-seeger.de/2010/02/28/Getting_a_google_voice_account_for_non_US_residents2010-02-282010-02-28Marc Seeger<p>I found this to be pretty handy because this solution allows you to call any cellphone/landline number in the US for free. I might as well share it:</p>
<p>Things you will need:</p>
<ul>
<li>Something that will result in you having an american IP (<a href="http://hotspotshield.com/">hotspotshield</a>, proxies, ... I used a server in the US and did <a href="http://blog.marc-seeger.de/2007/11/08/tunneling-everything-via-ssh-aka-fighting-the-nazi-firewall-of-death">SSH Forwarding</a>)</li>
<li>a SIP account (you can get them basically everywhere. <a href="https://www.ekiga.net/index.php?page=register">ekiga</a> probably works. I used my dus.net account.</li>
<li>a service that will forward an american phone number to your SIP account. A good service for that is <a href="http://phone.ipkall.com/">ipkall</a></li>
<li>last but not least: <a href="https://services.google.com/fb/forms/googlevoiceinvite/">a google voice invite</a> <- don't have any atm, sorry</li>
</ul>
<p>How to do it:</p>
<p>I found this to be pretty handy because this solution allows you to call any cellphone/landline number in the US for free. I might as well share it:</p>
<p>Things you will need:</p>
<ul>
<li>Something that will result in you having an american IP (<a href="http://hotspotshield.com/">hotspotshield</a>, proxies, ... I used a server in the US and did <a href="http://blog.marc-seeger.de/2007/11/08/tunneling-everything-via-ssh-aka-fighting-the-nazi-firewall-of-death">SSH Forwarding</a>)</li>
<li>a SIP account (you can get them basically everywhere. <a href="https://www.ekiga.net/index.php?page=register">ekiga</a> probably works. I used my dus.net account.</li>
<li>a service that will forward an american phone number to your SIP account. A good service for that is <a href="http://phone.ipkall.com/">ipkall</a></li>
<li>last but not least: <a href="https://services.google.com/fb/forms/googlevoiceinvite/">a google voice invite</a> <- don't have any atm, sorry</li>
</ul>
<p>How to do it:</p>
<ol>
<li>First, you've got to set up ipkall to forward the american phone number to your sip account</li>
<li>Then: Click then invite link with your proxy/forwarding/... active so google will detect a US IP</li>
<li>In the signup process, google will ask for a US phone number, just take the one ipkall gave you</li>
<li>Google will then show you a number and call the american phone number. You have to type in the number you see to verify that you actually are in possession of that number. You sometimes have to check how DTFM signals ("the beeping") are actually handled (in-band, out-of-band). As far as I remember, I used "in-band", the lamest yet easiest solution</li>
<li>After that you should have a google voice account that you can use to call the US for free</li>
</ol>
<p>After you have an active google voice account, all you have to do is tell google what number to dial. You don't need a proxy for that anymore.<br/>
Google will then call your "american landline" first, ipkall will forward this to your SIP account. Upon picking up the phone, google will start dialing the number you set on the website and from then on, it'll be just as if you dialed that number yourself. Just in this case: it's free.<br/>
I'm currently also using google voice to make calls to Germany from the US for 2 cents/minute. In that case, I could actually put in my US cellphone number though :)</p>
Getting started with ruby dRuby (drb)http://blog.marc-seeger.de/2010/02/10/Getting_started_with_ruby_dRuby__drb_2010-02-102010-02-10Marc Seeger<p>dRuby is a distributed object system for Ruby. It allows an object in one Ruby process to invoke methods on an object in another Ruby process on the same or a different machine.<br/>
The Ruby standard library contains the core classes of the dRuby package.</p>
<p>Because it's really hard to find a good example that is NOT the usual "we'll create a tuplespace" one, I decided to put something up.<br/>
This example contains 3 conponents:<br/>
a) "rinda": this component is the point where the servers announce theit services and the clients receive information about the servers. Servers and clients automatically find the server thanks to UDP broadcasts</p>
<p>b) the server: basically a wrapper arround a "regular" class file that looks for the rinda server, registers the service there once it has found it and provides the interface to the "regular" class file over the network</p>
<p>c) the client:</p>
<p>dRuby is a distributed object system for Ruby. It allows an object in one Ruby process to invoke methods on an object in another Ruby process on the same or a different machine.<br/>
The Ruby standard library contains the core classes of the dRuby package.</p>
<p>Because it's really hard to find a good example that is NOT the usual "we'll create a tuplespace" one, I decided to put something up.<br/>
This example contains 3 conponents:<br/>
a) "rinda": this component is the point where the servers announce theit services and the clients receive information about the servers. Servers and clients automatically find the server thanks to UDP broadcasts</p>
<p>b) the server: basically a wrapper arround a "regular" class file that looks for the rinda server, registers the service there once it has found it and provides the interface to the "regular" class file over the network</p>
<p>c) the client:</p>
<p><strong>rinda</strong>:</p>
<div class="CodeRay">
<div class="code"><pre>
require <span class="s"><span class="dl">'</span><span class="k">rinda/ring</span><span class="dl">'</span></span>
require <span class="s"><span class="dl">'</span><span class="k">rinda/tuplespace</span><span class="dl">'</span></span>
<span class="c"># start DRb</span>
<span class="co">DRb</span>.start_service
<span class="c"># Create a TupleSpace to hold named services, and start running</span>
<span class="co">Rinda</span>::<span class="co">RingServer</span>.new <span class="co">Rinda</span>::<span class="co">TupleSpace</span>.new
puts <span class="s"><span class="dl">"</span><span class="k">started rinda service</span><span class="dl">"</span></span>
<span class="c"># Wait until the user explicitly kills the server.</span>
<span class="co">DRb</span>.thread.join
</pre></div>
</div>
<p><strong>The Server</strong></p>
<div class="CodeRay">
<div class="code"><pre>
require <span class="s"><span class="dl">'</span><span class="k">drb</span><span class="dl">'</span></span>
require <span class="s"><span class="dl">'</span><span class="k">rinda/ring</span><span class="dl">'</span></span>
<span class="c"># expand the load path</span>
puts <span class="s"><span class="dl">"</span><span class="k">creating the service</span><span class="dl">"</span></span>
<span class="c"># creating my service</span>
my_service = <span class="co">SomeClass</span>.new
<span class="c">#making it available via DRB (local IP gets detected automatically)</span>
drb_wrapper = <span class="co">DRb</span>.start_service(<span class="pc">nil</span>, my_service)
puts <span class="s"><span class="dl">"</span><span class="k">looking for rinda server</span><span class="dl">"</span></span>
ring_server = <span class="co">Rinda</span>::<span class="co">RingFinger</span>.primary
puts <span class="s"><span class="dl">"</span><span class="k">Found it!--> </span><span class="il"><span class="idl">#{</span>ring_server.__drburi<span class="idl">}</span></span><span class="dl">"</span></span>
puts <span class="s"><span class="dl">"</span><span class="k">Registering my service</span><span class="dl">"</span></span>
name = <span class="sh"><span class="dl">`</span><span class="k">hostname</span><span class="dl">`</span></span>
<span class="c">#will be checked every 5 seconds</span>
renewer = <span class="co">Rinda</span>::<span class="co">SimpleRenewer</span>.new(<span class="i">5</span>)
tuple = [<span class="sy">:name</span>, my_service, drb_wrapper, <span class="s"><span class="dl">"</span><span class="k">Monitoring Service on </span><span class="il"><span class="idl">#{</span>name<span class="idl">}</span></span><span class="dl">"</span></span>]
ring_server.write(tuple, renewer)
puts <span class="s"><span class="dl">"</span><span class="k">Registered and running!</span><span class="dl">"</span></span>
<span class="co">DRb</span>.thread.join
</pre></div>
</div>
<p><strong>The Client</strong></p>
<div class="CodeRay">
<div class="code"><pre>
require <span class="s"><span class="dl">'</span><span class="k">drb</span><span class="dl">'</span></span>
require <span class="s"><span class="dl">'</span><span class="k">rinda/ring</span><span class="dl">'</span></span>
puts <span class="s"><span class="dl">"</span><span class="k">Getting available Servers</span><span class="dl">"</span></span>
<span class="co">DRb</span>.start_service
ring_server = <span class="co">Rinda</span>::<span class="co">RingFinger</span>.primary
services = ring_server.read_all [<span class="sy">:name</span>, <span class="pc">nil</span>, <span class="pc">nil</span>, <span class="pc">nil</span>]
puts <span class="s"><span class="dl">"</span><span class="k">Services on </span><span class="il"><span class="idl">#{</span>ring_server.__drburi<span class="idl">}</span></span><span class="dl">"</span></span>
puts <span class="s"><span class="dl">"</span><span class="k">Amount: </span><span class="il"><span class="idl">#{</span>services.size<span class="idl">}</span></span><span class="dl">"</span></span>
<span class="c">#create an array of hashes</span>
services.map!{|service| {<span class="sy">:object</span> => service[<span class="i">1</span>], <span class="sy">:uri</span> =>
service[<span class="i">2</span>].__drburi, <span class="sy">:description</span> => service[<span class="i">3</span>]} }
<span class="c">#sort them according to IP/URI</span>
services.sort{|srv1, srv2| srv1[<span class="sy">:uri</span>] <=> srv2[<span class="sy">:uri</span>]}
</pre></div>
</div>
<p>if you want to execute a function, just use it like a regular object:</p>
<div class="CodeRay">
<div class="code"><pre>
bla = <span class="co">Drbobject</span>.new(<span class="pc">nil</span>,service[<span class="sy">:object</span>])
bla.some_method
</pre></div>
</div>
Facebook opens up xmpp chathttp://blog.marc-seeger.de/2010/02/10/Facebook_opens_up_xmpp_chat2010-02-102010-02-10Marc Seeger<p>Facebook has officially opened up their facebook chat:<br/>
<img alt="Facebook xmpp chat" src="http://blog.marc-seeger.de/assets/2010/02/10/facebook_xmpp.png"/><br/>
The question is: do I really want that in my roster?<br/>
Also: no SSL/TLS?</p>
<p>Facebook has officially opened up their facebook chat:<br/>
<img alt="Facebook xmpp chat" src="http://blog.marc-seeger.de/assets/2010/02/10/facebook_xmpp.png"/><br/>
The question is: do I really want that in my roster?<br/>
Also: no SSL/TLS?</p>
Visio 2007 Pro in winehttp://blog.marc-seeger.de/2010/01/30/Visio_2007_Pro_in_wine2010-01-302010-01-30Marc Seeger<p>For a lot of people, visio 2007 professional immediately crashes when you try to open a .vsd file in wine.<br/>
Using those .dll overrides, it works like a charm:<br/>
<img alt="visio overrides" src="http://blog.marc-seeger.de/assets/2010/01/30/wine_visio.png"/><br/>
Hope this helps somebody :)</p>
<p>For a lot of people, visio 2007 professional immediately crashes when you try to open a .vsd file in wine.<br/>
Using those .dll overrides, it works like a charm:<br/>
<img alt="visio overrides" src="http://blog.marc-seeger.de/assets/2010/01/30/wine_visio.png"/><br/>
Hope this helps somebody :)</p>
refreshing system environment variables in windowshttp://blog.marc-seeger.de/2010/01/19/refreshing_system_environment_variables_in_windows2010-01-192010-01-19Marc Seeger<p>It is impossible to simply tell a process to "refresh" the system environment variables in Windows. A running process will always have the ones present from when he began executing. <br/>
One thing you CAN do, is simply get the current System Environment using vbscript and set it as temporary variables. After the next login, the variables will be there anyway.</p>
<p>It is impossible to simply tell a process to "refresh" the system environment variables in Windows. A running process will always have the ones present from when he began executing. <br/>
One thing you CAN do, is simply get the current System Environment using vbscript and set it as temporary variables. After the next login, the variables will be there anyway.</p>
<p>Just create a .vbs file:</p>
<div class="CodeRay">
<div class="code"><pre><span class="co">Set</span> oShell = <span class="co">WScript</span>.CreateObject(<span class="s"><span class="dl">"</span><span class="k">WScript.Shell</span><span class="dl">"</span></span>)
filename = oShell.ExpandEnvironmentStrings(<span class="s"><span class="dl">"</span><span class="k">%TEMP%</span><span class="ch">\r</span><span class="k">esetvars.bat</span><span class="dl">"</span></span>)
<span class="co">Set</span> objFileSystem = CreateObject(<span class="s"><span class="dl">"</span><span class="k">Scripting.fileSystemObject</span><span class="dl">"</span></span>)
<span class="co">Set</span> oFile = objFileSystem.CreateTextFile(filename, <span class="co">TRUE</span>)
set oEnv=oShell.Environment(<span class="s"><span class="dl">"</span><span class="k">System</span><span class="dl">"</span></span>)
<span class="r">for</span> each sitem <span class="r">in</span> oEnv
oFile.WriteLine(<span class="s"><span class="dl">"</span><span class="k">SET </span><span class="dl">"</span></span> & sitem)
<span class="r">next</span>
path = oEnv(<span class="s"><span class="dl">"</span><span class="k">PATH</span><span class="dl">"</span></span>)
set oEnv=oShell.Environment(<span class="s"><span class="dl">"</span><span class="k">User</span><span class="dl">"</span></span>)
<span class="r">for</span> each sitem <span class="r">in</span> oEnv
oFile.WriteLine(<span class="s"><span class="dl">"</span><span class="k">SET </span><span class="dl">"</span></span> & sitem)
<span class="r">next</span>
path = path & <span class="s"><span class="dl">"</span><span class="k">;</span><span class="dl">"</span></span> & oEnv(<span class="s"><span class="dl">"</span><span class="k">PATH</span><span class="dl">"</span></span>)
oFile.WriteLine(<span class="s"><span class="dl">"</span><span class="k">SET PATH=</span><span class="dl">"</span></span> & path)
oFile.<span class="co">Close</span>
</pre></div>
</div>
<p>And a matching batch file:</p>
<div class="CodeRay">
<div class="code"><pre><span class="s"><span class="dl">"</span><span class="k">%~dp0resetvars.vbs</span><span class="dl">"</span></span>
call <span class="s"><span class="dl">"</span><span class="k">%TEMP%</span><span class="ch">\r</span><span class="k">esetvars.bat</span><span class="dl">"</span></span>
del <span class="s"><span class="dl">"</span><span class="k">%TEMP%</span><span class="ch">\r</span><span class="k">esetvars.bat</span><span class="dl">"</span></span>
</pre></div>
</div>
<p>By launching the batch file, you'll get updated temporary variables in your current process.</p>
<p>found on <a href="http://stackoverflow.com/questions/171588/is-there-a-command-to-refresh-environment-variables-from-the-command-prompt-in">stackoverflow</a></p>
How to change the APN on the Palm Prehttp://blog.marc-seeger.de/2010/01/17/How_to_change_the_APN_on_the_Palm_Pre2010-01-172010-01-17Marc Seeger<p>While in the beginning, you actually had to fiddle with an sqlite database, you now can simply edit the APN settings from within them phones menu system. Here is how:</p>
<ul>
<li>select the phone icon (as if you wanted to make a call)</li>
<li>go to the menu at the top and select preferences:<br/>
<img src="http://blog.marc-seeger.de/assets/2010/01/17/apn_01.png"/></li>
<li>enable the "manual settings" field and tap on "Edit Network Settings"<br/>
<img src="http://blog.marc-seeger.de/assets/2010/01/17/apn_02.png"/></li>
<li>Insert your settings<br/>
<img src="http://blog.marc-seeger.de/assets/2010/01/17/apn_03.png"/></li>
</ul>
<p>It worked fine for me without any manual settings on simyo (german virtual provider using the eplus network), but I'm sure this will come in handy</p>
<p>While in the beginning, you actually had to fiddle with an sqlite database, you now can simply edit the APN settings from within them phones menu system. Here is how:</p>
<ul>
<li>select the phone icon (as if you wanted to make a call)</li>
<li>go to the menu at the top and select preferences:<br/>
<img src="http://blog.marc-seeger.de/assets/2010/01/17/apn_01.png"/></li>
<li>enable the "manual settings" field and tap on "Edit Network Settings"<br/>
<img src="http://blog.marc-seeger.de/assets/2010/01/17/apn_02.png"/></li>
<li>Insert your settings<br/>
<img src="http://blog.marc-seeger.de/assets/2010/01/17/apn_03.png"/></li>
</ul>
<p>It worked fine for me without any manual settings on simyo (german virtual provider using the eplus network), but I'm sure this will come in handy</p>
Event: Veranstaltung zur Architektur und zum Betrieb sozialer Netzwerkehttp://blog.marc-seeger.de/2010/01/14/Event__Veranstaltung_zur_Architektur_und_zum_Betrieb_sozialer_Netzwerke2010-01-142010-01-14Marc Seeger<p>StudiVZ, Xing und Co - Die Langsamen werden verlassen.
Veranstaltung zur Architektur und zum Betrieb sozialer Netzwerke</p>
<p>Soziale Netzwerke gehören mittlerweile zu den größten von Menschen erstellten IT-Infrastrukturen. Sie stellen enorme Anforderungen an die Architekturen sowie an den Betriebsablauf. Wie werden sie in der Praxis realisiert, damit Millionen von Usern problemlos und schnell kommunizieren können?</p>
<p>Bei der MediaNight stellen Studierende Projektarbeiten vor Das erfahren Interessenten am 22. Januar 2010 ab 12.30 Uhr an der Hochschule der Medien (HdM). Macher und Experten sozialer Netzwerke gestatten einen Blick hinter die Kulissen von StudiVZ oder XING. Gäste sind zu der Veranstaltung herzlich willkommen, die Teilnahme ist kostenlos.</p>
<p>Zum Auftakt stellen Studierende des Master-Studiengangs Computer Science and Media der HdM die Techniken zur Durchführung von Last- und Performancetests, Monitoring und Alarming, Caching und Parallelverarbeitung am Beispiel einer Wikimedia Installation vor. Sie gehen auch auf alternative Architekturen ein. Anschließend beschreibt Heiko Specht, Account Manager bei Gomez Deutschland, München, die Möglichkeiten externen Monitorings. Mit diesem Verfahren stellen die Betreiber großer Websites sicher, dass ihre Inhalte überall auf der Welt in der gewohnten Qualität verfügbar sind. Danach geht Johannes Mainusch, Vice President Operations bei XING, auf die Performance von Websites ein. Unter dem Motto: „Wer langsam ist, wird verlassen" lässt er hinter die Kulissen von XING blicken. Was Clients bei externem Monitoring besser machen können, stellt Jakob Schröter vom Master-Studiengang Computer Science and Media der HdM vor. Den Schlusspunkt setzt Dennis Bemmann, StudiVZ-Gründer und Informatiker. Er geht auf die Skalierbarkeit, den Datenschutz und die Geschichte der Plattform StudiVZ ein und freut sich auf eine rege Diskussion zu den Entwicklungsperspektiven der sozialen Netze.</p>
<p>Die Veranstaltung wird aufgezeichnet. Der Mitschnitt wird auf der Webseite des Studiengangs Medieninformatik bereit gestellt.</p>
<p>PROGRAMM
12.30 Uhr
Begrüßung und Einführung ins Thema
Prof. Walter Kriha, Studiengang Medieninformatik der HdM
12.45 Uhr
Wikimedia - Ausmessen des LAMP Stacks mit Werkzeugen, Studierende des Master-Studiengangs Computer Science and Media der HdM
13.30 Uhr
Externes Monitoring
Heiko Specht, Account Manager Gomez Deutschland
14.45 Uhr
Wer langsam ist wird verlassen - Performance großer Websites, ein Blick hinter die Kulissen von XING
Dr. Johannes Mainusch, Vice President Operations XING
16.00 Uhr
Client-side Optimizations
Jakob Schröter, Master-Studiengangs Computer Science and Media der HdM
16.30 Uhr
Skalierbarkeit, Datenschutz und Geschichte von StudiVZ - Technik und Diskussion
Dennis Bemmann, StudiVZ Gründer
17.45 Uhr
Ende der Veranstaltung
Wann?
22. Januar 2010, 12.30 Uhr
Wo?
HdM, Nobelstr. 10, 70569 Stuttgart, Raum 056 (Aquarium)</p>
<p>UPDATE: Videos sind nun <a href="http://days.mi.hdm-stuttgart.de/"> hier</a> verfügbar.</p>
<p>StudiVZ, Xing und Co - Die Langsamen werden verlassen.
Veranstaltung zur Architektur und zum Betrieb sozialer Netzwerke</p>
<p>Soziale Netzwerke gehören mittlerweile zu den größten von Menschen erstellten IT-Infrastrukturen. Sie stellen enorme Anforderungen an die Architekturen sowie an den Betriebsablauf. Wie werden sie in der Praxis realisiert, damit Millionen von Usern problemlos und schnell kommunizieren können?</p>
<p>Bei der MediaNight stellen Studierende Projektarbeiten vor Das erfahren Interessenten am 22. Januar 2010 ab 12.30 Uhr an der Hochschule der Medien (HdM). Macher und Experten sozialer Netzwerke gestatten einen Blick hinter die Kulissen von StudiVZ oder XING. Gäste sind zu der Veranstaltung herzlich willkommen, die Teilnahme ist kostenlos.</p>
<p>Zum Auftakt stellen Studierende des Master-Studiengangs Computer Science and Media der HdM die Techniken zur Durchführung von Last- und Performancetests, Monitoring und Alarming, Caching und Parallelverarbeitung am Beispiel einer Wikimedia Installation vor. Sie gehen auch auf alternative Architekturen ein. Anschließend beschreibt Heiko Specht, Account Manager bei Gomez Deutschland, München, die Möglichkeiten externen Monitorings. Mit diesem Verfahren stellen die Betreiber großer Websites sicher, dass ihre Inhalte überall auf der Welt in der gewohnten Qualität verfügbar sind. Danach geht Johannes Mainusch, Vice President Operations bei XING, auf die Performance von Websites ein. Unter dem Motto: „Wer langsam ist, wird verlassen" lässt er hinter die Kulissen von XING blicken. Was Clients bei externem Monitoring besser machen können, stellt Jakob Schröter vom Master-Studiengang Computer Science and Media der HdM vor. Den Schlusspunkt setzt Dennis Bemmann, StudiVZ-Gründer und Informatiker. Er geht auf die Skalierbarkeit, den Datenschutz und die Geschichte der Plattform StudiVZ ein und freut sich auf eine rege Diskussion zu den Entwicklungsperspektiven der sozialen Netze.</p>
<p>Die Veranstaltung wird aufgezeichnet. Der Mitschnitt wird auf der Webseite des Studiengangs Medieninformatik bereit gestellt.</p>
<p>PROGRAMM
12.30 Uhr
Begrüßung und Einführung ins Thema
Prof. Walter Kriha, Studiengang Medieninformatik der HdM
12.45 Uhr
Wikimedia - Ausmessen des LAMP Stacks mit Werkzeugen, Studierende des Master-Studiengangs Computer Science and Media der HdM
13.30 Uhr
Externes Monitoring
Heiko Specht, Account Manager Gomez Deutschland
14.45 Uhr
Wer langsam ist wird verlassen - Performance großer Websites, ein Blick hinter die Kulissen von XING
Dr. Johannes Mainusch, Vice President Operations XING
16.00 Uhr
Client-side Optimizations
Jakob Schröter, Master-Studiengangs Computer Science and Media der HdM
16.30 Uhr
Skalierbarkeit, Datenschutz und Geschichte von StudiVZ - Technik und Diskussion
Dennis Bemmann, StudiVZ Gründer
17.45 Uhr
Ende der Veranstaltung
Wann?
22. Januar 2010, 12.30 Uhr
Wo?
HdM, Nobelstr. 10, 70569 Stuttgart, Raum 056 (Aquarium)</p>
<p>UPDATE: Videos sind nun <a href="http://days.mi.hdm-stuttgart.de/"> hier</a> verfügbar.</p>
starting batch files from UNC pathshttp://blog.marc-seeger.de/2010/01/12/starting_batch_files_from_UNC_paths2010-01-122010-01-12Marc Seeger<p>If you want to execute a batch file from an UNC Path, windows will first tell you that "CMD does not support UNC paths as current directories" and it will switch to some other directory instead.<br/>
If you still want to be able to do your stuff without copying everything to your local drive: use pushd and popd.</p>
<p><strong>pushd</strong> will automatically connect the given path as a network drive and <strong>popd</strong> will disconnect it again.<br/>
By using **%</p>
<p>If you want to execute a batch file from an UNC Path, windows will first tell you that "CMD does not support UNC paths as current directories" and it will switch to some other directory instead.<br/>
If you still want to be able to do your stuff without copying everything to your local drive: use pushd and popd.</p>
<p><strong>pushd</strong> will automatically connect the given path as a network drive and <strong>popd</strong> will disconnect it again.<br/>
By using <strong>%dp0</strong> as a paramter, you're using the path of the batch file and handing it over to pushd :)</p>
<pre>
pushd "%~dp0"
[...]
popd
</pre>
<p>happy scripting :)</p>
Alternative Infrastructurehttp://blog.marc-seeger.de/2010/01/12/Alternative_Infrastructure2010-01-122010-01-12Marc Seeger<p>Just a short presentation for a lecture. hacked together, nothing really original :)<br/>
PDF [<a href="http://blog.marc-seeger.de/assets/papers/alternative_infrastructure.pdf">here</a>]<br/>
<object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=alternativeinfrastuktur-100112170843-phpapp01&stripped_title=alternative-infrastucture" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=alternativeinfrastuktur-100112170843-phpapp01&stripped_title=alternative-infrastucture" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object></p>
<p>Just a short presentation for a lecture. hacked together, nothing really original :)<br/>
PDF [<a href="http://blog.marc-seeger.de/assets/papers/alternative_infrastructure.pdf">here</a>]<br/>
<object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=alternativeinfrastuktur-100112170843-phpapp01&stripped_title=alternative-infrastucture" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=alternativeinfrastuktur-100112170843-phpapp01&stripped_title=alternative-infrastucture" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object></p>
Communitygetriebene Android Systemerweiterungenhttp://blog.marc-seeger.de/2010/01/10/Communitygetriebene_Android_Systemerweiterungen2010-01-102010-01-10Marc Seeger<p>A short (German) presentation of an upcoming paper :)<br/>
Slideshare:</p>
<p><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=androidcommunitysystemdev-100110124536-phpapp01&stripped_title=communitygetriebene-android-systemerweiterungen" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=androidcommunitysystemdev-100110124536-phpapp01&stripped_title=communitygetriebene-android-systemerweiterungen" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object></p>
<p>PDF <a href="http://blog.marc-seeger.de/assets/papers/android_community_system_dev.pdf">available here</a></p>
<p>A short (German) presentation of an upcoming paper :)<br/>
Slideshare:</p>
<p><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=androidcommunitysystemdev-100110124536-phpapp01&stripped_title=communitygetriebene-android-systemerweiterungen" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=androidcommunitysystemdev-100110124536-phpapp01&stripped_title=communitygetriebene-android-systemerweiterungen" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object></p>
<p>PDF <a href="http://blog.marc-seeger.de/assets/papers/android_community_system_dev.pdf">available here</a></p>
Nigerians apparently still activehttp://blog.marc-seeger.de/2010/01/05/Nigerians_apparently_still_active2010-01-052010-01-05Marc Seeger<p>I just tried out "<a href="http://kleinanzeigen.ebay.de/anzeigen/">eBay Kleinanzeigen</a>" (apparently they bought kijiji) and this is the first thing I recieved (it's german... sorta):</p>
<blockquote>
Hallo, Ich werde beim Kauf Ihres Artikels für meinen Kunden in Nigeria als ein Geschenk und ich Jahreszeit interessant werden Sie von Bank zu Bank Überweisung oder PayPal zahlen, so werde ich, wie Sie zu mir zurück Mail für weitere Diskussionen zu Zahlung und Versand des Artikels. Danke James Smith
</blockquote>
<p>Oh Mr. Smith... :)</p>
<p>Update, next one:</p>
<blockquote>
Hallo, wie Sie tun Sie akzeptieren, 450 EUR für diesen Artikel auch die Portokosten zu meiner Frau in Großbritannien
</blockquote>
<p>Update 2; WTF?:</p>
<blockquote>
hallo Ich bin der Mrs Rose Mary Lopez, ich bin am Kauf der Artikel bei Ihnen interessiert sind, so möchte ich den aktuellen Status dieses Problem kennen und auch die letzte price.and die Methode der Zahlung per Überweisung auf das Bankkonto, geben Sie dies bitte zurück zu mir so bald wie möglich an meine E-Mail-Adresse (rosemarylopez2001@gmail.com). Ich warte auf Ihre Antwort. Mit besten Grüßen. Mrs Rose Mary Lopez
</blockquote>
<p> <br/>
Update 3:</p>
<blockquote>
Nachricht:
Hallo Verkäufer der Saison ergänzen i bin sehr an diesem Titel und ich interessiert sind, möchten Sie mich wissen lassen, wenn ihr noch Avaialable zum Verkauf email me back asap .. bis janet.linda20009 @ gmail.com
</blockquote>
<p>Update 4:</p>
<blockquote>Ich will gerne wissen, ob dieser Position ist noch verfügbar zum Verkauf Zurück zu mir auf: - mrs.marysandra@gmail.com</blockquote>
<p>Update 5:</p>
<blockquote>Hallo, Ich bin am Kauf dieses Artikels bitten lassen Sie es mich wissen, die Gesamtkosten für diesen Artikel und den Versand nach Nigeria mit DHL interessiert. Und auch senden Sie mir Ihre Bankverbindung, damit ich die Zahlung kann am Montag Morgen, nachdem die Artikel dringend erforderlich Danke
(godwinc81@yahoo.com)
</blockquote>
<p></p>
<p>Update 6:</p>
<blockquote>
Hello You still have this item for sale? you can get back to me with the total cost payment via bank transfer or paypal so kindly reply me back to this email directly: stefaniebrown.aw@googlemail.com
</blockquote>
<p>I just tried out "<a href="http://kleinanzeigen.ebay.de/anzeigen/">eBay Kleinanzeigen</a>" (apparently they bought kijiji) and this is the first thing I recieved (it's german... sorta):</p>
<blockquote>
Hallo, Ich werde beim Kauf Ihres Artikels für meinen Kunden in Nigeria als ein Geschenk und ich Jahreszeit interessant werden Sie von Bank zu Bank Überweisung oder PayPal zahlen, so werde ich, wie Sie zu mir zurück Mail für weitere Diskussionen zu Zahlung und Versand des Artikels. Danke James Smith
</blockquote>
<p>Oh Mr. Smith... :)</p>
<p>Update, next one:</p>
<blockquote>
Hallo, wie Sie tun Sie akzeptieren, 450 EUR für diesen Artikel auch die Portokosten zu meiner Frau in Großbritannien
</blockquote>
<p>Update 2; WTF?:</p>
<blockquote>
hallo Ich bin der Mrs Rose Mary Lopez, ich bin am Kauf der Artikel bei Ihnen interessiert sind, so möchte ich den aktuellen Status dieses Problem kennen und auch die letzte price.and die Methode der Zahlung per Überweisung auf das Bankkonto, geben Sie dies bitte zurück zu mir so bald wie möglich an meine E-Mail-Adresse (rosemarylopez2001@gmail.com). Ich warte auf Ihre Antwort. Mit besten Grüßen. Mrs Rose Mary Lopez
</blockquote>
<p> <br/>
Update 3:</p>
<blockquote>
Nachricht:
Hallo Verkäufer der Saison ergänzen i bin sehr an diesem Titel und ich interessiert sind, möchten Sie mich wissen lassen, wenn ihr noch Avaialable zum Verkauf email me back asap .. bis janet.linda20009 @ gmail.com
</blockquote>
<p>Update 4:</p>
<blockquote>Ich will gerne wissen, ob dieser Position ist noch verfügbar zum Verkauf Zurück zu mir auf: - mrs.marysandra@gmail.com</blockquote>
<p>Update 5:</p>
<blockquote>Hallo, Ich bin am Kauf dieses Artikels bitten lassen Sie es mich wissen, die Gesamtkosten für diesen Artikel und den Versand nach Nigeria mit DHL interessiert. Und auch senden Sie mir Ihre Bankverbindung, damit ich die Zahlung kann am Montag Morgen, nachdem die Artikel dringend erforderlich Danke
(godwinc81@yahoo.com)
</blockquote>
<p></p>
<p>Update 6:</p>
<blockquote>
Hello You still have this item for sale? you can get back to me with the total cost payment via bank transfer or paypal so kindly reply me back to this email directly: stefaniebrown.aw@googlemail.com
</blockquote>
Linux on the MSI Wind U115 with the GMA 500 http://blog.marc-seeger.de/2010/01/03/Linux_on_the_MSI_Wind_U115_with_the_GMA_500_2010-01-032010-01-03Marc Seeger<p>The GMA500 chipset which was licensed by Intel but originated at PowerVR has a pretty bad Linux support.<br/>
While there IS a driver, it is mostly closed source, shippes its own DRM module and is basically a big bag of hurt.<br/>
While there was some <a href="https://wiki.ubuntu.com/HardwareSupportComponentsVideoCardsPoulsbo/">stuff</a> to make it run on Ubuntu, I was never really able to have any success with following those guides.<br/>
Turns out, the driver used had a <a href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-psb/+bug/406529">bug</a> with the MSI Wind series of netbooks.<br/>
Luckily, linux-tipps.blogspot.com had an perfect how-to and a prepatched driver available <a href="http://linux-tipps.blogspot.com/2009/12/vaapi-accelerated-hd-video-on-msi-wind.html">over here</a>.<br/>
I'm now running a fully functional Ubuntu 9.10 with the latest kernel updates and a bunch of applications at about 50% the size of the previous Windows 7 installation. This has the advantage that it actually fits perfectly on the netbooks SDD.</p>
<p>The GMA500 chipset which was licensed by Intel but originated at PowerVR has a pretty bad Linux support.<br/>
While there IS a driver, it is mostly closed source, shippes its own DRM module and is basically a big bag of hurt.<br/>
While there was some <a href="https://wiki.ubuntu.com/HardwareSupportComponentsVideoCardsPoulsbo/">stuff</a> to make it run on Ubuntu, I was never really able to have any success with following those guides.<br/>
Turns out, the driver used had a <a href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-psb/+bug/406529">bug</a> with the MSI Wind series of netbooks.<br/>
Luckily, linux-tipps.blogspot.com had an perfect how-to and a prepatched driver available <a href="http://linux-tipps.blogspot.com/2009/12/vaapi-accelerated-hd-video-on-msi-wind.html">over here</a>.<br/>
I'm now running a fully functional Ubuntu 9.10 with the latest kernel updates and a bunch of applications at about 50% the size of the previous Windows 7 installation. This has the advantage that it actually fits perfectly on the netbooks SDD.</p>
maze solverhttp://blog.marc-seeger.de/2009/12/30/maze_solver2009-12-302009-12-30Marc Seeger<p>Just submitted my solution to the <a href="http://rubylearning.com/blog/2009/12/27/rpcfn-mazes-5/">Ruby programming challenge for newbies #5</a></p>
<p>put the mouse over the image to see the result :)
<notextile></p>
<script>
img1On = new Image;
img1On.src = "http://blog.marc-seeger.de/assets/2009/12/30/mazerun.gif";
img1Off = new Image;
img1Off.src = "http://blog.marc-seeger.de/assets/2009/12/30/terminal.png";
function swapImgs(img, imgSet) {
//change the image source to the rollover image
eval("document.images['"+img+"'].src ="+img+imgSet+".src");
}
</script>
<p></notextile>
<a href="http://blog.marc-seeger.de/assets/2009/12/30/mazerun.gif"><img src="http://blog.marc-seeger.de/assets/2009/12/30/terminal.png" name="img1" height=320 width=512 onMouseOver="swapImgs('img1','On');"
onMouseOut="swapImgs('img1','Off');" /></a></p>
<p>Just submitted my solution to the <a href="http://rubylearning.com/blog/2009/12/27/rpcfn-mazes-5/">Ruby programming challenge for newbies #5</a></p>
<p>put the mouse over the image to see the result :)
<notextile></p>
<script>
img1On = new Image;
img1On.src = "http://blog.marc-seeger.de/assets/2009/12/30/mazerun.gif";
img1Off = new Image;
img1Off.src = "http://blog.marc-seeger.de/assets/2009/12/30/terminal.png";
function swapImgs(img, imgSet) {
//change the image source to the rollover image
eval("document.images['"+img+"'].src ="+img+imgSet+".src");
}
</script>
<p></notextile>
<a href="http://blog.marc-seeger.de/assets/2009/12/30/mazerun.gif"><img src="http://blog.marc-seeger.de/assets/2009/12/30/terminal.png" name="img1" height=320 width=512 onMouseOver="swapImgs('img1','On');"
onMouseOut="swapImgs('img1','Off');" /></a></p>
Setting up prosody to authenticate against LDAPhttp://blog.marc-seeger.de/2009/12/30/Setting_up_prosody_to_authenticate_against_LDAP2009-12-302009-12-30Marc Seeger<p>A few years ago, I set up a <a href="http://messi.mi.hdm-stuttgart.de">Jabber server</a> at my <a href="http://www.hdm-stuttgart.de">university</a>. It worked pretty fine in the beginning, but a lack of updates and a horrible java-overengineering led to the point where the server needed 400 MB of RAM and didn't even consider talking to LDAP anymore.</p>
<p>Since I had no intention of setting up <a href="http://www.igniterealtime.org/projects/openfire/">openfire</a> again, I decided to look for other tools.</p>
<p>There is <a href="http://www.ejabberd.im/">ejabberd</a>, but since I can barely read erlang, let alone write, I decided that I don't really want to deal with ejabberd :)</p>
<p>There also is <a href="http://www.tigase.org/">Tigase</a>, an open-source java based xmpp-server.
Since I had bad experience setting up the whole java-enironment, I'd rather not try it again. There also is no support for authenticating against LDAP with Tigase at the time of writing.</p>
<p>The next contestant was <a href="http://www.prosody.im/">Prosody</a>. By simple looking at the website, you see the difference. Where as Tigase and ejabberd are basically a huge, ugly wall of text, prosody is a clean and simple lightweight design.</p>
<p>Prosody is written in Lua. While lua wasn't all thaaat slow to begin with (for a scripting language), since <a href="http://luajit.org/">luajit</a> came up, it is only arround 2 times slower than C, according to the <a href="http://shootout.alioth.debian.org/u32/benchmark.php?test=all&#12296;=all&d=data&calc=calculate&gpp=on&java=on&luajit=on&v8=on&lua=on&tracemonkey=on&box=1">benchmarks</a>.</p>
<p>My problem with prosody in the past was the missing LDAP authentication feature. It wouldn't have been all that hard to implement it for somebody that actually knew lua, but I decided that I have other things to do at the moment. This is why <a href="http://github.com/bjc/prosody/commit/c5cfbd9496c392a8963ab37f5e788a6be2fe5806">this commit</a> cought my eye:</p>
<blockquote>first working version with Cyrus SASL support.</blockquote>
<p>To quote from the <a href="http://asg.web.cmu.edu/sasl/">?official website?</a>:</p>
<blockquote>SASL is the Simple Authentication and Security Layer, a method for adding authentication support to connection-based protocols.</blockquote>
<p></p>
<p>Cyrus SASL is a matching library. Here is a quote from its <a href="http://freshmeat.net/projects/cyrussasl">freshmeat page</a>:</p>
<blockquote>The Cyrus SASL library is a generic library for easy integration of secure network authentication to any client or server application. It supports authentication via standard plaintext methods as well as CRAM-MD5 and DIGEST-MD5 shared secret methods and KERBEROS_V4 and GSSAPI Kerberos methods. The SASL protocol framework is used by SMTP, IMAP, ACAP, LDAP, and other standard protocols.</blockquote>
<p>Prosidy uses <a href="http://github.com/JorjBauer/lua-cyrussasl">lua-cyrussasl</a> (which basically can't be found using google) to communicate with the library.</p>
<p><strong>Getting sasl to run and auth against LDAP</strong></p>
<p>While I don't remember everything I installed, here are some packages that seem appropriate:</p>
<p>cyrus-sasl-2.1.22-5.el5<br/>
cyrus-sasl-plain-2.1.22-5.el5<br/>
cyrus-sasl-lib-2.1.22-5.el5<br/>
cyrus-sasl-devel-2.1.22-5.el5<br/>
cyrus-sasl-md5-2.1.22-5.el5<br/>
cyrus-sasl-ldap-2.1.22-5.el5<br/>
cyrus-sasl-ntlm-2.1.22-5.el5</p>
<p>This will also install programs such as "testsaslauthd", "sasl2-sample-client", "sasl2-sample-server", "sasl2-shared-mechlist" and "sasl2-static-mechlist". They are very useful to see if your configuration is actually ok.</p>
<p>Now, set up your /etc/saslauthd.conf:</p>
<pre><code># cat /etc/saslauthd.conf
ldap_servers: ldap://ldap1.example.org
ldap_search_base: ou=userlist,dc=example,dc=org
</code></pre>
<p>After this (and maybe a /etc/init.d/saslauthd restart), the testsaslauthd command should work:</p>
<pre><code># testsaslauthd -u existing_user -p thepassword
0: OK "Success."
# testsaslauthd -u blabla -p narf
0: NO "authentication failed"
</code></pre>
<p>This just set up the connection info for the saslauth daemon. To be able to auth against this, you'll need to set up a matching service.<br/>
This is basically just a config file that tells the cyrus-sasl library which service to auth against. For this, you'll have to set up your /usr/lib64/sasl2/xmpp.conf (or /etc/sasl2/xmpp.conf )</p>
<pre><code># cat /usr/lib64/sasl2/xmpp.conf
pwcheck_method: saslauthd
mech_list: PLAIN
</code></pre>
<p>This means that the service called "xmpp" (from the filename) only accepts plain passwords and uses the saslauth daemon to check them.</p>
<p>Check if this works by starting the sample server:</p>
<pre><code># sasl2-sample-server -s "xmpp" -m "PLAIN"
trying 10, 1, 6
trying 2, 1, 6
bind: Address already in use
</code></pre>
<p>and connect to it using the sample client (probably in another terminal session):</p>
<pre><code># sasl2-sample-client -s "xmpp" -m "PLAIN" localhost
receiving capability list... recv: {5}
PLAIN
PLAIN
please enter an authentication id:
please enter an authorization id: YOURUSERID
Password: YOURPASSWORD
send: {5}
PLAIN
send: {1}
Y
send: {22}
youruserid[0]youruserid[0]yourpassword
successful authentication
closing connection
</code></pre>
<p>So far so good. You've set up a proper saslauthd and configured a service called xmpp.</p>
<p>Now:<br/>
<strong>Getting Prosody</strong><br/>
There are <a href="http://www.prosody.im/download/start">installers/packages available</a> for Debian/Ubuntu, Windows, Arch Linux, FreeBSD and Windows. The problem is that, at the time of writing, the sasl support hasn't made it into a stable build yet. That's why I decided to go for the current development version. I simply checked out the git mirror of their official repository (didn't have hg installed):</p>
<pre><code>git clone http://github.com/bjc/prosody.git</code></pre>
<p>As for other libraries, those are the ones:<br/>
liblua5.1, libssl (OpenSSL), libidn11</p>
<p>And the lua stuff you need (as far as I can remember):<br/>
lua-luasocket, lua-luasec, lua-expat, lua-cyrussasl (see above), lua-filesystem</p>
<p>You can get the them using your distributions package manager, luarocks (for the lua stuff) or download and compile them yourself.</p>
<p>After everything is installed, just do the usual:</p>
<pre><code>./configure --ostype=linux <-- can be "debian" or "macosx" too
make
make install</code></pre>
<p><strong>Configuring Prosody</strong><br/>
In my case, the config file was copied to "/usr/local/etc/prosody/prosody.cfg.lua". After you configured the usual stuff (hostname, TLS/SSL, admins, ...) you have to put in the config option for the cyrus support to use the proper service to auth against:</p>
<pre><code>cyrus_service_name = "xmpp"</code></pre>
<p>Currently, there also is a problam that should be fixed within a couple of days:
In the file /util/sasl_cyrus.lua, you have to edit line 34.</p>
<pre><code>pcall(cyrussasl.server_init, "prosody")</code></pre>
<p>the "prosody" string has to have the name of your service (e.g. xmpp) for it to work.</p>
<p>This should allow prosody to authenticate against LDAP using cyrus-sasl.<br/>
Have fun :)</p>
<p><strong>Update</strong> fresh from the prosody chatroom:</p>
<pre>
(11:35:35 PM) darkrain: One minor thing, is that with the release of 0.7, you'll need to put sasl_backend="cyrus" in the config file
(11:35:41 PM) darkrain: and the default value of cyrus_service_name is "xmpp"
(11:35:54 PM) darkrain: (and the pcall thing has been fixed)
(11:36:01 PM) darkrain: s/One/three/
</pre>
<p>A few years ago, I set up a <a href="http://messi.mi.hdm-stuttgart.de">Jabber server</a> at my <a href="http://www.hdm-stuttgart.de">university</a>. It worked pretty fine in the beginning, but a lack of updates and a horrible java-overengineering led to the point where the server needed 400 MB of RAM and didn't even consider talking to LDAP anymore.</p>
<p>Since I had no intention of setting up <a href="http://www.igniterealtime.org/projects/openfire/">openfire</a> again, I decided to look for other tools.</p>
<p>There is <a href="http://www.ejabberd.im/">ejabberd</a>, but since I can barely read erlang, let alone write, I decided that I don't really want to deal with ejabberd :)</p>
<p>There also is <a href="http://www.tigase.org/">Tigase</a>, an open-source java based xmpp-server.
Since I had bad experience setting up the whole java-enironment, I'd rather not try it again. There also is no support for authenticating against LDAP with Tigase at the time of writing.</p>
<p>The next contestant was <a href="http://www.prosody.im/">Prosody</a>. By simple looking at the website, you see the difference. Where as Tigase and ejabberd are basically a huge, ugly wall of text, prosody is a clean and simple lightweight design.</p>
<p>Prosody is written in Lua. While lua wasn't all thaaat slow to begin with (for a scripting language), since <a href="http://luajit.org/">luajit</a> came up, it is only arround 2 times slower than C, according to the <a href="http://shootout.alioth.debian.org/u32/benchmark.php?test=all&#12296;=all&d=data&calc=calculate&gpp=on&java=on&luajit=on&v8=on&lua=on&tracemonkey=on&box=1">benchmarks</a>.</p>
<p>My problem with prosody in the past was the missing LDAP authentication feature. It wouldn't have been all that hard to implement it for somebody that actually knew lua, but I decided that I have other things to do at the moment. This is why <a href="http://github.com/bjc/prosody/commit/c5cfbd9496c392a8963ab37f5e788a6be2fe5806">this commit</a> cought my eye:</p>
<blockquote>first working version with Cyrus SASL support.</blockquote>
<p>To quote from the <a href="http://asg.web.cmu.edu/sasl/">?official website?</a>:</p>
<blockquote>SASL is the Simple Authentication and Security Layer, a method for adding authentication support to connection-based protocols.</blockquote>
<p></p>
<p>Cyrus SASL is a matching library. Here is a quote from its <a href="http://freshmeat.net/projects/cyrussasl">freshmeat page</a>:</p>
<blockquote>The Cyrus SASL library is a generic library for easy integration of secure network authentication to any client or server application. It supports authentication via standard plaintext methods as well as CRAM-MD5 and DIGEST-MD5 shared secret methods and KERBEROS_V4 and GSSAPI Kerberos methods. The SASL protocol framework is used by SMTP, IMAP, ACAP, LDAP, and other standard protocols.</blockquote>
<p>Prosidy uses <a href="http://github.com/JorjBauer/lua-cyrussasl">lua-cyrussasl</a> (which basically can't be found using google) to communicate with the library.</p>
<p><strong>Getting sasl to run and auth against LDAP</strong></p>
<p>While I don't remember everything I installed, here are some packages that seem appropriate:</p>
<p>cyrus-sasl-2.1.22-5.el5<br/>
cyrus-sasl-plain-2.1.22-5.el5<br/>
cyrus-sasl-lib-2.1.22-5.el5<br/>
cyrus-sasl-devel-2.1.22-5.el5<br/>
cyrus-sasl-md5-2.1.22-5.el5<br/>
cyrus-sasl-ldap-2.1.22-5.el5<br/>
cyrus-sasl-ntlm-2.1.22-5.el5</p>
<p>This will also install programs such as "testsaslauthd", "sasl2-sample-client", "sasl2-sample-server", "sasl2-shared-mechlist" and "sasl2-static-mechlist". They are very useful to see if your configuration is actually ok.</p>
<p>Now, set up your /etc/saslauthd.conf:</p>
<pre><code># cat /etc/saslauthd.conf
ldap_servers: ldap://ldap1.example.org
ldap_search_base: ou=userlist,dc=example,dc=org
</code></pre>
<p>After this (and maybe a /etc/init.d/saslauthd restart), the testsaslauthd command should work:</p>
<pre><code># testsaslauthd -u existing_user -p thepassword
0: OK "Success."
# testsaslauthd -u blabla -p narf
0: NO "authentication failed"
</code></pre>
<p>This just set up the connection info for the saslauth daemon. To be able to auth against this, you'll need to set up a matching service.<br/>
This is basically just a config file that tells the cyrus-sasl library which service to auth against. For this, you'll have to set up your /usr/lib64/sasl2/xmpp.conf (or /etc/sasl2/xmpp.conf )</p>
<pre><code># cat /usr/lib64/sasl2/xmpp.conf
pwcheck_method: saslauthd
mech_list: PLAIN
</code></pre>
<p>This means that the service called "xmpp" (from the filename) only accepts plain passwords and uses the saslauth daemon to check them.</p>
<p>Check if this works by starting the sample server:</p>
<pre><code># sasl2-sample-server -s "xmpp" -m "PLAIN"
trying 10, 1, 6
trying 2, 1, 6
bind: Address already in use
</code></pre>
<p>and connect to it using the sample client (probably in another terminal session):</p>
<pre><code># sasl2-sample-client -s "xmpp" -m "PLAIN" localhost
receiving capability list... recv: {5}
PLAIN
PLAIN
please enter an authentication id:
please enter an authorization id: YOURUSERID
Password: YOURPASSWORD
send: {5}
PLAIN
send: {1}
Y
send: {22}
youruserid[0]youruserid[0]yourpassword
successful authentication
closing connection
</code></pre>
<p>So far so good. You've set up a proper saslauthd and configured a service called xmpp.</p>
<p>Now:<br/>
<strong>Getting Prosody</strong><br/>
There are <a href="http://www.prosody.im/download/start">installers/packages available</a> for Debian/Ubuntu, Windows, Arch Linux, FreeBSD and Windows. The problem is that, at the time of writing, the sasl support hasn't made it into a stable build yet. That's why I decided to go for the current development version. I simply checked out the git mirror of their official repository (didn't have hg installed):</p>
<pre><code>git clone http://github.com/bjc/prosody.git</code></pre>
<p>As for other libraries, those are the ones:<br/>
liblua5.1, libssl (OpenSSL), libidn11</p>
<p>And the lua stuff you need (as far as I can remember):<br/>
lua-luasocket, lua-luasec, lua-expat, lua-cyrussasl (see above), lua-filesystem</p>
<p>You can get the them using your distributions package manager, luarocks (for the lua stuff) or download and compile them yourself.</p>
<p>After everything is installed, just do the usual:</p>
<pre><code>./configure --ostype=linux <-- can be "debian" or "macosx" too
make
make install</code></pre>
<p><strong>Configuring Prosody</strong><br/>
In my case, the config file was copied to "/usr/local/etc/prosody/prosody.cfg.lua". After you configured the usual stuff (hostname, TLS/SSL, admins, ...) you have to put in the config option for the cyrus support to use the proper service to auth against:</p>
<pre><code>cyrus_service_name = "xmpp"</code></pre>
<p>Currently, there also is a problam that should be fixed within a couple of days:
In the file /util/sasl_cyrus.lua, you have to edit line 34.</p>
<pre><code>pcall(cyrussasl.server_init, "prosody")</code></pre>
<p>the "prosody" string has to have the name of your service (e.g. xmpp) for it to work.</p>
<p>This should allow prosody to authenticate against LDAP using cyrus-sasl.<br/>
Have fun :)</p>
<p><strong>Update</strong> fresh from the prosody chatroom:</p>
<pre>
(11:35:35 PM) darkrain: One minor thing, is that with the release of 0.7, you'll need to put sasl_backend="cyrus" in the config file
(11:35:41 PM) darkrain: and the default value of cyrus_service_name is "xmpp"
(11:35:54 PM) darkrain: (and the pcall thing has been fixed)
(11:36:01 PM) darkrain: s/One/three/
</pre>
Online backup and sync with SpiderOakhttp://blog.marc-seeger.de/2009/12/24/Online_backup_and_sync_with_SpiderOak2009-12-242009-12-24Marc Seeger<p>I decided that, while my old rsync/unison backup solution was working fine, I needed something else.<br/>
I recently got a netbook and wanted to be able to keep my documents between my laptop and the netbook in sync.<br/>
While rsync/unison worked ok, there were some encoding errors in filenames and the "manual" start of the backup always felt kinda strange.<br/>
I already had <a href="https://www.dropbox.com/referrals/NTI1ODg5ODc5">dropbox (ref link)</a> on my laptop and was pretty happy with it. It worked fine but the space is limited and the pro account was too expensive for my taste. I also didn't want to store my files unencrypted in the cloud.</p>
<p>While dropbox offers a <a href="http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall">headless install</a> for e.g. my v-server, it is pretty annoying that dropbox only has ONE folder that it is able to backup and this folder also always syncs completely.<br/>
<img alt="spideroak logo" src="http://blog.marc-seeger.de/assets/2009/12/24/spideroak_logo.png"/></p>
<p>I then stumbled upon <a href="https://spideroak.com/download/referral/5b409d8e792fdf57875fb58f23e7c260">Spideroak (ref link)</a>. The SpiderOak team immediately appeald to my nerdy side by having an <a href="https://spideroak.com/engineering_matters">engineering matters</a> section on their site, complete with crypto details (2048 byte RSA and 256 bit AES, using a key created by the key derivation/strengthening algorithm pdkdf2 (using sha256), with 16384 rounds, and 32 bytes of salt).<br/>
The service is completely cross platform (I'm currently running it on Ubuntu 9.10 x86_64, 9.04 x86 server and 32bit Windows 7).<br/>
The allow people to select which folders they want to backup and which of those they want to sync with other computers.<br/>
They offer a commandline mode which has a whole bunch of options:</p>
<pre><code>
# SpiderOak --help
Usage: SpiderOak basic command line usage:
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-v, --verbose be verbose: show detailed status information as it
happens
-d NUMBER, --device=NUMBER
operate on specified device id (default is the local
device)
-o DIR, --output=DIR Target dir to restore items to (default is normal
download dir)
--enable-schedule honor the set activity schedule, even in batchmode
(normally the schedule is ignored in batchmode)
--disable-schedule disable activity scheduling
Operational Modes and Commands:
--backup=TARGET ad hoc operation: backup whatever exists at TARGET in
the filesystem and exit (ignores existing backup
selection.)
--restore=item Restore a folder, file, or version.
Run "--restore help" for more info
--headless run in headless mode (without the graphical interface)
--batchmode like headless, but will exit when all available work
is done
--sync like batchmode, but only backup/update synced folders
--scan, --scan-only
scan the filesystem for changes and report a summary
--build, --scan-and-build-only
scan the filesystem, and build all possible file
system changes as shelved upload transactions, and
exit without uploading them
--merge merge and restore the contents of multiple paths from
arbitrary devices: dev1:path1 .. devN:pathN
--purge=item purge a folder, file (including historical versions)
Information Commands:
--userinfo, --user-info
Show user and device info
--space Show space usage information by category and by device
--tree Show the hierarchy of stored backup folders
--tree-changelog Show a log of how the hierarchy of stored backup
folders has changed over time
--journal-changelog=folder_or_journal
Show the changelog of a given folder
--shelved-x, --print-shelved-x
Show information about each shelved upload transaction
--fulllist Show all folders and files stored on device
Backup Selection Manipulation Commands:
--selection, --print-selection
Show a list of selected and excluded backup items
--reset-selection Reset selection (but preserve excluded files)
--exclude-file=EXCLUDE_FILE
Exclude the given file from the selection
--exclude-dir=EXCLUDE_DIR
Exclude the given directory from the selection
--include-dir=INCLUDE_DIR
Include the given directory in the selection
--force Do in/exclusion even if the path doesn't exist
Maintenance Commands:
--vacuum Vacuum SpiderOak's local database (rebuilds indexs and
reclaims local disk space)
--destroy-shelved-x
destroy each shelved upload transaction already in
progress.
--repair repair a local SpiderOak installation
--rebuild-reference-database
rebuild the SpiderOak reference database (can take
awhile)
--billing print a secure web auto-login URL for billing info
Dangerous/Support Commands:
Caution: Do not use these commands unless advised by SpiderOak
support. They can damage your installation if used improperly.
--empty-garbage-bin
purge all deleted items on the current device
--apply-subscription-xact
apply all transactions previously received from remote
devices -- (not intended for general use -- this
normally happens automatically)
Account Commands:
--bootstrap=ACCOUNT_DEFINITION_FILE
Read a json definition file and use contents to create
a new account
</code></pre>
<p></p>
<p>There is a lot of <a href="https://spideroak.com/howitworks">tutorials </a> and a <a href="https://spideroak.com/faq">faq</a> that also answers technical questions.<br/>
The best thing: thanks to an <a href="https://spideroak.com/education">education discount</a> (you can ask me for the voucher code if you don't have an .edu email address from your university), I only pay 5 usd/month for 100 GB of backup space!</p>
<p>To install it on a headless webserver, just download the regular installer package for your distribution and launch spideroak one time using x-forwarding:</p>
<ol>
<li>be sure you've got the "xauth" package installed</li>
<li>ssh -X your.server.com</li>
<li>/usr/bin/SpiderOak</li>
<li>set up what you want to</li>
<li>finally, add this entry to your crontab:
<blockquote><p>@reboot /usr/bin/SpiderOak --headless &</p></blockquote></li>
</ol>
<p>This will start SpiderOak on every reboot and backup files according to your wishes.<br/>
Some other random facts about SpiderOak:</p>
<ul>
<li>you can select an ftp/sftp where spideroak should store a copy of the encrypted blocks. this can e.g. be a local NAS. This will speed up restore procedures (I don't use it, but nice to have)</li>
<li>spideroak allows to share files over the web, including picture galleries (all of that password protected)</li>
<li>you can stop uploads and resume them</li>
</ul>
<p>I decided that, while my old rsync/unison backup solution was working fine, I needed something else.<br/>
I recently got a netbook and wanted to be able to keep my documents between my laptop and the netbook in sync.<br/>
While rsync/unison worked ok, there were some encoding errors in filenames and the "manual" start of the backup always felt kinda strange.<br/>
I already had <a href="https://www.dropbox.com/referrals/NTI1ODg5ODc5">dropbox (ref link)</a> on my laptop and was pretty happy with it. It worked fine but the space is limited and the pro account was too expensive for my taste. I also didn't want to store my files unencrypted in the cloud.</p>
<p>While dropbox offers a <a href="http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall">headless install</a> for e.g. my v-server, it is pretty annoying that dropbox only has ONE folder that it is able to backup and this folder also always syncs completely.<br/>
<img alt="spideroak logo" src="http://blog.marc-seeger.de/assets/2009/12/24/spideroak_logo.png"/></p>
<p>I then stumbled upon <a href="https://spideroak.com/download/referral/5b409d8e792fdf57875fb58f23e7c260">Spideroak (ref link)</a>. The SpiderOak team immediately appeald to my nerdy side by having an <a href="https://spideroak.com/engineering_matters">engineering matters</a> section on their site, complete with crypto details (2048 byte RSA and 256 bit AES, using a key created by the key derivation/strengthening algorithm pdkdf2 (using sha256), with 16384 rounds, and 32 bytes of salt).<br/>
The service is completely cross platform (I'm currently running it on Ubuntu 9.10 x86_64, 9.04 x86 server and 32bit Windows 7).<br/>
The allow people to select which folders they want to backup and which of those they want to sync with other computers.<br/>
They offer a commandline mode which has a whole bunch of options:</p>
<pre><code>
# SpiderOak --help
Usage: SpiderOak basic command line usage:
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-v, --verbose be verbose: show detailed status information as it
happens
-d NUMBER, --device=NUMBER
operate on specified device id (default is the local
device)
-o DIR, --output=DIR Target dir to restore items to (default is normal
download dir)
--enable-schedule honor the set activity schedule, even in batchmode
(normally the schedule is ignored in batchmode)
--disable-schedule disable activity scheduling
Operational Modes and Commands:
--backup=TARGET ad hoc operation: backup whatever exists at TARGET in
the filesystem and exit (ignores existing backup
selection.)
--restore=item Restore a folder, file, or version.
Run "--restore help" for more info
--headless run in headless mode (without the graphical interface)
--batchmode like headless, but will exit when all available work
is done
--sync like batchmode, but only backup/update synced folders
--scan, --scan-only
scan the filesystem for changes and report a summary
--build, --scan-and-build-only
scan the filesystem, and build all possible file
system changes as shelved upload transactions, and
exit without uploading them
--merge merge and restore the contents of multiple paths from
arbitrary devices: dev1:path1 .. devN:pathN
--purge=item purge a folder, file (including historical versions)
Information Commands:
--userinfo, --user-info
Show user and device info
--space Show space usage information by category and by device
--tree Show the hierarchy of stored backup folders
--tree-changelog Show a log of how the hierarchy of stored backup
folders has changed over time
--journal-changelog=folder_or_journal
Show the changelog of a given folder
--shelved-x, --print-shelved-x
Show information about each shelved upload transaction
--fulllist Show all folders and files stored on device
Backup Selection Manipulation Commands:
--selection, --print-selection
Show a list of selected and excluded backup items
--reset-selection Reset selection (but preserve excluded files)
--exclude-file=EXCLUDE_FILE
Exclude the given file from the selection
--exclude-dir=EXCLUDE_DIR
Exclude the given directory from the selection
--include-dir=INCLUDE_DIR
Include the given directory in the selection
--force Do in/exclusion even if the path doesn't exist
Maintenance Commands:
--vacuum Vacuum SpiderOak's local database (rebuilds indexs and
reclaims local disk space)
--destroy-shelved-x
destroy each shelved upload transaction already in
progress.
--repair repair a local SpiderOak installation
--rebuild-reference-database
rebuild the SpiderOak reference database (can take
awhile)
--billing print a secure web auto-login URL for billing info
Dangerous/Support Commands:
Caution: Do not use these commands unless advised by SpiderOak
support. They can damage your installation if used improperly.
--empty-garbage-bin
purge all deleted items on the current device
--apply-subscription-xact
apply all transactions previously received from remote
devices -- (not intended for general use -- this
normally happens automatically)
Account Commands:
--bootstrap=ACCOUNT_DEFINITION_FILE
Read a json definition file and use contents to create
a new account
</code></pre>
<p></p>
<p>There is a lot of <a href="https://spideroak.com/howitworks">tutorials </a> and a <a href="https://spideroak.com/faq">faq</a> that also answers technical questions.<br/>
The best thing: thanks to an <a href="https://spideroak.com/education">education discount</a> (you can ask me for the voucher code if you don't have an .edu email address from your university), I only pay 5 usd/month for 100 GB of backup space!</p>
<p>To install it on a headless webserver, just download the regular installer package for your distribution and launch spideroak one time using x-forwarding:</p>
<ol>
<li>be sure you've got the "xauth" package installed</li>
<li>ssh -X your.server.com</li>
<li>/usr/bin/SpiderOak</li>
<li>set up what you want to</li>
<li>finally, add this entry to your crontab:
<blockquote><p>@reboot /usr/bin/SpiderOak --headless &</p></blockquote></li>
</ol>
<p>This will start SpiderOak on every reboot and backup files according to your wishes.<br/>
Some other random facts about SpiderOak:</p>
<ul>
<li>you can select an ftp/sftp where spideroak should store a copy of the encrypted blocks. this can e.g. be a local NAS. This will speed up restore procedures (I don't use it, but nice to have)</li>
<li>spideroak allows to share files over the web, including picture galleries (all of that password protected)</li>
<li>you can stop uploads and resume them</li>
</ul>
Migrated to MongoDBhttp://blog.marc-seeger.de/2009/12/22/Migrated_to_MongoDB2009-12-222009-12-22Marc Seeger<p>I decided to procrastinate the hell out of this evening.<br/>
I spent the last 5 hours to completely rewriting the backend of my blogging-engine.<br/>
It used to be: <a href="http://code.google.com/p/redis/">redis</a><br/>
It now is: <a href="http://www.mongodb.org/">mongoDB</a></p>
<p>I saved TONS of code and have a really simple data-schema now :)<br/>
On the downside: the code is really unoptimized at the moment and basically uses a "brute force" approach to a lot of things.</p>
<p>Comparing the two, I have to say:<br/>
redis is simpler<br/>
MongoDB has awesome query options and is a bit better suited if I ever want to put other stuff on there (which I will!).</p>
<p>I decided to procrastinate the hell out of this evening.<br/>
I spent the last 5 hours to completely rewriting the backend of my blogging-engine.<br/>
It used to be: <a href="http://code.google.com/p/redis/">redis</a><br/>
It now is: <a href="http://www.mongodb.org/">mongoDB</a></p>
<p>I saved TONS of code and have a really simple data-schema now :)<br/>
On the downside: the code is really unoptimized at the moment and basically uses a "brute force" approach to a lot of things.</p>
<p>Comparing the two, I have to say:<br/>
redis is simpler<br/>
MongoDB has awesome query options and is a bit better suited if I ever want to put other stuff on there (which I will!).</p>
biometrische Passfotos selbstgemachthttp://blog.marc-seeger.de/2009/12/20/biometrische_passfotos_selbstgemacht2009-12-202009-12-20Marc Seeger<p>This one is in German as the whole "biometric german ID card" deal probably has a 99% German target audience :)</p>
<p>Ich kam unlängst in die Situation mir einen Reisepass ausstellen lassen zu müssen. Das Problem ist, dass man für diesen Pass nicht irgend ein beliebiges Passbild nehmen kann, sondern ein "biometrisches" benötigt.<br/>
Biometrisch bedeutet in diesem Fall, dass ein Computer mit schlecht geschriebener Software die Gesichtsmerkmale auch noch identifizieren kann.<br/>
Das hat zur Folge dass man auf einem biometrischen Passbild folgende Sachen machen sollte:</p>
<ul>
<li>Gerade in die Kamera schauen (nicht den Kopf schr√§g halten)</li>
<li>Neutraler Gesichtsausdruck (nicht L√§cheln)</li>
<li>Gut Ausgeleuchtetes Bild (keine riesen Schatten im Gesicht, nicht zu hell, nicht zu dunkel, keinen Farbstich)</li>
<li>Kontrastreicher, einfarbiger Hintergrund</li>
<li>Gesicht erkennbar (Keine Haare im Gesicht, nicht die Augen geschlossen, keine Mütze im Gesicht, keine Sonnenbrille)</li>
<li>...</li>
</ul>
<p>Genauere Hinweise mit Beispielen bekommt man bei der <a href="http://www.bundesdruckerei.de/de/service/service_buerger/buerger_persdok/persdok_epassMstr.html">Bundesdruckerei</a>.</p>
<p>Ich hatte keine besondere Lust mir einen Fotografen zu suchen und x Euro zu zahlen nur damit jemand eine Kamera bedient und 2 Minuten mit Photoshop (wenn überhaupt) spielt.<br/>
Glücklicherweise besitze ich eine Digitalkamera und bin über die Seite <a href="http://www.passbild-online.de/">passbild-online.de</a> gestoplert.</p>
<p>Lange rede kurzer Sinn:</p>
<ul>
<li>Selber vor ruhigem Hintergrund mit Digicam fotographiert</li>
<li>Bild in Gimp (oder einem anderen Programm eurer Wahl) halbwegs zurecht geschnitten (genaue Daten wären: Breite von 35 mm und Höhe von 45 mm bei Auflösung von 300 dpi)</li>
<li>Foto zu passbild-online.de hochgeladen</li>
<li>Überprüfen ob die Biometrischen Verhältnisse Stimmen:<br/>
<a href="http://blog.marc-seeger.de/assets/2009/12/20/passfoto01.png"><img src="http://blog.marc-seeger.de/assets/2009/12/20/passfoto01_thumb.png"/></a></li>
<li>Passbild auf entsprechendes Fotoformat vervielfachen lassen und speichern ("Speichern/Drucken 10x15"): <br/>
<a href="http://blog.marc-seeger.de/assets/2009/12/20/passfoto02.png"><img src="http://blog.marc-seeger.de/assets/2009/12/20/passfoto02_thumb.png"/></a></li>
<li>Zum Fotoservice eures Vertrauens gehen und Bild entwickeln lassen. Ich habe mich mal für den <a href="http://www.mediamarkt.de/online-bilderservice.php">Mediamarkt</a> entschieden.</li>
</ul>
<p>Durch die Abholung im lokalen Mediamarkt entstehen gigantische kosten von 8 cent für 8 Passbilder :)</p>
<p>This one is in German as the whole "biometric german ID card" deal probably has a 99% German target audience :)</p>
<p>Ich kam unlängst in die Situation mir einen Reisepass ausstellen lassen zu müssen. Das Problem ist, dass man für diesen Pass nicht irgend ein beliebiges Passbild nehmen kann, sondern ein "biometrisches" benötigt.<br/>
Biometrisch bedeutet in diesem Fall, dass ein Computer mit schlecht geschriebener Software die Gesichtsmerkmale auch noch identifizieren kann.<br/>
Das hat zur Folge dass man auf einem biometrischen Passbild folgende Sachen machen sollte:</p>
<ul>
<li>Gerade in die Kamera schauen (nicht den Kopf schr√§g halten)</li>
<li>Neutraler Gesichtsausdruck (nicht L√§cheln)</li>
<li>Gut Ausgeleuchtetes Bild (keine riesen Schatten im Gesicht, nicht zu hell, nicht zu dunkel, keinen Farbstich)</li>
<li>Kontrastreicher, einfarbiger Hintergrund</li>
<li>Gesicht erkennbar (Keine Haare im Gesicht, nicht die Augen geschlossen, keine Mütze im Gesicht, keine Sonnenbrille)</li>
<li>...</li>
</ul>
<p>Genauere Hinweise mit Beispielen bekommt man bei der <a href="http://www.bundesdruckerei.de/de/service/service_buerger/buerger_persdok/persdok_epassMstr.html">Bundesdruckerei</a>.</p>
<p>Ich hatte keine besondere Lust mir einen Fotografen zu suchen und x Euro zu zahlen nur damit jemand eine Kamera bedient und 2 Minuten mit Photoshop (wenn überhaupt) spielt.<br/>
Glücklicherweise besitze ich eine Digitalkamera und bin über die Seite <a href="http://www.passbild-online.de/">passbild-online.de</a> gestoplert.</p>
<p>Lange rede kurzer Sinn:</p>
<ul>
<li>Selber vor ruhigem Hintergrund mit Digicam fotographiert</li>
<li>Bild in Gimp (oder einem anderen Programm eurer Wahl) halbwegs zurecht geschnitten (genaue Daten wären: Breite von 35 mm und Höhe von 45 mm bei Auflösung von 300 dpi)</li>
<li>Foto zu passbild-online.de hochgeladen</li>
<li>Überprüfen ob die Biometrischen Verhältnisse Stimmen:<br/>
<a href="http://blog.marc-seeger.de/assets/2009/12/20/passfoto01.png"><img src="http://blog.marc-seeger.de/assets/2009/12/20/passfoto01_thumb.png"/></a></li>
<li>Passbild auf entsprechendes Fotoformat vervielfachen lassen und speichern ("Speichern/Drucken 10x15"): <br/>
<a href="http://blog.marc-seeger.de/assets/2009/12/20/passfoto02.png"><img src="http://blog.marc-seeger.de/assets/2009/12/20/passfoto02_thumb.png"/></a></li>
<li>Zum Fotoservice eures Vertrauens gehen und Bild entwickeln lassen. Ich habe mich mal für den <a href="http://www.mediamarkt.de/online-bilderservice.php">Mediamarkt</a> entschieden.</li>
</ul>
<p>Durch die Abholung im lokalen Mediamarkt entstehen gigantische kosten von 8 cent für 8 Passbilder :)</p>