Articles in Category "Programming"

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 […]

Einige Bemerkungen zur neuen Webseite des Verkehrsverbundes Rhein-Neckar GmbH (VRN)

Einleitung Ich bin selbstständiger Web-Entwickler und bin immmer auf der Suche nach interessanten Fallbeispielen, und zwar nicht nur nach den Gelungenen sondern auch nach den Problematischen. Heute möchte ich ein Beispiel für Letztere aus meinem persönlichen Erfahrungsbereich präsentieren. Als zahlender Kunde freut es mich zwar, dass der öffentliche Verkehrsverbund der Region, VRN GmbH sich zu […]

I18n of Bourne Shell Scripts Using “gettext.sh”

This article shows how to make a Bourne Shell script translatable by means of the “gettext” toolchain and how it then operates with natural language strings translated into the user’s language.

“jack-autostart” – Setup and Start Scripts for jackd

“jack-autostart” is essentially a start script (I use it for my XFCE sessions) that starts „jackd“ with appropriate command line parameters and configures as many applications as possible to route playback to the JACK service. For this purpose, redirect all ALSA playback to JACK, and set JACK as default audiosink/-source for GStreamer.

Adding Custom Format Buttons To tinyMCE in WordPress 4

Introduction In my technical articles I sometimes use inline fragments typed in a monospace font to highlight code or filenames that appear within floating paragraph text. Back in the days I did this with the <tt> element, nowadays I use <span class=”tt”> and a CSS style like .tt { font-family: monospace; } I wanted to […]

PHP HTTPS Streams: Explicitly Using A CA For Verification

When I tried setting my Owncloud Calendar’s ICS export URL (which uses HTTPS) as a calendar import URL in Dolibarr (currently installed are Owncloud 8.0 and Dolibarr from the version 3.6.2-3 Debian package), Dolibarr gave me these errors (taken from the error.log of the webserver, with some additional formatting): PHP Warning: file(): SSL operation failed […]

Determining The Playtime In Seconds from an OGG Vorbis File

Problem To determine the runtime in integer seconds (not including a fractional amount) of a given audio file in format OGG-Vorbis. This value is required, for example, in the EXTM3U syntax. Solution 1. Install package vorbis-tools 2. Define this shell function: ogglength() { LANG=C ogginfo “$1” | perl -ne ‘ BEGIN { $rv = 1; […]

Support For Multiple Languages in WordPress

Introduction Foreign visitors have pointed out to me that they sometimes read my blog using translation functions in their their webbrowsing software, most notably “Google Translate” which is directly built into Google Chrome. That translation function does a good job, but sometimes produces oddities, for example it attempts to translate my lastname, which is also […]