Blog

Non-competes: the last refuge of the incompetent

This post was originally written in 2014. Nice to see that, maybe, something is going to be done about this. Comments on the proposed FTC Rule can be made here.

Interesting piece here about the different situations in different US states regarding the enforceability of non-compete agreements. Once again, California leads the way. And also once again, Florida is one of the worst. We can only hope that these are outlawed everywhere in the very near future. Enforcement of non-compete agreements is the last refuge of the incompetent (which apparently is an out of context quote borrowed from Isaac Asimov :-)).

Forcing a specific Linux kernel at boot time

Using Ubuntu 20.04, I had successfully built the Intel irdma driver. However, the kernel version changed with an update and irdma would no longer build. The solution was to get grub to default to the desired kernel version. To do this, first list /boot/grub/grub.cfg and find the appropriate string for the desired version. In my case, this was:
Ubuntu, with Linux 5.4.0-42-generic
Then, edit /etc/default/grub and change the GRUB_DEFAULT line to this:
GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.4.0-42-generic"
Finally, run:
sudo update-grub
to activate the new default option and then reboot.

Debugging in QtCreator with root permissions

There is a trick that allows gdb to be run with root permission without requiring a password (largely as described here). 
Enter:

sudo visudo

and add this line at the bottom of the file:

<username> ALL=(root) NOPASSWD:/usr/bin/gdb

where <username> is the appropriate user name. Now all that’s needed is to call sudo gdb instead of gdb. This can be done by creating a simple executable script called sudo-gdb containing:

#!/bin/bash
sudo gdb $@

QtCreator then needs to know to use this version of the debugger. Go to Tools -> Options and select Build & Run. Select the Debugger tab and click on Add. Enter the full path to the new script. Then click on the Kits tab and select the new debugger in the Debugger drop-down and then click on Ok.