Compare Two Text Files

Refer: https://stackoverflow.com/questions/746458/how-to-show-lines-in-common-reverse-diff" href="https://stackoverflow.com/questions/746458/how-to-show-lines-in-common-reverse-diff">https://stackoverflow.com/questions/746458/how-to-show-lines-in-common-reverse-diff

comm -1 -2 file1.sorted file2.sorted

where file1 and file2 are sorted and piped into *.sorted

Here's the full usage of comm:

comm [-1] [-2] [-3 ] file1 file2
-1 Suppress the output column of lines unique to file1
-2 Suppress the output column of lines unique to file2
-3 Suppress the output column of lines duplicated in file1 and file2

The comm command (short for "common") may be useful comm - compare two sorted files line by line

find lines only in file1

comm -23 file1 file2

find lines only in file2

comm -13 file1 file2

find lines common to both files

comm -12 file1 file2

The man file is actually quite readable for this.

comm -23 OLCI_K229.csv OLCI_EDOCS.csv

Split MP3 Audio and Convert M4B to MP3

Refer: https://askubuntu.com/questions/1264779/how-to-split-an-mp3-file-by-detecting-silent-parts

Use ffmpeg to convert m4b to mp3

Refer: Refer: https://superuser.com/questions/173571/how-to-convert-m4b-files-to-mp3

ffmpeg -i "file.m4b" -acodec libmp3lame -ar 22050 "file.mp3"

Install Software

sudo apt install -y mp3splt

Sample Usage:

mp3splt -s your.mp3

If it creates TOO MANY TRACKS

Mp3splt will try to automatically detect splitpoints with silence detection and will split all tracks found with default parameters.

mp3splt -s -p th=-50,nt=100 your.mp3

passing desired parameters, splitting 100 tracks (or less if too much) with the most probable silence points at a threshold of -50 dB.

In this example we are setting the minimum silence to 4.9 seconds and still

mp3splt -s -p th=-40,min=4.9,nt=100 'The Catcher in the Rye By Salinger.mp3'

Arduino Button Box

Cherry Switch dimension is 14.3 mm x 14.3 mm when using a CAD program to cut-out holes for it.

Using Rotary Encoder Library

Adding the OLED display seemed to change the impedence slightly for the button array and the code was excuting ALL of the button code and really slow down things. After a tweak of the code to ignore, things started working again.

Install Wine and PlayOnLinux Ubuntu 21.10

Install Wine on Ubuntu 21.10

Refer: https://wine.htmlvalidator.com/install-wine-on-ubuntu-21.10.html

Check installed architectures

Verify 64-bit architecture. The following command should respond with "amd64".

$ dpkg --print-architecture

See if 32-bit architecture is installed. The following command should respond with "i386".

$ dpkg --print-foreign-architectures

If "i386" is not displayed, execute the following.

$ sudo dpkg --add-architecture i386

Recheck with.

$ dpkg --print-foreign-architectures

Add the WineHQ Ubuntu repository.

Get and install the repository key.

$ wget -nc https://dl.winehq.org/wine-builds/winehq.key

$ sudo -H gpg -o /etc/apt/trusted.gpg.d/winehq.key.gpg --dearmor winehq.key

Add the repository.

$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ impish main'

Update the package database.

$ sudo apt update

Install Wine

The next command will install Wine Stable. If you prefer Wine Development or Wine Staging, replace winehq-stable with either winehq-devel or with winehq-staging.

$ sudo apt install --install-recommends winehq-stable

Verify the installation succeeded
$ wine --version

Configure Wine

The default Wine configuration prepares Wine as a Windows 7 environment, which is good for some older Windows apps, but many contemporary apps will be better matched to Windows 8.1 or Windows 10. In addition, other configuration options may be significant.

To bring up Wine's configuration panel, open a Terminal window and execute winecfg. When prompted, set your preferred version of Windows and accept all offers to install Mono and Gecko.

Depending on the version of Wine, Gecko may need to be installed twice (for 32-bit and for 64-bit) or not at all. (Wine 6.0.2 will install Gecko twice. Wine 6.17 and later will not ask to install Gecko, but a Windows app that needs Gecko will, during installation, prompt to be allowed to install it.)

$ wine winecfg

If you are creating custom Wine prefixes, this configuration must be repeated for each prefix.
Two simple tests

Just for fun, or to see Wine in action …

Display a simple clock.

$ wine clock

Run Wine's builtin web browser.

$ wine iexplore

Install PlayOnLinx

Refer: https://installati.one/ubuntu/21.10/playonlinux/

Install playonlinux Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install playonlinux using apt-get by running the following command:

sudo apt-get -y install playonlinux