Broken Icon on Ubuntu 22.04 with Parallels

The broken icon seems to be a symptom of Ubuntu and M1.

Refer: https://forum.parallels.com/threads/gear-icon-parallels-shared-clipboard-icon-in-ubuntu-22-04.358588/

I just found that you can work around this issue by disabling Wayland in Ubuntu and use the standard Xorg server that was the default in versions prior to 22.04. There are full instructions here, but you can simply edit the file

sudo gedit /etc/gdm3/custom.conf

and uncomment the line

#WaylandEnable=false

After a restart the gear icon goes away, focus stays in the window you where using when switching desktops, and shared clipboard still works.

Regex Between Two Strings

cat mobile_errors.txt.txt | grep -o -P '(?<=returned for booking ).*(?= with error code)' | sort | uniq > mobile_error_bookings.txt

The magic of this search is here:

grep -o -P '(?<=beginning string with space at end ).*(?= ending string with space at start of it)

RegEx

Visual Studo Code Tricks

Remove Blank Lines

Search for:

^(?:[\t ]*(?:\r?\n|\r))+

Replace with NOTHING.