Entries Categorized as 'Technology'

How To Dual-Sort Query Results In WordPress Using get_posts

Author: , September 12th, 2019

Needed to build a feature for a Bookstore tool to have an optional sequence number for the Custom Post Type “books” that would allow items with a seq number to float to the top of the list and be sorted by seq #. The rest of the books would show underneath, sorted alphabetically.

How To Upgrade PHP on AWS Linux

Author: , August 22nd, 2019

As root:

~or~

THEN:

Be sure to restart your web server!!

How To Prevent Vim From Auto-Commenting New Lines

Author: , August 4th, 2019

To prevent vim from added net comments, edit the .vimrc file in your home directory, and add:

How To Enable Variable References in Perl While Using Strict

Author: , August 4th, 2019

I wanted to call a sub-routine based on a variable in Perl, like this:

but it failed because of use strict:

To enable using a variable as a reference, simply specify that to Perl:

How To Print Matching Line and All After Using awk

Author: , August 1st, 2019

Every time I use awk, my respect for it grows! Like grep, find and rsync, it is one of the powerhouse command-line tools in my arsenal. Recently, I needed to list all MySQL binary log files from a starting file forwards in sequence. AWK to the rescue! For example, I knew the starting file was […]

How To Add a Simple Checkbox in Confluence

Author: , July 31st, 2019

While using Confluence, I wanted to learn how to add a simple task checkbox in free-flow text and lists without creating a “real” task. The answer is very easy – just type the square bracket pair [] and the checkbox will appear!

How To Fix File Sharing Problems in MacOS 10.14 Mojave

Author: , July 28th, 2019

When I upgraded to Mojave, my laptops were no longer able to connect to my desktop. Deeply frustrating. Long story short, combo of factors: – Mojave filesystems on disk now default to APFS containers – APFS filesystems can ONLY be shared out via SMB! – Hostname resolution in Mojave also seems broken So, the fix […]

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 […]