… and i got a new coffee mug. 🙂
Artikel in Kategorie "GNU/Linux"
Determine IPv4 Addresses of a Libvirt Qemu-KVM Domain
23. Januar 2023 in Administration, GNU/Linux, Technik.
In the VM: dnf install qemu-guest-agent From the HV: virsh qemu-agent-command –domain myvm \ ‚{„execute“:“guest-network-get-interfaces“}‘ | \ jq -r ‚ [.return[] | select(.name!=“lo“) | .“ip-addresses“] | flatten | .[] | select(.“ip-address-type“==“ipv4″).“ip-address“ ‚ The result should be one IPv4 address per line.
Removing the Builtin Inline CSS from WordPress
27. August 2022 in Programmierung.
Should you – as i did – wonder why WordPress renders a bucket of inline CSS into the HTML output (such as –wp–preset–font-size–normal in <html> or –wp–preset–color–white in <body>): This is done to accomodate frontend editing with Gutenberg. If you – as i do – are not using Gutenberg frontend editing, then the following PHP […]
Updated Common Prefix Notation Transformation
21. August 2022 in Programmierung.
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
27. August 2022 in Administration, GNU/Linux, Programmierung.
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, […]
Print XDG Desktop Definition for Application
21. August 2022 in Administration, GNU/Linux.
For an application given by „application name“ or „executable name“, output the corresponding .desktop file, if any: find_desktop() { local IFS=“:“ local xdg_data_dirs=${XDG_DATA_DIRS:-/usr/local/share:/usr/share} local search=$1 for i in $xdg_data_dirs ; do a=“$i/applications“ [ -d $a ] && for d in „$a“/*.desktop ; do grep -q -e „^Name=.*$search“ -e „^Exec=.*$search“ „$d“ && { echo „# $d:“ […]
Transforming Sets of Strings to their Common Prefix Notation
19. Januar 2023 in Programmierung.
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, […]
Pi-KVM Hat v3
31. Dezember 2021 in Administration, GNU/Linux, Technik.
Ich freue mich, zu den Glücklichen zu gehören, die den Pi-KVM Hat v3 mit passendem Stahlgehäuse ergattert haben (https://pikvm.org/). Das Warten hat sich gelohnt.