<?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>Dominik Schürmann</title>
	<atom:link href="http://dominikschuermann.de/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://dominikschuermann.de</link>
	<description>Research, Android, Grails, Debian and more...</description>
	<lastBuildDate>Wed, 30 Nov 2011 13:02:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Remapping Caps Lock to Windows (Super) key</title>
		<link>http://dominikschuermann.de/index.php/2011/04/remapping-caps-lock-to-windows-super-key/</link>
		<comments>http://dominikschuermann.de/index.php/2011/04/remapping-caps-lock-to-windows-super-key/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 22:45:55 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=275</guid>
		<description><![CDATA[I was using xmodmap ~/.Xmodmap in my .Xsession to remap caps lock to the super key utilizing the following configuration in .Xmodmap: ! disable caps lock and map to super clear Lock remove lock = Caps_Lock add mod4 = Caps_Lock After some updates in Debian testing, this configuration did not work anymore. I found some information [...]]]></description>
			<content:encoded><![CDATA[<p>I was using <strong>xmodmap ~/.Xmodmap</strong> in my <strong>.Xsession</strong> to remap caps lock to the super key utilizing the following configuration in <strong>.Xmodmap</strong>:</p>

<div class="wp_codebox"><table><tr id="p2753"><td class="code" id="p275code3"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">!</span> disable caps lock and map to super
<span style="color: #c20cb9; font-weight: bold;">clear</span> Lock
remove lock = Caps_Lock
add mod4 = Caps_Lock</pre></td></tr></table></div>

<p>After some updates in Debian testing, this configuration did not work anymore.<br />
I found some information on <a href="http://lists.debian.org/debian-x/2011/04/msg00291.html">http://lists.debian.org/debian-x/2011/04/msg00291.html</a>.<a href="http://lists.debian.org/debian-x/2011/04/msg00291.html"><br />
</a></p>
<p>After reading <strong>/usr/share/X11/xkb/rules/base.lst</strong>, a working way seems to be using <strong>setxkbmap</strong> with the option <strong>caps:super</strong>:</p>

<div class="wp_codebox"><table><tr id="p2754"><td class="code" id="p275code4"><pre class="bash" style="font-family:monospace;">setxkbmap <span style="color: #660033;">-option</span> caps:super</pre></td></tr></table></div>

<p>At the moment I am too lazy to read the documentation on XKB, so I am using xmodmap for the remaining keymappings. The right way should involve some configuration files documented on <a href="http://madduck.net/docs/extending-xkb/">http://madduck.net/docs/extending-xkb/</a> and <a href="http://www.charvolant.org/~doug/xkb/">http://www.charvolant.org/~doug/xkb/</a></p>
<p>An introduction to the evolution of X.org can be found on <a href="http://wiki.debian.org/XStrikeForce/InputHotplugGuide">http://wiki.debian.org/XStrikeForce/InputHotplugGuide</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2011/04/remapping-caps-lock-to-windows-super-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gitweb with lighttpd on Debian 6 Squeeze</title>
		<link>http://dominikschuermann.de/index.php/2011/04/gitweb-with-lighttpd-on-debian-6-squeeze/</link>
		<comments>http://dominikschuermann.de/index.php/2011/04/gitweb-with-lighttpd-on-debian-6-squeeze/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 13:50:17 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=267</guid>
		<description><![CDATA[To get gitweb working with lighttpd on Debian 6 Squeeze, create a file in /etc/lighttpd/conf-available named 99-gitweb.conf with the following content: server.modules += &#40; &#34;mod_cgi&#34;, &#34;mod_setenv&#34;, &#41; &#160; # configuration for gitweb, ignore this url in 10-simple-vhost.conf $HTTP&#91;&#34;url&#34;&#93; =~ &#34;^/gitweb/&#34; &#123; server.document-root = &#34;/usr/share/&#34; server.indexfiles = &#40;&#34;index.cgi&#34;&#41; &#160; cgi.assign = &#40; &#34;.cgi&#34; =&#62; &#34;/usr/bin/perl&#34; &#41; [...]]]></description>
			<content:encoded><![CDATA[<p>To get gitweb working with lighttpd on Debian 6 Squeeze, create a file in <strong>/etc/lighttpd/conf-available</strong> named <strong>99-gitweb.conf</strong> with the following content:</p>

<div class="wp_codebox"><table><tr id="p2678"><td class="code" id="p267code8"><pre class="groovy" style="font-family:monospace;">server.<span style="color: #006600;">modules</span> <span style="color: #66cc66;">+=</span> <span style="color: #66cc66;">&#40;</span>
  <span style="color: #ff0000;">&quot;mod_cgi&quot;</span>,
  <span style="color: #ff0000;">&quot;mod_setenv&quot;</span>,
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># configuration for gitweb, ignore this url in 10-simple-vhost.conf</span>
$HTTP<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;url&quot;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">=</span>~ <span style="color: #ff0000;">&quot;^/gitweb/&quot;</span> <span style="color: #66cc66;">&#123;</span>
  server.<span style="color: #006600;">document</span><span style="color: #66cc66;">-</span>root <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;/usr/share/&quot;</span>
  server.<span style="color: #006600;">indexfiles</span> <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;index.cgi&quot;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
  cgi.<span style="color: #006600;">assign</span> <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;.cgi&quot;</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">&quot;/usr/bin/perl&quot;</span> <span style="color: #66cc66;">&#41;</span>
&nbsp;
  setenv.<span style="color: #006600;">add</span><span style="color: #66cc66;">-</span>environment <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>
    <span style="color: #ff0000;">&quot;GITWEB_CONFIG&quot;</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">&quot;/etc/gitweb.conf&quot;</span>,
  <span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>This maps <strong>/usr/share/gitweb/</strong> (this holds all relevant files for gitweb on Debian) to <strong>http://example.com/gitweb/</strong>.</p>
<p>Now enable the new configuration file with</p>

<div class="wp_codebox"><table><tr id="p2679"><td class="code" id="p267code9"><pre class="bash" style="font-family:monospace;">lighttpd-enable-mod gitweb</pre></td></tr></table></div>

<p>and reload lighttpd with</p>

<div class="wp_codebox"><table><tr id="p26710"><td class="code" id="p267code10"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>lighttpd force-reload</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2011/04/gitweb-with-lighttpd-on-debian-6-squeeze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing Restrictions like Printing from PDFs on Linux</title>
		<link>http://dominikschuermann.de/index.php/2011/03/removing-restrictions-like-printing-from-pdfs-in-linux/</link>
		<comments>http://dominikschuermann.de/index.php/2011/03/removing-restrictions-like-printing-from-pdfs-in-linux/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 21:42:42 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=254</guid>
		<description><![CDATA[Some PDF files are restricted in such a way that some PDF viewers do not allow to print, edit or extract parts of the PDF content. PDF viewers like Okular or Evince used on Linux are ignoring these restrictions, but Windows viewers like the Adobe Reader are obeying these limitations. In my case I wanted [...]]]></description>
			<content:encoded><![CDATA[<p>Some PDF files are restricted in such a way that some PDF viewers do not allow to print, edit or extract parts of the PDF content. PDF viewers like Okular or Evince used on Linux are ignoring these restrictions, but Windows viewers like the Adobe Reader are obeying these limitations. In my case I wanted to remove these restrictions fast using a command line tool.<br />
A handy tool named <a href="http://qpdf.sourceforge.net/">QPDF</a> comes to rescue to save the world from <a href="http://www.defectivebydesign.org/">evil DRM restrictions</a>.</p>
<ul>
<li>Install QPDF:

<div class="wp_codebox"><table><tr id="p25414"><td class="code" id="p254code14"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> qpdf</pre></td></tr></table></div>

</li>
<li>Remove restrictions:

<div class="wp_codebox"><table><tr id="p25415"><td class="code" id="p254code15"><pre class="bash" style="font-family:monospace;">qpdf <span style="color: #660033;">--decrypt</span> input.pdf output.pdf</pre></td></tr></table></div>

</li>
<li>To do this with many PDFs use the following one-liner:

<div class="wp_codebox"><table><tr id="p25416"><td class="code" id="p254code16"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">*</span>.pdf; <span style="color: #000000; font-weight: bold;">do</span> qpdf <span style="color: #660033;">--decrypt</span> <span style="color: #007800;">$file</span> <span style="color: #800000;">${file/.pdf/_rescued.pdf}</span>; <span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

</li>
</ul>
<p>You can check the DRM restrictions of the input and output PDFs using the free demo version of <a href="http://www.guapdf.com/">GuaPDF</a>, which is also available as a linux command line tool, but restricted to PDFs with a small file size.</p>
<p>Another option is to use <a href="http://freemypdf.com">http://freemypdf.com</a> to remove these restrictions using a web site just for this purpose. The downside is the slow uploading of every PDF and possible privacy implications when uploading a PDF to such a website.</p>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2011/03/removing-restrictions-like-printing-from-pdfs-in-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Syncing Android using SyncML with Funambol Client</title>
		<link>http://dominikschuermann.de/index.php/2011/01/syncing-android-using-syncml-with-funambol-client/</link>
		<comments>http://dominikschuermann.de/index.php/2011/01/syncing-android-using-syncml-with-funambol-client/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 23:46:44 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=241</guid>
		<description><![CDATA[I have tried to find alternatives to synchronizing with Google. The Sync-Standard should be open, standardized and usable with free software. These requirements exclude the use of MS Exchange ActiveSync because it is a proprietary protocol. The solution is SyncML with the Funambol client for Android. I am using the newest Debug-Release. Currently Memotoo is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dominikschuermann.de/wp-content/uploads/logo.png"><img class="alignleft size-full wp-image-246" style="margin: 1px 5px;" title="logo" src="http://dominikschuermann.de/wp-content/uploads/logo.png" alt="" width="47" height="47" /></a>I have tried to find alternatives to synchronizing with Google. The Sync-Standard should be open, standardized and usable with free software. These requirements exclude the use of <a href="https://secure.wikimedia.org/wikipedia/en/wiki/ActiveSync">MS Exchange ActiveSync</a> because it is a proprietary protocol.</p>
<p>The solution is <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Syncml">SyncML</a> with the Funambol client for Android. I am using the <a href="https://android-client.forge.funambol.org/servlets/ProjectDocumentList?folderID=81&amp;expandFolder=81&amp;folderID=0">newest Debug-Release</a>.</p>
<p>Currently <a href="https://www.memotoo.com/">Memotoo</a> is used as the server, but i am planning to write a simple python based server for private single users.</p>
<h3>Possible Problems and Solutions</h3>
<ul>
<li><strong>The first Calendar sync just stops/get canceled after a couple of minutes.</strong><br />
Go to Settings -&gt; Account &amp; sync and disable automatic sync and background data. This should help your sync to complete. Afterward you can re-enable auto sync/bg data. (Source: <a href="https://android-client.forge.funambol.org/ds/viewMessage.do?dsForumId=615&amp;dsMessageId=135686">https://android-client.forge.funambol.org</a>)</li>
<li><strong>I am getting &#8220;Generic error&#8221; message without content!</strong><br />
Your server software is not compatible with this client. Use the Debug-Release with the &#8220;eGroupware-fix&#8221;.</li>
<li><strong>I want to sync Tasks with Android!</strong><br />
Install &#8220;Astrid&#8221; from the Android Market and restart your phone. Now the button &#8220;Tasks&#8221; is available in the Funambol Sync application and syncing tasks can be done with Astrid as the frontend.<br />
<strong>Update:</strong> It is important to use the Debug-Release, where the Description says: &#8220;&#8230; with tasks, notes &#8230;&#8221;</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2011/01/syncing-android-using-syncml-with-funambol-client/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Freie LaTeX-Editoren</title>
		<link>http://dominikschuermann.de/index.php/2010/12/freie-latex-editoren/</link>
		<comments>http://dominikschuermann.de/index.php/2010/12/freie-latex-editoren/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 22:55:52 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=235</guid>
		<description><![CDATA[Es gibt ziemlich viele freie LaTeX-Editoren wie ich feststellen musste, deshalb folgt hiermit eine kleine Übersicht über die von mir getesteten Exemplare. Übersicht Kile Mein Favorit! Qt4 basierte Latex-IDE mit integriertem Kate-Editor, der On-the-fly-spellchecking unterstützt und VI-Mode. LaTeXila Ziemlich neue IDE. Versucht Kile in GTK nachzubauen. Leider kein On-the-fly-spellchecker. TeXworks Ziemlich neuer einfacher Editor. Unterstützt [...]]]></description>
			<content:encoded><![CDATA[<p>Es gibt ziemlich viele freie LaTeX-Editoren wie ich feststellen musste, deshalb folgt hiermit eine kleine Übersicht über die von mir getesteten Exemplare.</p>
<h3>Übersicht</h3>
<ul>
<li><a href="http://kile.sourceforge.net/">Kile</a><br />
Mein Favorit! Qt4 basierte Latex-IDE mit integriertem Kate-Editor, der On-the-fly-spellchecking unterstützt und VI-Mode.</li>
<li><a href="http://latexila.sourceforge.net/">LaTeXila</a><br />
Ziemlich neue IDE. Versucht Kile in GTK nachzubauen. Leider kein On-the-fly-spellchecker.</li>
<li><a href="http://www.tug.org/texworks/">TeXworks</a><br />
Ziemlich neuer einfacher Editor. Unterstützt parallele Ansicht der kompilierten PDF. Bei einem Klick auf einen Absatz in der PDF-Vorschau gelangt man zum dazugehörigen Teil im Quellcode. Enthält On-the-fly-spellchecker aber bis jetzt keine weiteren unterstützenden Eingabefunktionen für LaTeX.</li>
<li><a href="http://gummi.midnightcoding.org/">Gummi</a><br />
Auch ein sehr einfacher neuer Editor mit direkter Vorschau und On-the-fly-spellchecker.</li>
<li><a href="http://www.xm1math.net/texmaker/">Texmaker</a><br />
On-the-fly-spellchecker, Synchronisierte Vorschau wie TeXworks, sehr mächtig.</li>
<li><a href="http://texmakerx.sourceforge.net/">TexmakerX</a><br />
Fork von Texmaker, kommt aber nicht mehr so modern daher wie das Original Texmaker. Die Entwicklung scheint ein wenig stagniert.</li>
</ul>
<h3>Meine Einstellungen für Kile</h3>
<p>Einstellungen-&gt;Kile einrichten-&gt;Erstellen-&gt;PDFLatex<br />
Dann unter select auf NEU drücken. Name vergeben: z.B.: synctex<br />
und unter Optionen folgendes eintragen:</p>
<pre>-src-specials -interaction=nonstopmode -synctex=-1 '%source'</pre>
<p>Jetzt kann man auch mit Shift+Linksklick zum entsprechenden Sourcecode in Kile von Oklar aus springen.</p>
<p>Um das ganze noch direkt in Kile anzuzeigen kann man unter Einstellungen-&gt;Kile einrichten-&gt;Erstellen-&gt;ViewPDF auch den Embedded Viewer auswählen!</p>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2010/12/freie-latex-editoren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sicherer Kommunikationskanal durch lokale Umgebungsgeräusche</title>
		<link>http://dominikschuermann.de/index.php/2010/11/sicherer-kommunikationskanal-durch-lokale-umgebungsgerausche/</link>
		<comments>http://dominikschuermann.de/index.php/2010/11/sicherer-kommunikationskanal-durch-lokale-umgebungsgerausche/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 18:33:10 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=225</guid>
		<description><![CDATA[Nachdem ich nun endlich meine Bachelorarbeit abgeben und heute den Abschlussvortrag gehalten habe, hier nun ein kleiner Beitrag zu dem bearbeiteten Thema. Der Name meiner Bachelorarbeit ist &#8220;Nutzung von Kontextinformationen zur Herstellung eines sicheren Kommunikationskanals&#8221;. Die Bachelorarbeit behandelt die sichere Nachrichtenübermittlung zwischen drahtlos kommunizierenden Geräten über Umgebungsinformationen (Kontext). Der Nutzen von Umgebungsinformationen zur Herstellung einer [...]]]></description>
			<content:encoded><![CDATA[<p>Nachdem ich nun endlich meine Bachelorarbeit abgeben und heute den Abschlussvortrag gehalten habe, hier nun ein kleiner Beitrag zu dem bearbeiteten Thema.</p>
<p>Der Name meiner Bachelorarbeit ist &#8220;Nutzung von Kontextinformationen zur Herstellung eines sicheren Kommunikationskanals&#8221;.</p>
<p>Die Bachelorarbeit behandelt die sichere Nachrichtenübermittlung zwischen drahtlos kommunizierenden Geräten über Umgebungsinformationen (Kontext). Der Nutzen von Umgebungsinformationen zur Herstellung einer abgesicherten Kommunikation wird untersucht und beispielhaft implementiert. Durch das Nutzen zeitveränderlicher Eingangssignale zur Generierung eines geheimen Schlüssels zwischen Geräten ist es möglich, einen sicheren Kanal zwischen zwei Geräten mit gleichem Kontext ad hoc herzustellen. Somit entfällt die manuelle Verteilung eines geheimen Schlüssels auf den Endgeräten.</p>
<p>Mit Hilfe eines Audio-Fingerprinting-Verfahrens wird aus Audiodaten auf zwei räumlich benachbarten Geräten eine repräsentierende Bitsequenz generiert. Da aufgrund der räumlichen Nähe beider Geräte die Audiosequenzen und somit auch die erzeugten Bitfolgen ähnlich sind, werden diese Folgen als Basis für die Herstellung einer sicheren Kommunikation verwendet. Hierbei kommen spezielle Verfahren aus dem Bereich der Fuzzy Cryptography zum Einsatz, um trotz der Differenz zwischen den Bitfolgen einen sicheren Kommunikationskanal herzustellen.</p>
<p>Für alle Interessierten:<br />
Unter <a href="index.php/stuff/">Stuff</a> findet ihr die Bachelorarbeit und die dazugehörige Präsentation.</p>
<p>Anregungen und Diskussionen, die das behandelte Themengebiet betreffen, stehe ich offen gegenüber. Schreibt mir eine E-Mail oder hinterlasst einen Kommentar bei Detailfragen.</p>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2010/11/sicherer-kommunikationskanal-durch-lokale-umgebungsgerausche/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Grails with CAS and LDAP</title>
		<link>http://dominikschuermann.de/index.php/2010/11/using-grails-with-cas-and-ldap/</link>
		<comments>http://dominikschuermann.de/index.php/2010/11/using-grails-with-cas-and-ldap/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 23:25:53 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[University]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=214</guid>
		<description><![CDATA[This is a guide how to use Grails with CAS as the authentication server and LDAP as the backend user directory. It uses Spring Security Core and CAS Plugin in conjunction with the LDAP Plugin, that maps LDAP directories into Java classes. The ZIP-file contains the tutorial (PDF) and the sources. The config values in [...]]]></description>
			<content:encoded><![CDATA[<p>This is a guide how to use Grails with CAS as the authentication server and LDAP as the backend user directory. It uses Spring Security Core and CAS Plugin in conjunction with the LDAP Plugin, that maps LDAP directories into Java classes. The ZIP-file contains the tutorial (PDF) and the sources. The config values in the attached example should be replaced with config values that work in your environment, especially the server-URLs. The Source-Code is released under the LGPL license.</p>
<p>WARNING: It&#8217;s written very quick and dirty and only provides a simple example for CAS+LDAP authentication. It is not intended for production use, cause it likely contains security holes.</p>
<p><a href="http://dominikschuermann.de/wp-content/uploads/Grails-Workshop.zip">Grails Workshop (ZIP)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2010/11/using-grails-with-cas-and-ldap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Practices Bachelorarbeit</title>
		<link>http://dominikschuermann.de/index.php/2010/10/best-practices-wissenschaftliche-arbeit/</link>
		<comments>http://dominikschuermann.de/index.php/2010/10/best-practices-wissenschaftliche-arbeit/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 18:51:23 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[University]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=203</guid>
		<description><![CDATA[Hier eine Auflistung von Best Practices, die ich im Laufe der Bachelorarbeit aus dem Internet zusammengesucht habe. Einge Punkte werden durchaus unterschiedlich gesehen, bei genauerer Recherche finden sich aber eher die hier erwähnte Meinung. Viele der hier aufgeführten Erkentnisse finden sich in der Anleitung des KOMA-Scripts und weit verstreut übers Netz. Meine Arbeit habe ich [...]]]></description>
			<content:encoded><![CDATA[<p>Hier eine Auflistung von Best Practices, die ich im Laufe der Bachelorarbeit aus dem Internet zusammengesucht habe. Einge Punkte werden durchaus unterschiedlich gesehen, bei genauerer Recherche finden sich aber eher die hier erwähnte Meinung. Viele der hier aufgeführten Erkentnisse finden sich in der Anleitung des <a href="ftp://ftp.dante.de/pub/tex/macros/latex/contrib/koma-script/scrguide.pdf">KOMA-Scripts</a> und weit verstreut übers Netz.</p>
<p>Meine Arbeit habe ich mittels der KOMA-Klasse scrbook konzipiert, die ich wie folgt initialisiere:</p>

<div class="wp_codebox"><table><tr id="p20319"><td class="code" id="p203code19"><pre class="latex" style="font-family:monospace;"><span style="color: #2C922C; font-style: italic;">% Using KOMA class scrbook (fontsize=11pt is default)</span>
<span style="color: #E02020; ">\</span><a href="http://www.golatex.de/wiki/index.php?title=%5Cdocumentclass"><span style="color: #800000;">documentclass</span></a><span style="color: #E02020; ">[</span>
 a4paper,            <span style="color: #2C922C; font-style: italic;">% din A4</span>
 headsepline,        <span style="color: #2C922C; font-style: italic;">% heads with lines</span>
 twoside,            <span style="color: #2C922C; font-style: italic;">% two sided</span>
 BCOR=8mm,           <span style="color: #2C922C; font-style: italic;">% binde-correction, because of klebebindung</span>
 bibliography=totoc, <span style="color: #2C922C; font-style: italic;">% bibliography gets unnumbered entry</span>
 numbers=noendperiod <span style="color: #2C922C; font-style: italic;">% deactivate end dots in numbering, this is against Duden, but it would not be consistent with the amsthm theorem numbering :( (see KOMA docs about the Duden-way)</span>
<span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">scrbook</span><span style="color: #E02020; ">}</span></pre></td></tr></table></div>

<ul>
<li><strong>Wann kommt das Abbildungsverzeichnis und das Tabellenverzeichnis? Am Anfang der Arbeit oder im Anhang?<br />
</strong>Dem Inhaltsverzeichnis folgt das Abbildungsverzeichnis und danach das Tabellenverzeichnis. Diese werden nicht im Inhaltsverzeichnis aufgeführt, da sie keinen Inhalt der Arbeit darstellen und eben ein Verzeichnis wie das Inhaltsverzeichnis sind. Deshalb steht in meinem Header folgendes:</p>

<div class="wp_codebox"><table><tr id="p20320"><td class="code" id="p203code20"><pre class="latex" style="font-family:monospace;"><span style="color: #2C922C; font-style: italic;">% table of contents</span>
<span style="color: #E02020; ">\</span><a href="http://www.golatex.de/wiki/index.php?title=%5Ctableofcontents"><span style="color: #800000;">tableofcontents</span></a>
<span style="color: #800000; font-weight: normal;">\cleardoublepage</span>
&nbsp;
<span style="color: #2C922C; font-style: italic;">% list of figures</span>
<span style="color: #E02020; ">\</span><a href="http://www.golatex.de/wiki/index.php?title=%5Clistoffigures"><span style="color: #800000;">listoffigures</span></a>
<span style="color: #800000; font-weight: normal;">\cleardoublepage</span>
&nbsp;
<span style="color: #2C922C; font-style: italic;">% list of tables</span>
<span style="color: #E02020; ">\</span><a href="http://www.golatex.de/wiki/index.php?title=%5Clistoftables"><span style="color: #800000;">listoftables</span></a>
<span style="color: #800000; font-weight: normal;">\cleardoublepage</span></pre></td></tr></table></div>

</li>
<li><strong>Was ist mit dem Literaturverzeichnis? Soll es im Inhaltsverzeichnis auftauchen? Wird es mit durchnummeriert?</strong><br />
Also meine Präferenz hierzu ist es das Literaturverzeichnis mit im Inhaltsverzeichnis mit aufzuführen aber nicht mit durchzunummerieren. Die Begründung dazu wäre, dass das Literaturverzeichnis nur eine Zusammenstellung externer Arbeiten darstellt, die nicht zum eigentlichen Inhalt gehört und deshalb nicht mit im Inhaltsverzeichnis durchnummeriert wird. Es, wie es die Standardeinstellung des KOMA-Scripts gar nicht im Inhaltsverzeichnis aufzuführen, finde ich unpraktisch, da es hiermit auch nicht im PDF-Inhaltsverzeichnis auftaucht und somit schlecht direkt gefunden werden kann. Um dies im KOMA-Script umzusetzen nutze Option bibliography=totoc (s.o.).</li>
<li><strong>Was ist wenn ich meine Arbeit durch eine Klebebindung binden lasse?</strong><br />
Hierdurch verliert man Seiteninhalt, da man bei einer Klebebindung die Seiten nicht mehr ganz aufschlagen kann. Als guten Randwert bei einer Klebebindung habe ich 8mm gefunden. Dies ist über BCOR=8mm gesetzt worden.</li>
<li><strong>Endpunkte nach den Kapitelnummern?</strong><br />
Laut Duden werden nach Kapitelnummerierungen im Normalfall keine Punkte gesetzt. Somit sähe eine Kapitelüberschrift wie folgt aus: &#8220;3.2 Algorithmus des Grauens&#8221;. Sobald aber ein Anhang hinzugefügt wird, wird allen Nummern ein abschließender Punkt hinzugefügt. Eine mögliche Begründung zu dieser Vorgehensweise wird darin gesehen, dass, wenn ein Anhang mit beispielsweise &#8220;A. Zahlensammlung&#8221; gekennzeichnet wird, das vorangestellte Aufzählungszeichen &#8220;A&#8221; von der Überschrift getrennt werden soll, da es sich um ein Buchstaben handelt, der sonst eventuell fälschlicherweise der Überschrift zugeordnet wird. Da eine weitere Regel besagt, dass die Punktsetzung in der Arbeit einheitlich geschehen soll, wird also sobald man einen Anhang erstellt nach <strong>allen</strong> Kapitelnummerierungen ein Punkt gesetzt. Diese Regeln werden auch so perfekt von der KOMA-Klasse umgesetzt. Problematisch wird es wenn man zusätzliche Pakete nutzt, die sich nicht für die Punktesetzung interessieren und dann keine Punkte am Ende setzten. So hatte ich durch die Verwendung des amsthm Packages keine abschließenden Punkte bei z.B. &#8220;3.4 Definition&#8221;. Da die Regel der Einheitlichkeit wichtiger ist, habe ich mich also dazu entschieden der KOMA-Klasse zu sagen, keine Endpunkte zu setzen. Dies geschieht mit der Option numbers=noendperiod (s.o.).</li>
<li><strong>Druckertreiber?</strong><br />
In der Copythek, in der ich die Arbeit ausgedruckt habe, konnte ich zwischen einem PCL-Treiber und einem Postscript-Treiber wählen.  Meine Empfehlung ist es den Postscript-Treiber zu nutzen, da dieser bei mir wesentlich bessere Ergebnisse bei den enthaltenen Vektorgrafiken erzielte.</li>
<li><strong>Welche Artikel bei englischen Wörtern, die in einem deutschen Text verwendet werden?</strong><br />
Laut Duden wird der Artikel der Übersetzung des Wortes genutzt, sollte das Wort nicht schon im Duden stehen. D.h. das Wort &#8220;Frame&#8221; beispielsweise, was übersetzt so viel wie &#8220;Rahmen&#8221; bedeutet, würde somit einen männlich Genus bekommen und &#8220;der Frame&#8221; heißen. An diesem Beispiel lässt sich auch erkennen, warum es oft Sinn macht feststehende englische Begriffe lieber nicht zu übersetzten. Kein Informatiker wird sofort verstehen was mit Rahmen gemeint ist. Weitere interessante Infos zur Rechtschreibung finden sich in Dr. Werner Struckmanns PDF <a href="http://www.ips.cs.tu-bs.de/ips/struck/unitext/rechtschreibung.pdf">&#8220;Anmerkungen zur Rechtschreibung&#8221;</a>.</li>
<li><strong>Leerzeichen?</strong><br />
Viele wichtige Infos über die Wahl des richtigen Leerzeichens findet sich in der PDF <a href="http://www.ips.cs.tu-bs.de/ips/struck/unitext/typographie.pdf">&#8220;Typographische Hinweise&#8221;</a> von Dr. Werner Struckmann.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2010/10/best-practices-wissenschaftliche-arbeit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Load any soundfile in Python as Scipy array using GStreamer</title>
		<link>http://dominikschuermann.de/index.php/2010/09/load-any-soundfile-as-scipy-array-using-gstreamer/</link>
		<comments>http://dominikschuermann.de/index.php/2010/09/load-any-soundfile-as-scipy-array-using-gstreamer/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 23:24:08 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=196</guid>
		<description><![CDATA[I had problems using the build in function of Scipy to load soundfiles as an scipy.array object. Sometimes it gives an error like &#8220;struct.error: unpack requires a string argument of length 4&#8243; when opening some wave files. Yes it only handles wave files! After trying audiolab, which was not working, and the build-in functions for [...]]]></description>
			<content:encoded><![CDATA[<p>I had problems using the build in function of Scipy to load soundfiles as an scipy.array object. Sometimes it gives an error like <strong>&#8220;struct.error: unpack requires a string argument of length 4&#8243;</strong> when opening some wave files. Yes it only handles wave files!</p>
<p>After trying <a href="http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/audiolab/">audiolab</a>, which was not working, and the build-in functions for opening wave files I stumbled upon <a href="http://stackoverflow.com/questions/3507746/use-python-gstreamer-to-decode-audio-to-pcm-data">&#8220;Use (Python) Gstreamer to decode audio (to PCM data)&#8221;</a>. Because I was already using GStreamer in this project to handle microphone recordings I used the <a href="http://github.com/sampsyo/pylastfp/blob/master/lastfp/gstdec.py">linked library</a> from the post and wrote a little function to convert the raw PCM data to readable scipy arrays. It was a little bit tricky to get the struct.unpack right but now it works like a charm.</p>
<p>So now we have a working implementation that can convert any audiofile, that gstreamer can open, to a scipy.array. Thanks goes to <a href="http://github.com/sampsyo">Adrian Sampson</a> for providing the decoding function.</p>
<p>See my changes on <a href="http://gist.github.com/592776">http://gist.github.com/592776</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2010/09/load-any-soundfile-as-scipy-array-using-gstreamer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ThinkPad X200 Wacom Tablet for Debian Testing</title>
		<link>http://dominikschuermann.de/index.php/2010/05/thinkpad-x200-tablet-for-debian-testing/</link>
		<comments>http://dominikschuermann.de/index.php/2010/05/thinkpad-x200-tablet-for-debian-testing/#comments</comments>
		<pubDate>Wed, 05 May 2010 16:56:25 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tablet]]></category>
		<category><![CDATA[Thinkpad X200]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=162</guid>
		<description><![CDATA[To get the X200 Wacom Tablet to work i have made several steps, that i will describe later in the post. After the last update of xserver-xorg-input-wacom i also got the touch input working without problems. First my hardware specifications: Thinkpad X200 Tablet (with Stylus and Touch) 2x Intel(R) Core(TM)2 Duo CPU     L9400  @ 1.86GHz [...]]]></description>
			<content:encoded><![CDATA[<p>To get the X200 Wacom Tablet to work i have made several steps, that i will describe later in the post. After the last update of <strong>xserver-xorg-input-wacom</strong> i also got the touch input working without problems.</p>
<p><strong>First my hardware specifications:</strong><br />
Thinkpad X200 Tablet (with Stylus and Touch)<br />
2x Intel(R) Core(TM)2 Duo CPU     L9400  @ 1.86GHz<br />
4GB Ram<br />
Display Resolution: 1280&#215;800 pixels</p>
<p><strong>I am running Debian GNU/Linux &#8220;squeeze&#8221; testing.</strong></p>
<h3>1. Install the following packages</h3>

<div class="wp_codebox"><table><tr id="p16229"><td class="code" id="p162code29"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> xserver-xorg-input-wacom</pre></td></tr></table></div>

<h3>2. Let Xorg produce the xorg.conf</h3>

<div class="wp_codebox"><table><tr id="p16230"><td class="code" id="p162code30"><pre class="bash" style="font-family:monospace;">Xorg <span style="color: #660033;">-configure</span></pre></td></tr></table></div>

<h3>3. Edit xorg.conf</h3>
<p>Now edit<strong> /etc/X11/xorg.conf</strong> and add the following lines in the <strong>Section &#8220;ServerLayout&#8221;</strong>:</p>

<div class="wp_codebox"><table><tr id="p16231"><td class="code" id="p162code31"><pre class="xorg_conf" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># X200 touchscreen</span>
<span style="color: #990000;">InputDevice</span>    <span style="color: #0000ff;">&quot;cursor&quot;</span> <span style="color: #0000ff;">&quot;SendCoreEvents&quot;</span>
<span style="color: #990000;">InputDevice</span>    <span style="color: #0000ff;">&quot;stylus&quot;</span> <span style="color: #0000ff;">&quot;SendCoreEvents&quot;</span>
<span style="color: #990000;">InputDevice</span>    <span style="color: #0000ff;">&quot;eraser&quot;</span> <span style="color: #0000ff;">&quot;SendCoreEvents&quot;</span>
<span style="color: #990000;">InputDevice</span>    <span style="color: #0000ff;">&quot;touch&quot;</span>  <span style="color: #0000ff;">&quot;SendCoreEvents&quot;</span> <span style="color: #adadad; font-style: italic;">#touch device</span></pre></td></tr></table></div>

<p>The other lines can be added anywhere:</p>

<div class="wp_codebox"><table><tr id="p16232"><td class="code" id="p162code32"><pre class="xorg_conf" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># X200 touchscreen</span>
&nbsp;
<span style="color: #b1b100;">Section</span> <span style="color: #0000ff;">&quot;InputDevice&quot;</span>
	<span style="color: #990000;">Driver</span>        <span style="color: #0000ff;">&quot;wacom&quot;</span>
	<span style="color: #990000;">Identifier</span>    <span style="color: #0000ff;">&quot;cursor&quot;</span>
	<span style="color: #990000;">Option</span>        <span style="color: #0000ff;">&quot;Device&quot;</span>        <span style="color: #0000ff;">&quot;/dev/ttyS0&quot;</span>
	<span style="color: #990000;">Option</span>        <span style="color: #0000ff;">&quot;Type&quot;</span>          <span style="color: #0000ff;">&quot;cursor&quot;</span>
	<span style="color: #990000;">Option</span>        <span style="color: #0000ff;">&quot;ForceDevice&quot;</span>   <span style="color: #0000ff;">&quot;ISDV4&quot;</span>
	<span style="color: #990000;">Option</span>        <span style="color: #0000ff;">&quot;Mode&quot;</span>          <span style="color: #0000ff;">&quot;Absolute&quot;</span>
<span style="color: #b1b100;">EndSection</span>
&nbsp;
<span style="color: #b1b100;">Section</span> <span style="color: #0000ff;">&quot;InputDevice&quot;</span>
	<span style="color: #990000;">Driver</span>        <span style="color: #0000ff;">&quot;wacom&quot;</span>
	<span style="color: #990000;">Identifier</span>    <span style="color: #0000ff;">&quot;stylus&quot;</span>
	<span style="color: #990000;">Option</span>        <span style="color: #0000ff;">&quot;Device&quot;</span>        <span style="color: #0000ff;">&quot;/dev/ttyS0&quot;</span>
	<span style="color: #990000;">Option</span>        <span style="color: #0000ff;">&quot;Type&quot;</span>          <span style="color: #0000ff;">&quot;stylus&quot;</span>
	<span style="color: #990000;">Option</span>        <span style="color: #0000ff;">&quot;ForceDevice&quot;</span>   <span style="color: #0000ff;">&quot;ISDV4&quot;</span>
<span style="color: #b1b100;">EndSection</span>
&nbsp;
<span style="color: #b1b100;">Section</span> <span style="color: #0000ff;">&quot;InputDevice&quot;</span>
	<span style="color: #990000;">Driver</span>        <span style="color: #0000ff;">&quot;wacom&quot;</span>
	<span style="color: #990000;">Identifier</span>    <span style="color: #0000ff;">&quot;eraser&quot;</span>
	<span style="color: #990000;">Option</span>        <span style="color: #0000ff;">&quot;Device&quot;</span>        <span style="color: #0000ff;">&quot;/dev/ttyS0&quot;</span>
	<span style="color: #990000;">Option</span>        <span style="color: #0000ff;">&quot;Type&quot;</span>          <span style="color: #0000ff;">&quot;eraser&quot;</span>
	<span style="color: #990000;">Option</span>        <span style="color: #0000ff;">&quot;ForceDevice&quot;</span>   <span style="color: #0000ff;">&quot;ISDV4&quot;</span>
<span style="color: #b1b100;">EndSection</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># support for &quot;touch&quot; (with finger, available on x200t and some x61t)</span>
<span style="color: #b1b100;">Section</span> <span style="color: #0000ff;">&quot;InputDevice&quot;</span>
	<span style="color: #990000;">Driver</span>        <span style="color: #0000ff;">&quot;wacom&quot;</span>
	<span style="color: #990000;">Identifier</span>    <span style="color: #0000ff;">&quot;touch&quot;</span>
	<span style="color: #990000;">Option</span>        <span style="color: #0000ff;">&quot;Device&quot;</span>        <span style="color: #0000ff;">&quot;/dev/ttyS0&quot;</span>          <span style="color: #adadad; font-style: italic;"># SERIAL ONLY</span>
	<span style="color: #990000;">Option</span>        <span style="color: #0000ff;">&quot;Type&quot;</span>          <span style="color: #0000ff;">&quot;touch&quot;</span>
	<span style="color: #990000;">Option</span>        <span style="color: #0000ff;">&quot;ForceDevice&quot;</span>   <span style="color: #0000ff;">&quot;ISDV4&quot;</span>               <span style="color: #adadad; font-style: italic;"># Serial Tablet PC ONLY</span>
&nbsp;
	<span style="color: #adadad; font-style: italic;"># suppress cursor movements when touch movements are too small, prevents flickering of cursor</span>
	<span style="color: #990000;">Option</span>	      <span style="color: #0000ff;">&quot;Suppress&quot;</span>      <span style="color: #0000ff;">&quot;2&quot;</span>
&nbsp;
	<span style="color: #adadad; font-style: italic;"># Adding manual calibration, since proper calibration seems impossible.</span>
	<span style="color: #990000;">Option</span>	      <span style="color: #0000ff;">&quot;BottomY&quot;</span>	      <span style="color: #0000ff;">&quot;940&quot;</span>
	<span style="color: #990000;">Option</span>	      <span style="color: #0000ff;">&quot;BottomX&quot;</span>       <span style="color: #0000ff;">&quot;950&quot;</span>
	<span style="color: #990000;">Option</span>	      <span style="color: #0000ff;">&quot;TopX&quot;</span>          <span style="color: #0000ff;">&quot;48&quot;</span>
	<span style="color: #990000;">Option</span>	      <span style="color: #0000ff;">&quot;TopY&quot;</span>          <span style="color: #0000ff;">&quot;90&quot;</span>
<span style="color: #b1b100;">EndSection</span></pre></td></tr></table></div>

<h3>4.Configure Tablet Keys</h3>
<ol>
<li>To get the Tablet Buttons to do what i want them to do, create a file called <strong>.Xmodmap</strong> in your home directory with the following content:

<div class="wp_codebox"><table><tr id="p16233"><td class="code" id="p162code33"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">!</span> tablet, from left to right: rotate, flip, full
keycode <span style="color: #000000;">162</span> = XF86LaunchA
keycode <span style="color: #000000;">161</span> = XF86LaunchB
keycode <span style="color: #000000;">149</span> = XF86LaunchC</pre></td></tr></table></div>

</li>
<li>Edit your <strong>.Xsession or .xinit</strong> Script to use this Xmodmap configuration. Beside this i also mapped the Stylus to Mousebuttons and activated the TrackPoint Scrolling:

<div class="wp_codebox"><table><tr id="p16234"><td class="code" id="p162code34"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># trackpoint xinput</span>
xinput set-prop <span style="color: #ff0000;">&quot;TPPS/2 IBM TrackPoint&quot;</span> <span style="color: #ff0000;">&quot;Evdev Wheel Emulation&quot;</span> <span style="color: #000000;">1</span>
xinput set-prop <span style="color: #ff0000;">&quot;TPPS/2 IBM TrackPoint&quot;</span> <span style="color: #ff0000;">&quot;Evdev Wheel Emulation Button&quot;</span> <span style="color: #000000;">2</span>
xinput set-prop <span style="color: #ff0000;">&quot;TPPS/2 IBM TrackPoint&quot;</span> <span style="color: #ff0000;">&quot;Evdev Wheel Emulation Timeout&quot;</span> <span style="color: #000000;">200</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># wacom stylus</span>
xsetwacom <span style="color: #000000; font-weight: bold;">set</span> stylus Button1 <span style="color: #000000;">1</span>
xsetwacom <span style="color: #000000; font-weight: bold;">set</span> stylus Button2 <span style="color: #000000;">3</span>
xsetwacom <span style="color: #000000; font-weight: bold;">set</span> stylus Button3 <span style="color: #000000;">3</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># using special Xmodmap</span>
<span style="color: #c20cb9; font-weight: bold;">xmodmap</span> ~<span style="color: #000000; font-weight: bold;">/</span>.Xmodmap</pre></td></tr></table></div>

</li>
<li>Create a new Bash script that we will use to rotate and flip the display, like <strong>~/tablet.sh</strong> and make it executable (<strong>chmod +x tablet.sh</strong>):

<div class="wp_codebox"><table><tr id="p16235"><td class="code" id="p162code35"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># config</span>
<span style="color: #007800;">output</span>=<span style="color: #ff0000;">&quot;LVDS1&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># get current rotation</span>
<span style="color: #007800;">current</span>=<span style="color: #000000; font-weight: bold;">`</span>xrandr <span style="color: #660033;">--verbose</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$output</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">&quot;s/^[^ ]* [^ ]* [^ ]* ([^(]*) \([a-z]*\).*/\1/&quot;</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #007800;">$current</span> <span style="color: #000000; font-weight: bold;">in</span>
  normal<span style="color: #7a0874; font-weight: bold;">&#41;</span>    <span style="color: #007800;">geom</span>=<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">;;</span>
  left<span style="color: #7a0874; font-weight: bold;">&#41;</span>      <span style="color: #007800;">geom</span>=<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">;;</span>
  inverted<span style="color: #7a0874; font-weight: bold;">&#41;</span>  <span style="color: #007800;">geom</span>=<span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">;;</span>
  right<span style="color: #7a0874; font-weight: bold;">&#41;</span>     <span style="color: #007800;">geom</span>=<span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$1&quot;</span> == <span style="color: #ff0000;">&quot;invert&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$1&quot;</span> == <span style="color: #ff0000;">&quot;flip&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;
<span style="color: #000000; font-weight: bold;">then</span>
&nbsp;
  <span style="color: #666666; font-style: italic;"># based on current rotation set new rotation</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$1&quot;</span> == <span style="color: #ff0000;">&quot;invert&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;
  <span style="color: #000000; font-weight: bold;">then</span>
&nbsp;
    <span style="color: #666666; font-style: italic;"># invert</span>
    <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #007800;">$geom</span> <span style="color: #000000; font-weight: bold;">in</span>
      <span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>  <span style="color: #007800;">wacom</span>=half; <span style="color: #007800;">xrandr</span>=inverted<span style="color: #000000; font-weight: bold;">;;</span>
      <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>  <span style="color: #007800;">wacom</span>=cw; <span style="color: #007800;">xrandr</span>=right<span style="color: #000000; font-weight: bold;">;;</span>
      <span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>  <span style="color: #007800;">wacom</span>=none; <span style="color: #007800;">xrandr</span>=normal<span style="color: #000000; font-weight: bold;">;;</span>
      <span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>  <span style="color: #007800;">wacom</span>=ccw; <span style="color: #007800;">xrandr</span>=left<span style="color: #000000; font-weight: bold;">;;</span>
    <span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">else</span>
&nbsp;
    <span style="color: #666666; font-style: italic;"># flip</span>
    <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #007800;">$geom</span> <span style="color: #000000; font-weight: bold;">in</span>
      <span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>  <span style="color: #007800;">wacom</span>=cw; <span style="color: #007800;">xrandr</span>=right<span style="color: #000000; font-weight: bold;">;;</span>
      <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>  <span style="color: #007800;">wacom</span>=half; <span style="color: #007800;">xrandr</span>=inverted<span style="color: #000000; font-weight: bold;">;;</span>
      <span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>  <span style="color: #007800;">wacom</span>=ccw; <span style="color: #007800;">xrandr</span>=left<span style="color: #000000; font-weight: bold;">;;</span>
      <span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>  <span style="color: #007800;">wacom</span>=none; <span style="color: #007800;">xrandr</span>=normal<span style="color: #000000; font-weight: bold;">;;</span>
    <span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">#echo &quot;xrandr to $xrandr, xsetwacom to $wacom&quot;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;"># rotate display</span>
  xrandr <span style="color: #660033;">-o</span> <span style="color: #007800;">$xrandr</span>
&nbsp;
  <span style="color: #666666; font-style: italic;"># rotate wacom</span>
  xsetwacom <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #ff0000;">&quot;stylus&quot;</span> Rotate <span style="color: #007800;">$wacom</span>
  xsetwacom <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #ff0000;">&quot;eraser&quot;</span> Rotate <span style="color: #007800;">$wacom</span>
  xsetwacom <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #ff0000;">&quot;touch&quot;</span>  Rotate <span style="color: #007800;">$wacom</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">else</span>
&nbsp;
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;possible parameters: flip, invert&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">fi</span></pre></td></tr></table></div>

</li>
<li>Map the script to the Tablet Keys. I am using <a href="http://awesome.naquadah.org/">Awesome WM</a> so this part is window manager specific. In Gnome you can set these Keys via a graphical interface. In the case of awesome add this to your globalkeys:

<div class="wp_codebox"><table><tr id="p16236"><td class="code" id="p162code36"><pre class="lua" style="font-family:monospace;">awful.key<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>, <span style="color: #ff0000;">&quot;XF86LaunchA&quot;</span>, <span style="color: #b1b100;">function</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> awful.util.spawn<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;bash /home/NAME/tablet.sh invert&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">end</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #808080; font-style: italic;">-- invert</span>
awful.key<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>, <span style="color: #ff0000;">&quot;XF86LaunchB&quot;</span>, <span style="color: #b1b100;">function</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> awful.util.spawn<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;bash /home/NAME/tablet.sh flip&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">end</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #808080; font-style: italic;">-- flip</span></pre></td></tr></table></div>

</li>
</ol>
<p>This tutorial is based on the following hints:<br />
[1] <a href="http://www.cub3.net/blog/configuring-the-touch-screen-for-x200t/">http://www.cub3.net/blog/configuring-the-touch-screen-for-x200t/</a><br />
[2] <a href="http://linuxwacom.sourceforge.net/index.php/howto/inputdev">http://linuxwacom.sourceforge.net/index.php/howto/inputdev</a><br />
[3] <a href="http://www.thinkwiki.org/wiki/Wacom_Serial_Tablet_PC_Stylus">http://www.thinkwiki.org/wiki/Wacom_Serial_Tablet_PC_Stylus</a><br />
[4] <a href="http://www.thinkwiki.org/wiki/Tablet_Hardware_Buttons">http://www.thinkwiki.org/wiki/Tablet_Hardware_Buttons</a><br />
[5] <a href="http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work"> http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2010/05/thinkpad-x200-tablet-for-debian-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restrict access to a folder by ip range with lighttpd</title>
		<link>http://dominikschuermann.de/index.php/2010/02/restrict-access-to-a-folder-by-ip-range-with-lighttpd/</link>
		<comments>http://dominikschuermann.de/index.php/2010/02/restrict-access-to-a-folder-by-ip-range-with-lighttpd/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 18:38:08 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=155</guid>
		<description><![CDATA[To allow access to a folder on your webserver only for a specific ip range, you have to create a new file in /etc/lighttpd/conf-available named 20-restrict-access.conf with the following content: $HTTP&#91;&#34;host&#34;&#93; == &#34;example.com&#34; &#123; $HTTP&#91;&#34;remoteip&#34;&#93; != &#34;134.169.0.0/16&#34; &#123; $HTTP&#91;&#34;url&#34;&#93; =~ &#34;^/Downloads/&#34; &#123; url.access-deny = &#40; &#34;&#34; &#41; &#125; &#125; &#125; This restricts the access to [...]]]></description>
			<content:encoded><![CDATA[<p>To allow access to a folder on your webserver only for a specific ip range, you have to create a new file in <strong>/etc/lighttpd/conf-available</strong> named <strong>20-restrict-access.conf</strong> with the following content:</p>

<div class="wp_codebox"><table><tr id="p15540"><td class="code" id="p155code40"><pre class="groovy" style="font-family:monospace;">$HTTP<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;host&quot;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">==</span> <span style="color: #ff0000;">&quot;example.com&quot;</span> <span style="color: #66cc66;">&#123;</span>
  $HTTP<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;remoteip&quot;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!=</span> <span style="color: #ff0000;">&quot;134.169.0.0/16&quot;</span> <span style="color: #66cc66;">&#123;</span>
    $HTTP<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;url&quot;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">=</span>~ <span style="color: #ff0000;">&quot;^/Downloads/&quot;</span> <span style="color: #66cc66;">&#123;</span>
      url.<span style="color: #006600;">access</span><span style="color: #66cc66;">-</span>deny <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#125;</span>
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>This restricts the access to the folder Downloads and all its subdirectories to the ip range 134.169.0.0/16 for the host example.com.</p>
<p>Now enable the new configuration file with</p>

<div class="wp_codebox"><table><tr id="p15541"><td class="code" id="p155code41"><pre class="bash" style="font-family:monospace;">lighttpd-enable-mod restrict-access</pre></td></tr></table></div>

<p>and restart lighttpd with</p>

<div class="wp_codebox"><table><tr id="p15542"><td class="code" id="p155code42"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>lighttpd restart</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2010/02/restrict-access-to-a-folder-by-ip-range-with-lighttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lighttpd + FastCGI + Rails + Tracks on Debian Lenny</title>
		<link>http://dominikschuermann.de/index.php/2010/01/lighttpd-fastcgi-rails-tracks-on-debian-lenny/</link>
		<comments>http://dominikschuermann.de/index.php/2010/01/lighttpd-fastcgi-rails-tracks-on-debian-lenny/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 18:52:15 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=111</guid>
		<description><![CDATA[After Shuffle added support for synchronizing with Tracks I decided to install Tracks on my vServer. Because I am already running Lighttpd with FastCGI for PHP and the simple vhost configuration I did not want to use the included Webrick server shipped with Tracks. After searching the web I finally managed to install everything with [...]]]></description>
			<content:encoded><![CDATA[<p>After <a href="http://code.google.com/p/android-shuffle/">Shuffle </a>added support for synchronizing with <a href="http://getontracks.org/">Tracks</a> I decided to install Tracks on my vServer. Because I am already running Lighttpd with FastCGI for PHP and the <a href="http://redmine.lighttpd.net/wiki/1/Docs:ModSimpleVhost">simple vhost configuration</a> I did not want to use the included Webrick server shipped with Tracks.<br />
After searching the web I finally managed to install everything with help from <a href="http://www.ducea.com/2007/11/16/howto-install-tracks-on-debian/">&#8220;HowTo install Tracks on Debian&#8221;</a> and other sources.</p>
<p>Requirements:</p>
<ul>
<li>Running Lighttpd with simple vhost configuration</li>
<li>MySQL working</li>
</ul>
<p>This is what I did (First 2 steps are based on &#8220;HowTo install Tracks on Debian&#8221;):</p>
<h3>1. Install Ruby on Rails dependencies</h3>

<div class="wp_codebox"><table><tr id="p11157"><td class="code" id="p111code57"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ruby rdoc rake rails rubygems libmysql-ruby libzlib-ruby liberb-ruby</pre></td></tr></table></div>

<h3>2. Tracks installation</h3>
<p>Based on the <a href="http://www.getontracks.org/doc/chapter/2-installation.html">official installation guide</a> :</p>
<ol>
<li>download the <a href="http://www.getontracks.org/downloads/index">source</a></li>
<li>unzip to <strong>/var/www/tracks.yourdomain.com/</strong></li>
<li>prepare MySQL:

<div class="wp_codebox"><table><tr id="p11158"><td class="code" id="p111code58"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-uroot</span> <span style="color: #660033;">-p</span></pre></td></tr></table></div>


<div class="wp_codebox"><table><tr id="p11159"><td class="code" id="p111code59"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">DATABASE</span> tracks;
<span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">ALL</span> PRIVILEGES <span style="color: #993333; font-weight: bold;">ON</span> tracks<span style="color: #66cc66;">.*</span> <span style="color: #993333; font-weight: bold;">TO</span> tracksuser@localhost \
<span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">'tracks-password'</span> <span style="color: #993333; font-weight: bold;">WITH</span> <span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">OPTION</span>;</pre></td></tr></table></div>

</li>
<li>open <strong>tracks/config/database.yml</strong> and change the content to:<strong><br />
</strong></p>

<div class="wp_codebox"><table><tr id="p11160"><td class="code" id="p111code60"><pre class="xml" style="font-family:monospace;">test:
adapter: sqlite3
database: &quot;:memory:&quot;
&nbsp;
# MySQL settings
development:
adapter: mysql
database: tracks
host: localhost
username: tracksuser
password: tracks-password
&nbsp;
production:
adapter: mysql
database: tracks
host: localhost
username: tracksuser
password: tracks-password</pre></td></tr></table></div>

</li>
<li>open <strong>tracks/config/site.yml</strong> and edit the line

<div class="wp_codebox"><table><tr id="p11161"><td class="code" id="p111code61"><pre class="xml" style="font-family:monospace;">SALT = &quot;change-me&quot;</pre></td></tr></table></div>

<p>to a random typed string of your choosing.</li>
<li>change timezone:

<div class="wp_codebox"><table><tr id="p11162"><td class="code" id="p111code62"><pre class="bash" style="font-family:monospace;">rake <span style="color: #000000; font-weight: bold;">time</span>:zones:<span style="color: #7a0874; font-weight: bold;">local</span></pre></td></tr></table></div>

</li>
<li>populate database:

<div class="wp_codebox"><table><tr id="p11163"><td class="code" id="p111code63"><pre class="bash" style="font-family:monospace;">rake db:migrate <span style="color: #007800;">RAILS_ENV</span>=production</pre></td></tr></table></div>

</li>
</ol>
<h3>3. Prepare Lighttpd</h3>
<ol>
<li>install FastCGI Ruby Library:

<div class="wp_codebox"><table><tr id="p11164"><td class="code" id="p111code64"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libfcgi-ruby1.8</pre></td></tr></table></div>

</li>
<li>edit <strong>/etc/lighttpd/lighttpd.conf</strong> to include following modules:

<div class="wp_codebox"><table><tr id="p11165"><td class="code" id="p111code65"><pre class="xml" style="font-family:monospace;">mod_access
mod_alias
mod_accesslog
mod_compress
mod_rewrite
mod_redirect</pre></td></tr></table></div>

</li>
<li>change <strong>/etc/lighttpd/conf-available/10-simple-vhost.conf </strong>to exclude one site from the normal vhost configuration:

<div class="wp_codebox"><table><tr id="p11166"><td class="code" id="p111code66"><pre class="lua" style="font-family:monospace;">## Simple name-based virtual hosting
##
## Documentation: <span style="color: #66cc66;">/</span>usr<span style="color: #66cc66;">/</span>share<span style="color: #66cc66;">/</span>doc<span style="color: #66cc66;">/</span>lighttpd-doc<span style="color: #66cc66;">/</span>simple-vhost.txt
##                http:<span style="color: #66cc66;">//</span>www.lighttpd.net<span style="color: #66cc66;">/</span>documentation<span style="color: #66cc66;">/</span>simple-vhost.html
&nbsp;
server.modules +<span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;mod_simple_vhost&quot;</span> <span style="color: #66cc66;">&#41;</span>
&nbsp;
## only those that are <span style="color: #b1b100;">not</span> ruby on rails based
$HTTP<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;host&quot;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!=</span> <span style="color: #ff0000;">&quot;tracks.yourdomain.com&quot;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
  ## The document root of a virtual host isdocument-root <span style="color: #66cc66;">=</span>
  ##   simple-vhost.server-root + $HTTP<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;host&quot;</span><span style="color: #66cc66;">&#93;</span> + simple-vhost.document-root
  simple-vhost.server-root         <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;/var/www&quot;</span>
  simple-vhost.document-root       <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;/html/&quot;</span>
&nbsp;
  ## the default host <span style="color: #b1b100;">if</span> no host is sent
  simple-vhost.default-host        <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;yourdomain.com&quot;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

</li>
<li>create a new file <strong>/etc/lighttpd/conf-available/20-tracks.conf</strong>:

<div class="wp_codebox"><table><tr id="p11167"><td class="code" id="p111code67"><pre class="lua" style="font-family:monospace;">## configuration file <span style="color: #b1b100;">for</span> tracks
## this overrides the vhosts
&nbsp;
$HTTP<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;host&quot;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">==</span> <span style="color: #ff0000;">&quot;tracks.yourdomain.com&quot;</span> <span style="color: #66cc66;">&#123;</span>
  server.document-root <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;/var/www/tracks.yourdomain.com/public/&quot;</span>
  server.indexfiles <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;dispatch.fcgi&quot;</span><span style="color: #66cc66;">&#41;</span>
  server.error-handler-<span style="color: #cc66cc;">404</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;/dispatch.fcgi&quot;</span>
  fastcgi.server <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>
    <span style="color: #ff0000;">&quot;.fcgi&quot;</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>
      <span style="color: #ff0000;">&quot;bin-path&quot;</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">&quot;/var/www/tracks.yourdomain.com/public/dispatch.fcgi&quot;</span>,
      <span style="color: #ff0000;">&quot;socket&quot;</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">&quot;/tmp/rails-tracks.socket&quot;</span>,
      <span style="color: #ff0000;">&quot;min-procs&quot;</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #cc66cc;">1</span>,
      <span style="color: #ff0000;">&quot;max-procs&quot;</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #cc66cc;">1</span>,
      <span style="color: #ff0000;">&quot;idle-timeout&quot;</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #cc66cc;">20</span>,
      <span style="color: #ff0000;">&quot;bin-environment&quot;</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span>
        <span style="color: #ff0000;">&quot;RAILS_ENV&quot;</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">&quot;production&quot;</span>
      <span style="color: #66cc66;">&#41;</span>,
    <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

</li>
<li>enable the new module:

<div class="wp_codebox"><table><tr id="p11168"><td class="code" id="p111code68"><pre class="bash" style="font-family:monospace;">lighttpd-enable-mod tracks</pre></td></tr></table></div>

</li>
<li>restart Lighttpd:

<div class="wp_codebox"><table><tr id="p11169"><td class="code" id="p111code69"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>lighttpd restart</pre></td></tr></table></div>

</li>
<li>create missing directories and set permissions:

<div class="wp_codebox"><table><tr id="p11170"><td class="code" id="p111code70"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www-data:www-data tracks.yourdomain.com
<span style="color: #7a0874; font-weight: bold;">cd</span> tracks.yourdomain.com<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> <span style="color: #007800;">ugo</span>=rwx log
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> tmp
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> <span style="color: #007800;">ugo</span>=rwx tmp
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> public<span style="color: #000000; font-weight: bold;">/</span>javascripts<span style="color: #000000; font-weight: bold;">/</span>cache
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> <span style="color: #007800;">ugo</span>=rwx public<span style="color: #000000; font-weight: bold;">/</span>javascripts<span style="color: #000000; font-weight: bold;">/</span>cache
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> public<span style="color: #000000; font-weight: bold;">/</span>stylesheets<span style="color: #000000; font-weight: bold;">/</span>cache
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> <span style="color: #007800;">ugo</span>=rwx public<span style="color: #000000; font-weight: bold;">/</span>stylesheets<span style="color: #000000; font-weight: bold;">/</span>cache</pre></td></tr></table></div>

</li>
</ol>
<p>It should work now, if I forgot something please let me know by comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2010/01/lighttpd-fastcgi-rails-tracks-on-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Latex in OpenOffice Impress</title>
		<link>http://dominikschuermann.de/index.php/2010/01/latex-in-openoffice-impress/</link>
		<comments>http://dominikschuermann.de/index.php/2010/01/latex-in-openoffice-impress/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 14:35:30 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[University]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=102</guid>
		<description><![CDATA[Wenn viele Bilder eingefügt werden müssen oder Zusammenhänge besser in sich langsam aufbauenden Grafiken gezeigt werden sollen ist es einfacher OpenOffice Impress zu nutzen und nicht die Latex Beamer Klasse, wie ich es sonst tue. Um trotzdem nicht auf Latex Formeln verzichten zu müssen gibt es ein OpenOffice Plugin namens OOoLatex. Abhängigkeiten: sudo aptitude install [...]]]></description>
			<content:encoded><![CDATA[<p>Wenn viele Bilder eingefügt werden müssen oder Zusammenhänge besser in sich langsam aufbauenden Grafiken gezeigt werden sollen ist es einfacher OpenOffice Impress zu nutzen und nicht die Latex Beamer Klasse, wie ich es sonst tue.</p>
<p>Um trotzdem nicht auf Latex Formeln verzichten zu müssen gibt es ein OpenOffice Plugin namens OOoLatex.</p>
<p>Abhängigkeiten:</p>

<div class="wp_codebox"><table><tr id="p10272"><td class="code" id="p102code72"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> texlive imagemagick epstool</pre></td></tr></table></div>

<p>OpenOffice Erweiterung herunterladen:<br />
<a href="http://sourceforge.net/projects/ooolatex/files/OOoLatex/OOoLatex-4.0.0-beta/OOoLatex-4.0.0-beta-2-linux.oxt/download" target="_blank">Download</a></p>
<p dir="ltr">OpenOffice öffnen, dann Extras -&gt; Extension Manager -&gt; Hinzufügen und die Erweiterung installieren.</p>
<p dir="ltr">Nach einem Neustart von OpenOffice gibt es nun eine Toolbar um Equations einzufügen.</p>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2010/01/latex-in-openoffice-impress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SpringerLink Bücher herunterladen</title>
		<link>http://dominikschuermann.de/index.php/2010/01/springerlink-bucher-herunterladen/</link>
		<comments>http://dominikschuermann.de/index.php/2010/01/springerlink-bucher-herunterladen/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 12:38:13 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[SpringerLink]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=93</guid>
		<description><![CDATA[Nachdem ich im letzten Beitrag erklärt habe wie man eine VPN-Verbindung zur TU Braunschweig herstellen kann, gehe ich jetzt auf den Nutzen ein. Sobald man sich im IP Netz der Uni befindet hat man Zugriff auf verschiedene Publikationen aus dem Bereich der Informatik, die im Normalfall kostenpflichtig wären. Um nun auch von zu Hause auf [...]]]></description>
			<content:encoded><![CDATA[<p>Nachdem ich im letzten Beitrag erklärt habe wie man eine VPN-Verbindung zur TU Braunschweig herstellen kann, gehe ich jetzt auf den Nutzen ein.</p>
<p>Sobald man sich im IP Netz der Uni befindet hat man Zugriff auf verschiedene Publikationen aus dem Bereich der Informatik, die im Normalfall kostenpflichtig wären. Um nun auch von zu Hause auf diese zugreifen zu können, verbindet man sich mit dem neu angelegten VPN Profil, das den gesamten Traffic über die TU Braunschweig schickt.</p>
<p><strong>Folgende Links sind nun für Informatiker von Interesse:</strong></p>
<ul>
<li><a href="http://ieeexplore.ieee.org/" target="_blank">IEEE Explore</a></li>
<li><a href="http://portal.acm.org/dl.cfm" target="_blank">ACM Digital Library</a></li>
<li><a href="http://springerlink.com/" target="_blank">SpringerLink</a></li>
</ul>
<p>Auf den Seiten steht nun, dass ihr über die TU Braunschweig eingeloggt seit und somit Zugriff auf mehr Inhalte habt.</p>
<h3>SpringerLink Downloader</h3>
<p>Leider ist es etwas mühselig bei SpringerLink ein komplettes Buch wie zum Beispiel &#8220;Einführung in die Kryptographie&#8221; (http://springerlink.com/content/n502x1) herunterzuladen. Um dies zu erleichtern gibt es ein kleines Python Script unter <a href="http://milianw.github.com/springer_download/" target="_blank">http://milianw.github.com/springer_download/</a></p>
<p>Nach der Installation der Abhängigkeiten</p>

<div class="wp_codebox"><table><tr id="p9375"><td class="code" id="p93code75"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> python pdftk iconv</pre></td></tr></table></div>

<p>starte das Script einfach wie folgt um beispielsweise &#8220;Einführung in die Kryptographie&#8221; herunterzuladen:</p>

<div class="wp_codebox"><table><tr id="p9376"><td class="code" id="p93code76"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>springer_download.py <span style="color: #660033;">-l</span> http:<span style="color: #000000; font-weight: bold;">//</span>springerlink.com<span style="color: #000000; font-weight: bold;">/</span>content<span style="color: #000000; font-weight: bold;">/</span>n502x1</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2010/01/springerlink-bucher-herunterladen/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>VPN Verbindung zur TU Braunschweig unter Debian/Ubuntu</title>
		<link>http://dominikschuermann.de/index.php/2010/01/vpn-tu-braunschweig/</link>
		<comments>http://dominikschuermann.de/index.php/2010/01/vpn-tu-braunschweig/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 12:07:02 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=83</guid>
		<description><![CDATA[Eine einfache Methode eine VPN Verbindung zur TU Braunschweig herzustellen ist es das passende Network Manager Plugin, in diesem Fall für eine Cisco VPN-Verbindung, zu nutzen. Unter modernen debianbasierten Distributionen wie Ubuntu reicht die Installation des Paketes &#8220;network-manager-vpnc&#8221; mit seinen Abhängigkeiten: sudo aptitude install network-manager-vpnc Nun kann unter &#8220;Verbindungen bearbeiten&#8221; in dem Network Manager eine [...]]]></description>
			<content:encoded><![CDATA[<p>Eine einfache Methode eine VPN Verbindung zur TU Braunschweig herzustellen ist es das passende Network Manager Plugin, in diesem Fall für eine Cisco VPN-Verbindung, zu nutzen. Unter modernen debianbasierten Distributionen wie Ubuntu reicht die Installation des Paketes <em>&#8220;network-manager-vpnc&#8221;</em> mit seinen Abhängigkeiten:</p>

<div class="wp_codebox"><table><tr id="p8380"><td class="code" id="p83code80"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> network-manager-vpnc</pre></td></tr></table></div>

<p>Nun kann unter <em>&#8220;Verbindungen bearbeiten&#8221;</em> in dem Network Manager eine neue VPN Verbindung unter dem Reiter <em>&#8220;VPN&#8221;</em> hinzugefügt werden.<br />
Die TU Braunschweig bietet hier zwei Profile an, wobei durch das eine Profil der gesamte Traffic über die TU Braunschweig geht und bei dem anderen nur der TU spezifische Teil.</p>
<h3>Einstellungen</h3>
<p>Folgende Einstellungen sind vorzunehmen:</p>
<h4><strong>Gesamter Traffic:</strong></h4>

<div class="wp_codebox"><table><tr id="p8381"><td class="code" id="p83code81"><pre class="xml" style="font-family:monospace;">Gateway: vpngate.rz.tu-bs.de
Gruppenname: tubsipsec
Benutzerpasswort: $dein Passwort
Gruppenpasswort: tuipsec
Benutzername: $deine y-Nummer</pre></td></tr></table></div>

<h4><strong>Nur der Traffic der TU Braunschweig:</strong></h4>

<div class="wp_codebox"><table><tr id="p8382"><td class="code" id="p83code82"><pre class="xml" style="font-family:monospace;">Gateway: vpngate.rz.tu-bs.de
Gruppenname: tubssplit
Benutzerpasswort: $dein Passwort
Gruppenpasswort: tusplit
Benutzername: $deine y-Nummer</pre></td></tr></table></div>

<p>Dem Profil noch einen passenden Namen verpassen und nach einer erfolgreichen Konfiguration mit selbigem verbinden. Die Welt kann so einfach sein <img src='http://dominikschuermann.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2010/01/vpn-tu-braunschweig/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Running Glassfish v3 as non-root on Linux</title>
		<link>http://dominikschuermann.de/index.php/2009/12/running-glassfish-v3-as-non-root-on-linux/</link>
		<comments>http://dominikschuermann.de/index.php/2009/12/running-glassfish-v3-as-non-root-on-linux/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 01:27:25 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=78</guid>
		<description><![CDATA[Today I&#8217;ve spend too much time searching the web how to run Glassfish v3 Prelude as non-root user on Scientific Linux (based on Red Hat Enterprise Linux). I added a new user named glassfish, chmod and chgrp&#8217;ed the directories and tried to run my glassfish server with &#8220;sudo -u glassfish /opt/glassfishv3/bin/asadmin start-domain domain1&#8243;. This just [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve spend too much time searching the web how to run Glassfish v3 Prelude as non-root user on Scientific Linux (based on Red Hat Enterprise Linux). I added a new user named glassfish, chmod and chgrp&#8217;ed the directories and tried to run my glassfish server with &#8220;sudo -u glassfish /opt/glassfishv3/bin/asadmin start-domain domain1&#8243;. This just don&#8217;t work and gives following error:</p>
<pre>Domain (domain1) did not respond in 90 seconds. It means it is still coming up
or it has failed to come up. Check server.log for details.</pre>
<p>So I searched for hours just to find out that it is not possible to run it as non-root while binding Glassfish to Port 80, because non-root users can not bind to ports &lt; 1024 on Linux. Apache for example is running a root process to which the www user process binds to. Solution for Glassfish should be using authbind. But it turns out that this doesn&#8217;t work on Linux. Referring to:<br />
<a href="http://forums.java.net/jive/thread.jspa?messageID=365729">http://forums.java.net/jive/thread.jspa?messageID=365729</a></p>
<p>So I am stuck running Glassfish v3 as root. But I am not pleased with this situation&#8230;</p>
<p><strong>Update:</strong> At <a href="http://www.klawitter.de/tomcat80.html" target="_blank">http://www.klawitter.de/tomcat80.html</a> there are some examples how to achieve it. Now I am using Kernel Port Forwarding. Just as simple as it seems&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2009/12/running-glassfish-v3-as-non-root-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Entwicklung einer mobilen Webapplikation</title>
		<link>http://dominikschuermann.de/index.php/2009/11/entwicklung-einer-mobilen-webapplikation/</link>
		<comments>http://dominikschuermann.de/index.php/2009/11/entwicklung-einer-mobilen-webapplikation/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 03:57:24 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[University]]></category>
		<category><![CDATA[dotMobi]]></category>
		<category><![CDATA[mobile Webapplikation]]></category>
		<category><![CDATA[W3C Mobile Best Practices]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=50</guid>
		<description><![CDATA[Im Rahmen des Teamprojekts im SoSe 2009 am Instituts für Wirtschaftsinformatik haben wir die Möglichkeiten und Standards hingehend einer mobilen Webapplikation evaluiert und einen Prototyp entwickelt. In unserem Konzept wollen wir aufzeigen, was durch Einsatz von bereits vorhandenen Standards und unserem individuellen Verständnis eine solche mobile Webapplikation auszeichnet. Konkret haben wir die &#8220;W3C Mobile Web [...]]]></description>
			<content:encoded><![CDATA[<p>Im Rahmen des Teamprojekts im SoSe 2009 am Instituts für Wirtschaftsinformatik haben wir die Möglichkeiten und Standards hingehend einer mobilen Webapplikation evaluiert und einen Prototyp entwickelt. In unserem Konzept wollen wir aufzeigen, was durch Einsatz von bereits vorhandenen Standards und unserem individuellen Verständnis eine solche mobile Webapplikation auszeichnet.</p>
<p>Konkret haben wir die &#8220;W3C Mobile Web Best Practices&#8221;, die &#8220;Apple iPhone Recommendations&#8221; und die Top-Level-Domain &#8220;.mobi&#8221; mit ihren Vor- und Nachteilen näher beleuchtet. Die daraus gewonnenen Erkentnisse haben wir in das Projekt einﬂießen lassen, das den Praxisbezug zu diesem Konzeptes darstellt.</p>
<p>Wen das Thema näher interessiert:<a href="http://dominikschuermann.de/wp-content/uploads/Entwicklung-einer-mobilen-Webapplikation.pdf"><br />
Entwicklung einer mobilen Webapplikation</a><br />
<a href="http://dominikschuermann.de/wp-content/uploads/Entwicklung-einer-mobilen-Webapplikation-Presentation.pdf">Entwicklung einer mobilen Webapplikation Präsentation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2009/11/entwicklung-einer-mobilen-webapplikation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grails Bootstrap based on environment</title>
		<link>http://dominikschuermann.de/index.php/2009/11/grails-bootstrap-based-on-environment/</link>
		<comments>http://dominikschuermann.de/index.php/2009/11/grails-bootstrap-based-on-environment/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 03:25:54 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Bootstrap]]></category>

		<guid isPermaLink="false">http://dominikschuermann.de/?p=43</guid>
		<description><![CDATA[One problem you face when deploying a grails application is the Bootstrap file. In development you want to fill the database with test data everytime you launch your grails application. But in production environment when the application is running on the server only some of those entries should be filled in database and this should [...]]]></description>
			<content:encoded><![CDATA[<p>One problem you face when deploying a grails application is the Bootstrap file. In development you want to fill the database with test data everytime you launch your grails application. But in production environment when the application is running on the server only some of those entries should be filled in database and this should only be done once after the first deploy. This little and simple concept takes care of these problems.</p>
<p>First you need to import the Environment package:</p>

<div class="wp_codebox"><table><tr id="p4386"><td class="code" id="p43code86"><pre class="groovy" style="font-family:monospace;"><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20import"><span style="color: #000000; font-weight: bold;">import</span></a> grails.<span style="color: #006600;">util</span>.<a href="http://www.google.de/search?as_q=Environment&amp;num=100&amp;hl=en&amp;as_occt=url&amp;as_sitesearch=java.sun.com%2Fj2se%2F1%2E5%2E0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Environment</span></a></pre></td></tr></table></div>

<p>In the Bootstrap class you can now make environment specific calls:</p>

<div class="wp_codebox"><table><tr id="p4387"><td class="code" id="p43code87"><pre class="groovy" style="font-family:monospace;"><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> init <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span> servletContext <span style="color: #66cc66;">-&gt;</span>
  <span style="color: #808080; font-style: italic;">/* Environment specific bootstrap */</span>
  <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span><a href="http://www.google.de/search?as_q=Environment&amp;num=100&amp;hl=en&amp;as_occt=url&amp;as_sitesearch=java.sun.com%2Fj2se%2F1%2E5%2E0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Environment</span></a>.<span style="color: #006600;">current</span> <span style="color: #66cc66;">==</span> <a href="http://www.google.de/search?as_q=Environment&amp;num=100&amp;hl=en&amp;as_occt=url&amp;as_sitesearch=java.sun.com%2Fj2se%2F1%2E5%2E0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Environment</span></a>.<span style="color: #006600;">PRODUCTION</span> <span style="color: #66cc66;">||</span>
    <a href="http://www.google.de/search?as_q=Environment&amp;num=100&amp;hl=en&amp;as_occt=url&amp;as_sitesearch=java.sun.com%2Fj2se%2F1%2E5%2E0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Environment</span></a>.<span style="color: #006600;">current</span> <span style="color: #66cc66;">==</span> <a href="http://www.google.de/search?as_q=Environment&amp;num=100&amp;hl=en&amp;as_occt=url&amp;as_sitesearch=java.sun.com%2Fj2se%2F1%2E5%2E0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Environment</span></a>.<span style="color: #006600;">TEST</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    productionData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#125;</span>
  <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span><a href="http://www.google.de/search?as_q=Environment&amp;num=100&amp;hl=en&amp;as_occt=url&amp;as_sitesearch=java.sun.com%2Fj2se%2F1%2E5%2E0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Environment</span></a>.<span style="color: #006600;">current</span> <span style="color: #66cc66;">==</span> <a href="http://www.google.de/search?as_q=Environment&amp;num=100&amp;hl=en&amp;as_occt=url&amp;as_sitesearch=java.sun.com%2Fj2se%2F1%2E5%2E0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Environment</span></a>.<span style="color: #006600;">DEVELOPMENT</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    productionData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
    developmentData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> destroy <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20private"><span style="color: #000000; font-weight: bold;">private</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> productionData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #808080; font-style: italic;">// production data goes here...</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20private"><span style="color: #000000; font-weight: bold;">private</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> developmentData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #808080; font-style: italic;">// test data goes here...</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>The second problem can now easily be solved. Production data should only be loaded once into the database, so simply test if there is already any of this data existing. As an example when using the Acegi Security plugin, you have to fill the database once with the roles:</p>

<div class="wp_codebox"><table><tr id="p4388"><td class="code" id="p43code88"><pre class="groovy" style="font-family:monospace;"><a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20private"><span style="color: #000000; font-weight: bold;">private</span></a> <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> productionData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
  <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span>Role.<span style="color: #006600;">findByAuthority</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ROLE_USER&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">/* default roles */</span>
    <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Role<span style="color: #66cc66;">&#40;</span>authority : <span style="color: #ff0000;">&quot;ROLE_USER&quot;</span>, description : <span style="color: #ff0000;">&quot;User&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">save</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #808080; font-style: italic;">// other roles...</span>
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>This is a very simple concept but it just works&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://dominikschuermann.de/index.php/2009/11/grails-bootstrap-based-on-environment/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

