Search Results: "Bernd Zeimetz"

22 May 2007

Bernd Zeimetz: playing german lotto

playing german lotto update: sorry for the broken feed, I hope I ve kicked this piece of php hard enough so it works as it s supposed to work. Tomorrow I ll replace it by something maintainable, written in python. Stefano, I have no clue how the lottery in Italy works, but I ll play the numbers generated by this little program on Wednesday and Saturday:
#!/usr/bin/python
 
numbers = ["09", "F9", "11", "02", "9D", "74", "E3", "5B",
           "D8", "41", "56", "C5", "63", "56", "88", "C0"]
 
#in germany all lotto numbers x must be 1 <= x <= 49
numbers_int = [ (int(num, 16) % 49) + 1 for num in numbers ]
 
#unfortunately 16 numbers are not enough for 3 fields in
#the german lottery, so let's add the current year
#(of course, you can add 2 other numbers, if you don't like this year)
numbers_int += [20, 07]
 
print "your numbers for the german lotto:"
print numbers_int[0:6], numbers_int[6:12], numbers_int[12:18]

21 May 2007

Bernd Zeimetz: hi, planet // iso8859-15 to utf8 with netatalk magic

<div xmlns='http://www.w3.org/1999/xhtml'> <h1><a name="hi_planet_iso8859-15_to_utf8_with_netatalk_magic" id="hi_planet_iso8859-15_to_utf8_with_netatalk_magic">hi, planet // iso8859-15 to utf8 with netatalk magic</a></h1> <p> <em><strong>Hi, Planet!</strong> <br/> Welcome to my blog, and thanks to <a href="http://blog.zobel.ftbfs.de/" title="http://blog.zobel.ftbfs.de/" rel="nofollow">Martin</a> for subscribing me. I m not going to bother you with any details about me, if you have any questions feel free to ask me on <a href="http://freenode.net/" title="http://freenode.net/" rel="nofollow">freenode</a> or <a href="http://www.oftc.net/" title="http://www.oftc.net/" rel="nofollow">oftc</a> (in case you re wondering: my nick is bzed).</em> <br/> <br/> After a longer time of planning we ve upgraded our main file server at <a href="http://www.architektur.tu-darmstadt.de" title="http://www.architektur.tu-darmstadt.de" rel="nofollow">work</a>: New machine, new storage (7TB - woohoo!), Etch instead of Sarge and <a href="http://en.wikipedia.org/wiki/UTF-8" title="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> for file names instead of <a href="http://en.wikipedia.org/wiki/ISO8859-15" title="http://en.wikipedia.org/wiki/ISO8859-15">ISO8859-15</a>. Everything not a too complicated thing, except for renaming the about 10,000,000 files from ISO8859-15 to UTF-8 in a proper way. <br/> In theory this is easy, as <a href="http://packages.debian.org/unstable/utils/convmv" title="http://packages.debian.org/unstable/utils/convmv" rel="nofollow">convmv</a> happily takes care of the problem. But this did not work for us unfortunately, as we re not only providing NFS and Samba services, but also AFP (<a href="http://en.wikipedia.org/wiki/Apple_Filing_Protocol" title="http://en.wikipedia.org/wiki/Apple_Filing_Protocol">Apple_Filing_Protocol</a>) via netatalk. Years ago you had to choose ISO8859-15 if you wanted to allow your Apple and Windows users to see the same, non-broken file names - not only because AFP didn t support UTF8 before version 3, which came out with OSX<a href="#fn__1" name="fnt__1" id="fnt__1">1)</a>. Normally you d think that a server would not allow a client to write a file with a file name which includes not supported characters - again, OSX and netatalk go their own way here:<br/> Characters which are not supported by the underlying file system are character(!)-wise encoded using the <a href="http://netatalk.sourceforge.net/2.0/htmldocs/configuration.html#id2898845" title="http://netatalk.sourceforge.net/2.0/htmldocs/configuration.html#id2898845" rel="nofollow">CAP encoding</a>. So we had to find a way to </p> <ul> <li> convert file names from ISO8859-15 to UTF-8 </li> <li> replace CAP encoded characters by the appropriate UTF-8 character </li> </ul> <p> Luckily netatalk ships the <a href="http://netatalk.sourceforge.net/2.0/htmldocs/uniconv.1.html" title="http://netatalk.sourceforge.net/2.0/htmldocs/uniconv.1.html" rel="nofollow">uniconv(1)</a> util<a href="#fn__2" name="fnt__2" id="fnt__2">2)</a> which is able to take care of this problem. It also updates the CNID<a href="#fn__3" name="fnt__3" id="fnt__3">3)</a> Database at the same time. There s two things you need to take care of in case you re using the dbd <a href="http://netatalk.sourceforge.net/2.0/htmldocs/configuration.html#CNID-backends" title="http://netatalk.sourceforge.net/2.0/htmldocs/configuration.html#CNID-backends" rel="nofollow">CNID backend</a>: </p> <ul> <li> uniconv assumes that <em>cnid_metad</em> is listening on port 4700, you need to start it first. Don t run afpd at the same time! </li> <li> If you ve specified external CNID dbpaths in your <em>AppleVolumes.default</em> (normally they re located in the root of each volume, prone to be deleted by users accidentally), you need to move the .AppleDB directory into your volume s root directory, otherwise uniconv will create a new CNID database. Just move it back as soon as uniconv is finished. </li> </ul> <p> Be careful: uniconv assumes that all colons in a file name are part of a CAP encoded character. That s not a problem as long as you have only Mac and Windows clients accessing your server, as both systems do not allow colons in file names. In our case we found a number of cache files from Nautilus (which is running on our sunray/Solaris web-surf terminals as default browser) with colons in the file name. I hope no user will miss them <img src="http://bzed.de/lib/images/smileys/icon_wink.gif" alt=";-)" /> </p> <p> Including a final synchronisation of all files to the new storage, about two hours it took uniconv to convert the file names and a aunch break, we were finished after about 14 hours of work. Until now it seems that our users didn t notice the change at all, except for those who realized that they have much more free space now. Looks like a successful weekend so far! <img src="http://bzed.de/lib/images/smileys/icon_biggrin.gif" alt=":-D" /> </p> <p> <strong>update:</strong> full html in the feed. </p> <div class="tags"><span> <a href="http://bzed.de/tags/debian" class="wikilink1" title="tags:debian" rel="tag">debian</a>, <a href="http://bzed.de/tags/linux" class="wikilink1" title="tags:linux" rel="tag">linux</a> </span></div> <a href="#fnt__1" id="fn__1" name="fn__1">1)</a> and uses a NFD variant of Unicode normalization (<a href="http://en.wikipedia.org/wiki/UTF-8%23Mac_OS_X" title="http://en.wikipedia.org/wiki/UTF-8%23Mac_OS_X">UTF-8#Mac_OS_X</a>), but netatalk takes care of this and translates it into the NFC form, which is used on most other platforms <a href="#fnt__2" id="fn__2" name="fn__2">2)</a> it s called netatalk-uniconv in Debian and shipped with <a href="http://packages.debian.org/stable/net/netatalk" title="http://packages.debian.org/stable/net/netatalk" rel="nofollow">netatalk</a> <a href="#fnt__3" id="fn__3" name="fn__3">3)</a> Catalog Node ID, another crust from old Mac <acronym title="Operating System">OS</acronym> versions </div>

3 April 2007

Martin F. Krafft: Zimbra in Debian

Eddy, so can we get Zimbra into Debian? Please, someone package it alright, if the licence is DFSG-compatible (I have not checked). If it's not, I think we should coerce the developers into making it such. After all, we're Debian. NP: Emerson, Lake & Palmer / Welcome back my Friends to the Show that never Ends (Disc 1) Update: Bernd Zeimetz replied with bad news. Or rather a challenge?

Next.

Previous.