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; }
        /Playback length:\s(\d+)m:(\d+)\./ && do {
            print $1*60+$2, "\n";
            $rv = 0;
        };
        END { exit($rv); }
    '
}

3. Use the shell function:

 ~$ ogglength "My File.ogg"
153
 ~$

32bit UEFI Boot on an Intel Baytrail Tablet

Acer Switch 10 (SecureBoot disabled) loading the experimental Debian Installer for 32bit UEFI Boot by Steve McIntyre ([ISO]).

29.01.15 - 1

So far so good, but the Linux itself has only limited driver support, for example, the keyboard of the docking station does not work (a separately attached USB keyboard does work). Wireless network does not work either. Need customized installation medium or wait for the stuff to become upstream.

Managed to save a dmesg via USB storage, see [DMESG].

References:

Ubuntu 14.10 cryptswap1 With LVM Stops Working After Reboot

Today I rebooted an Ubuntu 14.10 that was set up with LVM and encryption.

It was unable to use the encrypted swapspace cryptswap1, which ultimately halted the boot procedure with a prompt (S for skip and M for manual resolution, i.e. single-user-mode prompt).

The problem appears to be that the UUID (blkid) of the designated swap device is lost (destroyed by overwriting). This may not become apparent after the first reboot, because data actually has to be written to the device in order for the problem to appear. At last that is my working hypothesis on why this did not bite me earlier.

Lesen Sie mehr »

Filtering and Rate-Limiting ICMPv6 on a GNU/Linux Server

Introduction

ICMP (Internet Control Message Protocol) in IPv6 is used for a variety of purposes. As opposed to IPv4, support for some of the applications of ICMP by nodes participating in an IPV6 network is mandatory. On the other hand, due to the security-relvant nature of some of the applications, where in IPv4 it may have sufficed to simply allow or disallow all ICMP traffic or certain types of ICMP packages, deeper inspection of ICMP traffic is required in IPv6.

In the following I draft an example of a set of rules for a Linux netfilter firewall on a simple, standalone application server (not a virtualization host).

Lesen Sie mehr »

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 a valid German vocable.

That problem was quickly addressed by adding the class="notranslate" plus the HTML5 language attribute translate="no" to a <span> surrounding my name. But this incident contrasted a deeper problem that has been troubeling me for a while now.

Lesen Sie mehr »

Die Panasonic DMC LX 100 …

… ist eine ziemlich Gute und dafür, dass sie eine Kompakte ist, ohne Übertreibung eine fantastische Kamera. Allerdings ist sie schwer zu bedienen, weil die Menüs und Betriebsmodi ziemlich … „futzelig“ sind. 🙂

Lesen Sie mehr »

POODLE-Angriff auf SSL 3.0 im Webbrowser verhindern

Übersicht:

Die Sicherheitslücke „POODLE“ kann ausgenutzt werden, wenn sowohl Client als auch Server das Protokoll SSL Version 3.0 unterstützen. Also kann der Abgriff verunmöglicht werden, indem man die Unterstützung am Client (in diesem Fall also am Webbrowser) deaktiviert.

In Firefox:

Adresse aufrufen: about:config

Schlüssel suchen: security.tls.version.min

Wert ändern von 0 auf 1

In Internet Explorer:

Internetoptionen -> Erweitert -> Checkbox „SSL 3.0 verwenden“ deaktivieren

Google Chrome:

Die Startverknüfung von Chrome ändern zu

chrome.exe --ssl-version-min=tls1

Eine detaillierte Anleitung mit Screenshots findet sich hier:

Andere Browser:

Apple Safari: Mir ist keine Möglichkeit bekannt. 😀

 

LibreOffice: Disable Typographic Quotes in Preformatted Text

Just so that I will never forget it again, because this now has been the second time that I had to look it up:

For a software manual, I made a paragraph style „Program Code“ that was derived from „Preformatted Text“. The first thing I tried typing in was

10 PRINT "HELLO WORLD"
20 GOTO 10

LibreOffice 4 (like OpenOffice) has „Smart Quotes“ enabled by default, and as I was typing them in it began replacing the double-quotes with complex typographic quotation marks according to my document’s Locale. For programming language text this is inappropriate.

The option „Extras → Auto Correct Options → Smart Quotes“ can only be turned off on an all-or-nothing basis, but for natural language texts I would like to keep the behavior activated.

The solution:

Modify your paragraph style for code, for example type <F11> for the styles list, choose the paragraph styles tab, right-click on the style „Preformatted Text“ and choose „Modify“.

In the „Font“ tab, below the „Style“ selection box, you see a dropdown menu „Language“. Set this to „None“ and click „Ok“.

From then on, „Auto Correct“ will no longer apply „Smart Quotes“ to that style.