Entries Categorized as 'How-To’s'

How To List Running AWS Instances in all Regions Sorted by LaunchTime and Email in a Monospaced Font

Author: , July 1st, 2019

How To Install/Update CPAN on MacOS Mojave with fatal error: ‘EXTERN.h’ file not found

Author: , June 12th, 2019

The Problem Tried to install the latest version of cpan and got stuck. Tracked it down to the dependency module Mac::SystemDirectory which was failing to build:

The Solution Use the MacOS installer command to deploy the needed files:

The, rerunning the cpan install works:

How To Solve the LOAD DATA INFILE Error from –secure-file-priv

Author: , June 12th, 2019

The Problem Tried to load a Tab-delimited text file into MuSQL 5.6.43 and got the following error: mysql> LOAD DATA INFILE ‘sample.txt’ INTO TABLE test_table; ERROR 1290 (HY000): The MySQL server is running with the –secure-file-priv option so it cannot execute this statement Solution One mysql> SHOW VARIABLES LIKE “secure_file_priv”; Copy the file into the […]

How To Get Sonos Working on MacOS Mojave

Author: , June 6th, 2019

Sonos was running just fine oon my MacOS Mojave iMac, then I had to force-quit it due to a system freeze. The Sonos app REFUSED to start, no matter what I tried, including uninstall/reinstall, full scrub of all files located, uninstaller software, reboots, cache cleaning and reboot with Onyx – NOTHING worked, and i was […]

How To Show Filenames With git log

Author: , June 3rd, 2019

To display the filenames included in each commit, just add the –name-only argument to git log:

How To Remove A File From The git Staging Pre-Commit List

Author: , May 31st, 2019

Quickref: How to Remove a file from the staging area

The Story Recently, I accidentally added some files to git’s pre-commit phase, i.e.:

For example, here is how to handle the above situation:

To better understand, here are the phases/states/stages that git uses: Untracked – when a file is first created, git […]

How To Use Regex Negative Lookahead To Exclude Strings

Author: , May 31st, 2019

I have a task in Perl to list specific files based on pattern match, those with and those without the string “_from_”. There are two files in the directory to filter: static-east.properties static-east_from_west.properties To capture the files with the _from_ string was easy:

To capture the files WITHOUT the _from_ string was not quite […]

How To Force csshX To Tile In Columns

Author: , May 28th, 2019

I use csshX on a daily basis. The default layout on my screen for three nodes is one column with three rows, one per node. This layout is excellent for visual positioning, but does make it harder to read long output. For this purpose, I start csshX using the column quantity specifier -x and I […]

How To Fix rsync Packet Corrupt Errors

Author: , May 10th, 2019

I was getting rsync errors from one source host:

Finally tracked it down to the application “Little Snitch”. Needed to fully uninstall it and reboot to get the problem solved.

How To Fix YUM Update Errors with Percona GPG Keys

Author: , April 16th, 2019

Problem: Trying to run a yum -y update as root aborts with the following error:

The solution, found on the Percona website, is this: sudo yum update percona-release Source URL: https://www.percona.com/blog/2019/02/05/new-percona-package-signing-key-requires-update-on-rhel-and-centos/