Artikel in Kategorie "Programmierung"

Bourne to Bourne Again Shell Forward Compatibility

Introduction In this article i try to find out, if Bourne Shell scripts are runnable in Bourne Again Shell without modification. If not, i advice on how to modify the code so that it runs on both Shells. An interpreter for some variant of Bourne Shell is available as an executable /bin/sh on most Linux […]

Comparing Distinguished LDAP Names

In a Bourne Shell script, a distinguished name (DN) for performing an LDAP-query is held in a variable: dn=“cn=Malmø,ou=County Capitals,dc=Sweden,dc=Europe“ For the purpose of demonstration, this example DN contains a non-ASCII character. Let’s write a Bourne Shell function that escapes such special characters as requested by RFC 4514 using perl’s Net::LDAP::Util: canonical_dn() { perl -s […]

Drawing a Yellow Rectangle on Android

As an addendum to my previous article, there now also is an Android App „YellowRectangle“ that draws a yellow rectangle and terminates on the first touch event. It runs on Android version 4.0.3 (Ice Cream Sandwich MR1) and upward. It is written in Java and C++ and uses the Allegro game development library (

Drawing A Yellow Rectangle

Premise On the weekend i wanted to perform the task of drawing a yellow rectangle programmatically onto the screen of a Personal Computer: The program would feature a viewport that occupies the entirety of the primary display of the PC. On the viewport, 640 pixels could be adressed in width, 480 in height. The viewport […]

Auf macOS HTTP(S) ohne Entwickler-Werkzeuge protokollieren

Die Browser-Entwicklerwerkzeuge sind nett, aber der Netzwerktraffic-Reiter hat (insbesondere bei FF) ein Problem, er reisst die Performance so weit runter, dass einem das Gesicht einschläft. Auf macOS verwende ich „mitmproxy“, um HTTP und HTTPS zwischen Browser und Server zu protokollieren. Das Verfahren erfordert die Installation von „homebrew“ (ein Paket-Manager für macOS) und damit dann „mitmproxy“ […]

xdraw 1.1

I was very pleased to notice that my small Xlib-utility xdraw has made it across the years unscathed. It compiled after 11 years of complete lack of code or build system maintenance. Hail to the stability of the X Library! However, i found the visual quality of the drawing results a bit lacking – the […]

Angepasstes Bootstrap-CSS selbst erstellen

1. NodeJS und npm installieren. Wie das geht, hängt vom Betriebssystem ab. Auf jeden Fall sollte man ein möglichst aktuelles NodeJS verwenden. Ich habe das folgende Verfahren mit v7.8.0 durchgeführt. 2. grunt-cli installieren. ~$ npm install -g grunt-cli 3. Aktuellen (stabilen) Source von bootstrap holen. ~$ git clone ~$ cd bootstrap bootstrap$ git checkout […]

Producing salted Password Hashes using the MD5 Algorithm

As an exercise in password storage i implemented a PHP function that takes a UTF-8 encoded Unicode cleartext, generates a random salt and produces a password hash using the MD5 algorithm. Please note that this is just an exercise and should not be used in production. This code has not been properly tested and has […]