Artikel in Kategorie "Programmierung"

Updated Common Prefix Notation Transformation

This is an update to my previous article on determining the common prefixes of a set of strings (passed a sequence of lines) and printing them in common prefix notation (CPN). The problem of reconstructing strings from the original input that are complete prefixes of other input strings is addressed. The code is now in […]

Find Files by Size given in Bytes

Some examples: Find files in current directory that have a size of 400 bytes or more: sfind -min 400 Find files in /etc that have a size of 50 kilobytes (1 kilobyte = 1024 bytes) or more: sfind -dir /etc -min 50k Find files in /var with size between 100 and 500 megabytes, suppress warnings, […]

Transforming Sets of Strings to their Common Prefix Notation

Update Aug 20 2022: There is an update to this article that fixes a known issue. There is also a Git repository containing a reference implementation. Any two strings s1, s2 have a common prefix cp, which is the string of characters that s1 and s2 have in common up from the start. If s1, […]

WordPress-Plugin to Embed Gitlab Project Information

For my personal use, i wrote a small WordPress plugin that allows me to embed a link to a Gitlab repository, a list of commits and a link to the releases of that project in a WP post. Example (linebreaks added to shortcode for readability): [​gitlab-show-project url=“https://tk-sls.de/gitlab“ project_id=43 max=3 author=“none“ releases=“latest“​] Output:

Create or Append a debian/changelog Entry

Since i always have to look this up, everytime i need it, i write it down once, as „note to self“! NAME=“John Smith“ EMAIL=j.smith@example.org \ dch –create \ –package my-package \ –newversion 0.1 \ „Initial release“ And that’s it! 🙂

Protokoll meines Vortrags „Bourne Shell“ bei UUGRN e.V.

Ich hatte am 5.2.2021 die Ehre, einen Vortrag zum Thema „Bourne Shell“ auf der Veranstaltung FIXME der UNIX-User-Group Rhein Neckar, UUGRN e.V. halten zu dürfen. Hier ein Link zu den schriftlichen Aufzeichnungen dazu: https://wiki.uugrn.org/Bourne_Shell Abseits des Vortrags, den ich auch mit Live-Demos usw. durchgeführt habe, hat die Mitschrift nur begrenzten Nutzen, aber die Linkliste am […]

Python3 GTK3 TextView Drag-and-Drop Example

Just a small finger exercise …

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