ImageMagick convert to scale jpgs

Instead of using my scanner, I put my cell phone on some kind of stand, and shot a lot of paper documents (voice activation is a blessing). But then the files are unnecessarily large. Don’t need all that resolution. So $ for i in * ; do convert “$i” -scale ’33%’ -quality 75 “smaller/scan_$i” ; [...]

When mplayer plays a black window (or: Cinnamon leaking GPU memory)

The incident All of the sudden, playing videos with Mplayer opened a black window. Sometimes going fullscreen helped, sometimes it didn’t, sometimes with video playing but without OSD. ffplay worked, but somewhat limping. Setting: Linux Mint 19 on an x86_64, with a couple of fanless GeForce GT 1030 graphics cards and Cinnamon 3.8.9. Mplayer’s output [...]

Cinelerra 2019 notes

Cinelerra is alive and kicking. I’ve recently downloaded the “goodguy” revision of Cinelerra, Nov 29 2018 build (called “cin” for some reason), which is significantly smoother than the tool I’m used to. Notes: There are now two ways to set the effects’ attributes. With the good-old magnifying glass (“Controls”) in with the gear (“Presets”), which [...]

Solved: netcat (nc) doesn’t terminate at end of transmission

Introduction I often use netcat to transmit chunks of data between two Linux machines. I usually go something like $ pv backup-image.iso | nc -l 1234 on one machine, and then maybe # nc 10.1.2.3 1234 > /dev/sdb1 This is an example for using another machine to write data into a USB disk-on-key, because writing [...]

Synplify Pro on Linux Mint 18.1: The cheat sheet

Introduction I needed to run Synplify Pro for a short trial period on my Fedora 12 machine (yup, it’s 2018, and still). And I have a full Mint 18.1 as a chroot jail on that machine for installing contemporary software. So these are my notes on the go. Consider everything below as run om Mint [...]

Gtkwave notes

General Gtkwave is a simple and convenient viewer of electronic waveforms. It’s a free software tool at its best: A bit rough to start working with, but after a while it becomes clear that the decisions have been made by someone who uses the tool himself. Really recommended. So here are my jumpstart notes for [...]

gcc: Solving “undefined reference” even when the required library is listed with -l

It worked all so nicely on my Fedora 12 machine, and then on Ubuntu 14.04.1 it failed colossally: $ make gcc -Wall  -O3 -g -lusb-1.0 -c  -o bulkread.o bulkread.c gcc -Wall  -O3 -g -lusb-1.0 -c  -o usberrors.o usberrors.c gcc -Wall  -O3 -g -lusb-1.0 bulkread.o usberrors.o -o bulkread bulkread.o: In function `main’: bulkread.c:39: undefined reference to [...]

XEmacs / VHDL: Stop that annoying “assistance” while typing

Emacs’ (and hence XEmacs’) VHDL mode has an annoying thing about hopping in and “help me” with composing code. Type “if” and it tells me I need to add an expression. Thanks. I wouldn’t have figured it out myself. So here’s how to disable this annoyance: Add in~/.xemacs/custom.el, to the custom-set-variables clause ‘(vhdl-electric-mode nil) ‘(vhdl-stutter-mode [...]

Linux: How to read through all files (checking a backup)

After finishing a backup to a USB stick, I like to verify that all is in place by reading through all files. Using the “tar” utility with verbose file output seemed to be a good idea. But… Don’t $ tar -cv . > /dev/null For whatever reason, the files aren’t really read. Only the names [...]

bash: Jots on exiting the script

Trapping Call a function (byebye in this case) just before exiting a script: trap byebye exit Or a command: trap ‘echo “Farewell cruel world!”‘ exit It’s possible to catch various signals with “trap” as well. Quit on error In short: Have a set -e at the beginning of the script. It’s a global on-off feature, [...]