<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>wulfovitch.net</title>
 <link href="http://wulfovitch.net/atom.xml" rel="self"/>
 <link href="http://wulfovitch.net/"/>
 <updated>2010-05-10T23:27:42+02:00</updated>
 <id>http://wulfovitch.net/</id>
 <author>
   <name>Wolfgang König</name>
 </author>
 
 
 <entry>
   <title>iTunes Connect and Umlauts</title>
   <link href="http://wulfovitch.net/2010/05/iTunes-Connect-and-Umlauts/"/>
   <updated>2010-05-04T17:08:00+02:00</updated>
   <id>http://wulfovitch.net/2010/05/iTunes-Connect-and-Umlauts</id>
   <content type="html">&lt;p&gt;Apple is a american centric company, otherwise it is not explainable that you can get a lot problems if your name does not consist solely of ASCII letters. My last name - König - contains a so called umlaut: an &amp;#8220;ö&amp;#8221;. Everytime apple posts a new license agreement to the developers, the developer has to accept this new license agreement if he wants to continue to develope applications for the iPhone. This agreement affects also the iTunes Connect portal. The iTunes Connect portal is the place where the developer can manage his applications which he wants to put on the app store.&lt;/p&gt;

&lt;p&gt;And here the problem begins: if the developer accepts a new agreement in the developer portal, the status of this new agreement &amp;#8220;should&amp;#8221; also be updated in the iTunes Connect portal. It doesn&amp;#8217;t, if your name does contains umlauts like my last name does. The developer portal states that I have accepted the new license agreement, the iTunes Connect portal doesn&amp;#8217;t. The consequence is, everytime apple posts a new license agreement, I have to contact the iTunes Connect support and have to wait until they set the correct bit in their database manually. This happened to me already five or six times and it is starting to get annoying as you can think.&lt;/p&gt;

&lt;p&gt;Now I have noticed that &lt;a href='http://photocontrol.net/'&gt;my application&lt;/a&gt; in the app store has been dropped silently, because iTunes Connect thinks, I haven&amp;#8217;t accepted the new license agreement. I don&amp;#8217;t even know for how long the application isn&amp;#8217;t available in the app store anymore, because apple gave me no indication that it isn&amp;#8217;t. It is really embarrassing for a huge company like apple, that they can&amp;#8217;t even handle encodings correctly in their developer portal and moreover they should sent out status messages to the developer if the availability of an app in the app store changes.&lt;/p&gt;

&lt;h4 id='update__10_may_2010'&gt;Update - 10 May 2010&lt;/h4&gt;

&lt;p&gt;It took Apple six days to resolve the problem. Now &lt;a href='http://photocontrol.net/'&gt;my application&lt;/a&gt; is available again in the app store. At least this has happened automatically.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Jekylless</title>
   <link href="http://wulfovitch.net/2010/02/Jekylless/"/>
   <updated>2010-02-16T21:33:00+01:00</updated>
   <id>http://wulfovitch.net/2010/02/Jekylless</id>
   <content type="html">&lt;p&gt;&lt;a href='http://tatey.com'&gt;Tate Johnson&lt;/a&gt; recently created his own fork of &lt;a href='http://github.com/mojombo/jekyll'&gt;Jekyll&lt;/a&gt; named &lt;a href='http://tatey.com/2009/12/05/forking-jekyll-now-with-less-and-growl-notifications/'&gt;tatey-jekyll&lt;/a&gt;. He added the support for &lt;a href='http://lesscss.org/'&gt;LESS CSS&lt;/a&gt; and growl notifications to it. I liked the idea and merged the latest changes from Jekyll into his fork.&lt;/p&gt;

&lt;p&gt;While I was at it, I also added the support for specifying the concrete time for a blog post in the yaml from matter. Whenever do you publish blog posts at twelve o&amp;#8217;clock at night?&lt;/p&gt;

&lt;p&gt;Tate liked the changes I made and we&amp;#8217;ve agreed that we will continue to develope this fork under the name &lt;a href='http://github.com/tatey/jekylless'&gt;Jekylless&lt;/a&gt;. The name Jekylless was chosen to show the projects&amp;#8217; support for LESS CSS.&lt;/p&gt;

&lt;p&gt;We both will integrate a few more features into this fork, but we&amp;#8217;ve decided to stay as close as possible to the codebase of the original Jekyll, so that switching to our fork should be easy for every existing jekyll user.&lt;/p&gt;

&lt;p&gt;For more information about Jekylless, checkout the &lt;a href='http://github.com/tatey/jekylless'&gt;readme&lt;/a&gt; of the project on github or install the &lt;a href='http://gemcutter.org/gems/jekylless'&gt;Jekylless gem&lt;/a&gt; directly.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Dropzone SCP Script with Gallery Creation</title>
   <link href="http://wulfovitch.net/2010/01/Dropzone-SCP-Script-with-Gallery-Creation/"/>
   <updated>2010-01-21T21:34:00+01:00</updated>
   <id>http://wulfovitch.net/2010/01/Dropzone-SCP-Script-with-Gallery-Creation</id>
   <content type="html">&lt;p&gt;&lt;a href='http://aptonic.com/' title='Dropzone'&gt;Dropzone&lt;/a&gt; is a great tool for all your drag &amp;amp; drop needs on a OS X system. Also cool about dropzone is, that you can extend it to your personal needs. I&amp;#8217;ve always wanted a tiny little helper where I can drop my files onto. A gallery should automatically be created from these files and this gallery should be uploaded to my webspace afterwards. This kind of script would especially be useful if I wanted to show a friend some pictures rather quickly. I&amp;#8217;ve never found a really good working solution for this on the web. At the end, I&amp;#8217;ve created this dropzone script which does what I needed:&lt;/p&gt;
&lt;p style='text-align: center'&gt;
&lt;object data='http://www.youtube.com/v/O5Njv9x6Glo' type='application/x-shockwave-flash' height='385' width='480'&gt;&lt;param name='movie' value='http://www.youtube.com/v/O5Njv9x6Glo' /&gt;&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;This script takes care of a few things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If there is more than one file dropped onto the script, a gallery is created automatically.&lt;/li&gt;

&lt;li&gt;Big pictures are being resized to a reasonable size.&lt;/li&gt;

&lt;li&gt;Files which are not pictures are only getting linked to.&lt;/li&gt;

&lt;li&gt;You can enter a name for the gallery, if you are pressing the &amp;#8216;Control&amp;#8217; key when dropping the files.&lt;/li&gt;

&lt;li&gt;After the upload, the url of the file or the gallery is pasted to the clipboard.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You need to have &lt;a href='http://www.imagemagick.org' title='ImageMagick'&gt;ImageMagick&lt;/a&gt; installed, if you want to get the resizing to work. The easiest way to install it, is via &lt;a href='http://www.macports.org/' title='MacPorts'&gt;MacPorts&lt;/a&gt; and the following terminal command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo port install ImageMagick&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you don&amp;#8217;t have ImageMagick installed, the pictures will be uploaded as is without resizing.&lt;/p&gt;

&lt;p&gt;You can obtain the script at &lt;a href='http://github.com/aptonic/dropzone-user-scripts/blob?path%5B%5D=SCP+Upload+with+Gallery.dropzone&amp;amp;raw=true' title='Obtain the script at github'&gt;github&lt;/a&gt; or &lt;a href='/scripts/SCP-Gallery.zip' title='SCP Upload Script with Gallery'&gt;download it here&lt;/a&gt;.&lt;/p&gt;

&lt;h4 id='update'&gt;Update&lt;/h4&gt;

&lt;p&gt;The script resides now at the official &lt;a href='http://github.com/aptonic/dropzone-user-scripts'&gt;dropzone user scripts repository&lt;/a&gt;, too!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>LaTeX Compile Script</title>
   <link href="http://wulfovitch.net/2009/12/LaTeX-Compile-Script/"/>
   <updated>2009-12-22T17:19:00+01:00</updated>
   <id>http://wulfovitch.net/2009/12/LaTeX-Compile-Script</id>
   <content type="html">&lt;p&gt;I am dealing with a lot of LaTeX documents lately. The need to compile every tex document at least two times is really annoying. And if you also have to use bibtex, then it gets real cumbersome to compile all the appropriate files properly. Though I have written this small ruby script, which takes care of all the files and compiles them in the correct order:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='ruby'&gt;&lt;span class='c1'&gt;#!/usr/bin/env ruby&lt;/span&gt;
&lt;span class='c1'&gt;# default values&lt;/span&gt;
&lt;span class='n'&gt;compileCount&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='mi'&gt;3&lt;/span&gt;
&lt;span class='n'&gt;open_latex_document&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='kp'&gt;false&lt;/span&gt;

&lt;span class='k'&gt;def&lt;/span&gt; &lt;span class='nf'&gt;outputErrorMessage&lt;/span&gt;
  &lt;span class='nb'&gt;puts&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;Too many parameters...&amp;quot;&lt;/span&gt;
  &lt;span class='nb'&gt;puts&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;Usage: &amp;#39;rubylatex.rb anylatexfile.tex [compilecountnumber]&amp;#39;&amp;quot;&lt;/span&gt;
  &lt;span class='nb'&gt;puts&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;where [compilecountnumber] is a number greater than 0&amp;quot;&lt;/span&gt;
&lt;span class='k'&gt;end&lt;/span&gt;

&lt;span class='c1'&gt;# check arguments&lt;/span&gt;
&lt;span class='k'&gt;if&lt;/span&gt; &lt;span class='no'&gt;ARGV&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;count&lt;/span&gt; &lt;span class='o'&gt;==&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;
  &lt;span class='n'&gt;latexfile&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='no'&gt;ARGV&lt;/span&gt;&lt;span class='o'&gt;[&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='o'&gt;]&lt;/span&gt;
&lt;span class='k'&gt;elsif&lt;/span&gt; &lt;span class='no'&gt;ARGV&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;count&lt;/span&gt; &lt;span class='o'&gt;==&lt;/span&gt; &lt;span class='mi'&gt;2&lt;/span&gt; &lt;span class='o'&gt;||&lt;/span&gt; &lt;span class='no'&gt;ARGV&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;count&lt;/span&gt; &lt;span class='o'&gt;==&lt;/span&gt; &lt;span class='mi'&gt;3&lt;/span&gt;
  &lt;span class='n'&gt;latexfile&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='no'&gt;ARGV&lt;/span&gt;&lt;span class='o'&gt;[&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='o'&gt;]&lt;/span&gt;
  &lt;span class='n'&gt;compileCount&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='no'&gt;ARGV&lt;/span&gt;&lt;span class='o'&gt;[&lt;/span&gt;&lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='o'&gt;].&lt;/span&gt;&lt;span class='n'&gt;to_i&lt;/span&gt;
  
  &lt;span class='c1'&gt;# check if compileCount has a reasonable value&lt;/span&gt;
  &lt;span class='k'&gt;if&lt;/span&gt; &lt;span class='n'&gt;compileCount&lt;/span&gt; &lt;span class='o'&gt;&amp;lt;&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt; &lt;span class='o'&gt;||&lt;/span&gt; &lt;span class='n'&gt;compileCount&lt;/span&gt; &lt;span class='o'&gt;&amp;gt;&lt;/span&gt; &lt;span class='mi'&gt;5&lt;/span&gt;
    &lt;span class='n'&gt;outputErrorMessage&lt;/span&gt;
    &lt;span class='nb'&gt;exit&lt;/span&gt;
  &lt;span class='k'&gt;end&lt;/span&gt;
  
  &lt;span class='c1'&gt;# open the latex document if a third parameter has been detected&lt;/span&gt;
  &lt;span class='k'&gt;if&lt;/span&gt; &lt;span class='no'&gt;ARGV&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;count&lt;/span&gt; &lt;span class='o'&gt;==&lt;/span&gt; &lt;span class='mi'&gt;3&lt;/span&gt;
    &lt;span class='n'&gt;open_latex_document&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='kp'&gt;true&lt;/span&gt;
  &lt;span class='k'&gt;end&lt;/span&gt;
&lt;span class='k'&gt;else&lt;/span&gt;
  &lt;span class='n'&gt;outputErrorMessage&lt;/span&gt;
  &lt;span class='nb'&gt;exit&lt;/span&gt;
&lt;span class='k'&gt;end&lt;/span&gt;

&lt;span class='c1'&gt;# filename without file type extension&lt;/span&gt;
&lt;span class='n'&gt;filebasename&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='no'&gt;File&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;basename&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;&lt;/span&gt;&lt;span class='si'&gt;#{&lt;/span&gt;&lt;span class='n'&gt;latexfile&lt;/span&gt;&lt;span class='si'&gt;}&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='s1'&gt;&amp;#39;.tex&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;

&lt;span class='c1'&gt;# compile latex file at least one time &lt;/span&gt;
&lt;span class='n'&gt;sout&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;pdflatex &lt;/span&gt;&lt;span class='si'&gt;#{&lt;/span&gt;&lt;span class='n'&gt;latexfile&lt;/span&gt;&lt;span class='si'&gt;}&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;

&lt;span class='c1'&gt;# create bibtex files&lt;/span&gt;
&lt;span class='k'&gt;if&lt;/span&gt; &lt;span class='n'&gt;sout&lt;/span&gt;
  &lt;span class='n'&gt;sout&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;bibtex &amp;quot;&lt;/span&gt;&lt;span class='o'&gt;+&lt;/span&gt;&lt;span class='n'&gt;filebasename&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='k'&gt;end&lt;/span&gt;

&lt;span class='c1'&gt;# compile latex files a few times more&lt;/span&gt;
&lt;span class='k'&gt;if&lt;/span&gt; &lt;span class='n'&gt;sout&lt;/span&gt; &lt;span class='o'&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class='n'&gt;compileCount&lt;/span&gt; &lt;span class='o'&gt;&amp;gt;&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;
  &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='mi'&gt;2&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;.compileCount&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;each&lt;/span&gt; &lt;span class='k'&gt;do&lt;/span&gt; &lt;span class='o'&gt;|&lt;/span&gt;&lt;span class='n'&gt;i&lt;/span&gt;&lt;span class='o'&gt;|&lt;/span&gt;
    &lt;span class='k'&gt;if&lt;/span&gt; &lt;span class='n'&gt;sout&lt;/span&gt;
      &lt;span class='n'&gt;sout&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;pdflatex &lt;/span&gt;&lt;span class='si'&gt;#{&lt;/span&gt;&lt;span class='n'&gt;latexfile&lt;/span&gt;&lt;span class='si'&gt;}&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
    &lt;span class='k'&gt;end&lt;/span&gt;
  &lt;span class='k'&gt;end&lt;/span&gt;
&lt;span class='k'&gt;end&lt;/span&gt;

&lt;span class='c1'&gt;# cleanup&lt;/span&gt;
&lt;span class='nb'&gt;puts&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;#### cleaning up! ####&amp;quot;&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.log&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.aux&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.aux.bak&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.toc&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.out&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.idx&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.blg&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.bbl&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.nlo&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.lot&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.lof&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.tcp&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.tps&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.brs&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
&lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf *.brf&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;

&lt;span class='c1'&gt;# pdf successfully generated&lt;/span&gt;
&lt;span class='k'&gt;if&lt;/span&gt; &lt;span class='n'&gt;sout&lt;/span&gt;
  &lt;span class='nb'&gt;puts&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;#### done! &lt;/span&gt;&lt;span class='si'&gt;#{&lt;/span&gt;&lt;span class='n'&gt;filebasename&lt;/span&gt;&lt;span class='si'&gt;}&lt;/span&gt;&lt;span class='s2'&gt;.pdf is ready! ####&amp;quot;&lt;/span&gt;
  &lt;span class='k'&gt;if&lt;/span&gt; &lt;span class='n'&gt;open_latex_document&lt;/span&gt;
    &lt;span class='nb'&gt;puts&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;#### opening &lt;/span&gt;&lt;span class='si'&gt;#{&lt;/span&gt;&lt;span class='n'&gt;filebasename&lt;/span&gt;&lt;span class='si'&gt;}&lt;/span&gt;&lt;span class='s2'&gt;.pdf now! ####&amp;quot;&lt;/span&gt;
    &lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;open &lt;/span&gt;&lt;span class='si'&gt;#{&lt;/span&gt;&lt;span class='n'&gt;filebasename&lt;/span&gt;&lt;span class='si'&gt;}&lt;/span&gt;&lt;span class='s2'&gt;.pdf&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
  &lt;span class='k'&gt;end&lt;/span&gt;
&lt;span class='k'&gt;else&lt;/span&gt;
  &lt;span class='c1'&gt;# failed pdf generation&lt;/span&gt;
  &lt;span class='nb'&gt;system&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;rm -rf &lt;/span&gt;&lt;span class='si'&gt;#{&lt;/span&gt;&lt;span class='n'&gt;filebasename&lt;/span&gt;&lt;span class='si'&gt;}&lt;/span&gt;&lt;span class='s2'&gt;.pdf&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
  &lt;span class='nb'&gt;puts&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;#### failed! no pdf generated!!! ####&amp;quot;&lt;/span&gt;
&lt;span class='k'&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;The script is a little bit bloated, but it gets the job done and it even takes care of deleting all the temporary files which are created during the compiling process.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Change Terminal Colors on Remote Connections</title>
   <link href="http://wulfovitch.net/2009/12/change-terminal-colors-on-remote-connections/"/>
   <updated>2009-12-11T10:57:00+01:00</updated>
   <id>http://wulfovitch.net/2009/12/change-terminal-colors-on-remote-connections</id>
   <content type="html">&lt;p&gt;I often use ssh in order to work on remote servers. But often it is hard to tell at first sight, if a open terminal window displays the contents of remote connection or if it is a local one. Therefore it would be nice, if the terminal would automatically switch colors, when a remote connection is detected. On &lt;a href='http://stackoverflow.com/questions/157959/how-do-i-make-the-apple-terminal-window-auto-change-colour-scheme-when-i-ssh-to-a' title='Stack Overflow: How do I make the apple terminal window auto change colour scheme'&gt;Stack Overflow&lt;/a&gt; I found a solution for Terminal.app on OS X, which I adapted and improved a little bit:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='bash'&gt;&lt;span class='c'&gt;#!/bin/sh&lt;/span&gt;
&lt;span class='nv'&gt;HOSTNAME&lt;/span&gt;&lt;span class='o'&gt;=&lt;/span&gt;&lt;span class='sb'&gt;`&lt;/span&gt;&lt;span class='nb'&gt;echo&lt;/span&gt; &lt;span class='nv'&gt;$@&lt;/span&gt; | sed s/.*@//&lt;span class='sb'&gt;`&lt;/span&gt;

&lt;span class='c'&gt;# define background colors&lt;/span&gt;
&lt;span class='nv'&gt;BLACK_BG&lt;/span&gt;&lt;span class='o'&gt;=&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;{0, 0, 0, 50000}&amp;quot;&lt;/span&gt;
&lt;span class='nv'&gt;GREY_BG&lt;/span&gt;&lt;span class='o'&gt;=&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;{10000, 10000, 10000, 50000}&amp;quot;&lt;/span&gt;
&lt;span class='nv'&gt;RED_BG&lt;/span&gt;&lt;span class='o'&gt;=&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;{10000, 0, 0, 50000}&amp;quot;&lt;/span&gt;

&lt;span class='c'&gt;# define font colors&lt;/span&gt;
&lt;span class='nv'&gt;GREEN&lt;/span&gt;&lt;span class='o'&gt;=&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;{0, 65535, 0}&amp;quot;&lt;/span&gt;
&lt;span class='nv'&gt;LIGHT_GREY&lt;/span&gt;&lt;span class='o'&gt;=&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;{55000, 55000, 55000}&amp;quot;&lt;/span&gt;


set_bg &lt;span class='o'&gt;()&lt;/span&gt; &lt;span class='o'&gt;{&lt;/span&gt;
  osascript -e
  &lt;span class='s2'&gt;&amp;quot;tell application \&amp;quot;Terminal\&amp;quot; to set background color of window 1 to $1&lt;/span&gt;
&lt;span class='s2'&gt;   tell application \&amp;quot;Terminal\&amp;quot; to set normal text color of window 1 to $2&amp;quot;&lt;/span&gt;
&lt;span class='o'&gt;}&lt;/span&gt;

on_exit &lt;span class='o'&gt;()&lt;/span&gt; &lt;span class='o'&gt;{&lt;/span&gt;
  &lt;span class='c'&gt;# set colors back to normal when quitting the remote connection&lt;/span&gt;
  set_bg &lt;span class='s2'&gt;&amp;quot;$BLACK_BG&amp;quot;&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;$GREEN&amp;quot;&lt;/span&gt;
&lt;span class='o'&gt;}&lt;/span&gt;
&lt;span class='nb'&gt;trap &lt;/span&gt;on_exit EXIT

&lt;span class='k'&gt;case&lt;/span&gt; &lt;span class='nv'&gt;$HOSTNAME&lt;/span&gt; in
  &lt;span class='c'&gt;# you can set your production server in your .bash_profile file&lt;/span&gt;
  &lt;span class='c'&gt;# like so: export production1=&amp;quot;example.com&amp;quot;&lt;/span&gt;
  &lt;span class='nv'&gt;$production1&lt;/span&gt;|&lt;span class='nv'&gt;$production2&lt;/span&gt;|&lt;span class='nv'&gt;$production3&lt;/span&gt;&lt;span class='o'&gt;)&lt;/span&gt; set_bg &lt;span class='s2'&gt;&amp;quot;$RED_BG&amp;quot;&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;$LIGHT_GREY&amp;quot;&lt;/span&gt;;;
  *&lt;span class='o'&gt;)&lt;/span&gt; set_bg &lt;span class='s2'&gt;&amp;quot;$GREY_BG&amp;quot;&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;$LIGHT_GREY&amp;quot;&lt;/span&gt; ;;
&lt;span class='k'&gt;esac&lt;/span&gt;

/usr/bin/ssh &lt;span class='s2'&gt;&amp;quot;$@&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;I&amp;#8217;ve put this script into my &lt;code&gt;~/bin/&lt;/code&gt; folder, which is the first place where my scripts are looked up. So don&amp;#8217;t forget to add this folder to your &lt;code&gt;$PATH&lt;/code&gt;. Everytime a remote connection with ssh is started, this script is first called, changes the colors of the terminal and issues the real ssh command.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>About URL-Shorteners</title>
   <link href="http://wulfovitch.net/2009/12/about-url-shorteners/"/>
   <updated>2009-12-06T21:33:00+01:00</updated>
   <id>http://wulfovitch.net/2009/12/about-url-shorteners</id>
   <content type="html">&lt;p&gt;URL-Shorteners are getting popular these days, due twitter&amp;#8217;s 140 character limitation. But what happens behind the scenes, if you are opening a url, created by an url-shortener? The shortener takes the request from the browser, looks up the given value of the short url in the database and redirects the browser to the original site. And here is the point, where the trouble comes in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A short-url is not human-readable and therefore all semantic information is lost. You have no idea, to which url the short-url is leading you to and maybe you are being refered to a site you don&amp;#8217;t wanted to visit at all.&lt;/li&gt;

&lt;li&gt;If the url shortener service is shutdown or not reachable for some reason, you have no idea to what url the short-url was pointing to.&lt;/li&gt;

&lt;li&gt;In some cases, some url-shortening services redirected old short-urls to malware sites or something like that. If you or somebody is looking up some old tweet of you, the short-url has become useless although the original maybe still available.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Short-urls are adding a layer of indirection to the internet, which is not needed in my opinion.&lt;/p&gt;

&lt;h3 id='what_could_twitter_do_about_shorturls'&gt;What could Twitter do about short-urls?&lt;/h3&gt;

&lt;p&gt;People are using url-shorteners, because they are forced to limit themselves to 140 characters. Twitter could implement a different counting mechanism:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A url is counted as 20 characters no matter how long the url is in reality&lt;/li&gt;

&lt;li&gt;Limit the maximum number of urls in a tweet to 3.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By using this behaviour, no one has a real need for short-urls anymore and you will always know, how the real url looks. It should be fairly easy to implement this for twitter, but i think they are not doing this, because people cheat to get more characters in a single by simple typing something like: &amp;#8220;http://and-i-also-wanted-to-say-this-and-that.com&amp;#8221;. In my opinion, this would be acceptable tradeoff if we could get rid of url-shorteners! You could just unfollow the people who are abusing the now legal long urls for something else and you are done.&lt;/p&gt;

&lt;h3 id='my_current_solution'&gt;My current solution&lt;/h3&gt;

&lt;p&gt;Because I don&amp;#8217;t think twitter will solve the problem with url-shorteners in the near future, I have set up &lt;a href='http://wulfi.net/' title='wulfi.net'&gt;my own&lt;/a&gt; with the help of Shaun Inman&amp;#8217;s &lt;a href='http://www.shauninman.com/archive/2009/08/17/less_n' title='lessn'&gt;lessn&lt;/a&gt;. This solution won&amp;#8217;t help to get rid of short-urls, but I am at least no longer dependent of a third party url shortener. I am in control of the short-urls I have posted on twitter and so I will never ever lose a link again, because a short url service abused my trust in their service.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>My New Blog</title>
   <link href="http://wulfovitch.net/2009/11/my-new-blog/"/>
   <updated>2009-11-29T23:12:00+01:00</updated>
   <id>http://wulfovitch.net/2009/11/my-new-blog</id>
   <content type="html">&lt;p&gt;So, this is my new blog. In fact, my only blog before was a posterous account which I used as a blog&lt;sup id='fnref:1'&gt;&lt;a href='#fn:1' rel='footnote'&gt;1&lt;/a&gt;&lt;/sup&gt;. But posterous wasn&amp;#8217;t the blog engine I was looking for, so I finally decided to host the blog by myself. But what blog engine should I use? I could use &lt;a href='http://wordpress.org' title='Wordpress blog engine'&gt;WordPress&lt;/a&gt; like everyone else does. There is nothing wrong with WordPress, but it doesn&amp;#8217;t fit my personal requirements. These requirements are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I don&amp;#8217;t want to use a blog system where I have to take care of updating the blog engine itself constantly. In most cases, this is the case, when a new security hole was discovered.&lt;/li&gt;

&lt;li&gt;I don&amp;#8217;t want to fiddle around with plugins or something like that to get something running.&lt;/li&gt;

&lt;li&gt;I want to write blog posts in &lt;a href='http://daringfireball.net/projects/markdown/' title='markdown markup language'&gt;markdown&lt;/a&gt;.&lt;/li&gt;

&lt;li&gt;I want a blog engine, which doesn&amp;#8217;t need much resources.&lt;/li&gt;

&lt;li&gt;I want to have syntax highlighting for code snippets.&lt;/li&gt;

&lt;li&gt;I want to be able to backup my blog posts with no special effort.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two months ago, I found out that I wasn&amp;#8217;t alone with these requirements. I stumbled upon &lt;a href='http://github.com/mojombo/jekyll' title='Jekyll Static Site Generator'&gt;jekyll&lt;/a&gt;, a static site generator written in ruby. &amp;#8220;A static site generator? That sounds so like the 90s!&amp;#8221; you may think. But in fact, a static site generator is the perfect system for a blog engine. Think about it, what makes a blog a blog? A blog consists of one or more blog entries, which are all consis of a title, a date and of the text of the blog entry itself. Nothing more. If you write only a few blog posts in a month, the content of the blog itself doesn&amp;#8217;t change very often. A perfect use case for a static site generator! Write the new blog post, generate the site, and upload this site with the tool you want. You don&amp;#8217;t even need a server with special capabilities! The server only needs to serve static html files. So you don&amp;#8217;t even have to worry about a special caching system, because caching is already given with static files!&lt;/p&gt;

&lt;h3 id='advantages_of_jekyll'&gt;Advantages of jekyll&lt;/h3&gt;

&lt;p&gt;With a generated static site, I don&amp;#8217;t have to worry about keeping the blog engine itself up to date. I don&amp;#8217;t have to fiddle around with plugins. With jekyll I can write blogposts in markdown. Syntax highlighting of code is also supported. Every single blog post is saved as a single text file, so I can easily back them up with my version control system of choice, which is &lt;a href='http://git-scm.com/' title='git version control system'&gt;git&lt;/a&gt; by the way. I don&amp;#8217;t have to worry about backing up the database. Because no database is needed at all!&lt;/p&gt;

&lt;h3 id='final_thoughts'&gt;Final thoughts&lt;/h3&gt;

&lt;p&gt;I have now written more than I thought. Perhaps you want to comment to this blog post. This is the only thing, you can&amp;#8217;t support with a static site generator like jekyll. But what you can do, is to host the comments externally. For this purpose I use the &lt;a href='http://disqus.com/' title='Disqus commenting system'&gt;disqus commenting system&lt;/a&gt;, which I think is great, because they handle all the anti-spamming stuff for me. One thing more, I don&amp;#8217;t have to worry about. The less I have to worry about, the more I can be lazy. Which is a good thing, because all good programmers are programmers because they are lazy! ;)&lt;/p&gt;
&lt;div class='footnotes'&gt;&lt;hr /&gt;&lt;ol&gt;&lt;li id='fn:1'&gt;
&lt;p&gt;If you find it, you can keep it! :)&lt;/p&gt;
&lt;a href='#fnref:1' rev='footnote'&gt;&amp;#8617;&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;</content>
 </entry>
 
 
</feed>