How To Disable WordPress Profile Access for Subscribers

Author: , Posted on Friday, January 24th, 2020 at 3:44:55pm

How To Update a WordPress Plugin Manually Using rsync

Author: , Posted on Friday, January 24th, 2020 at 11:17:25am

If you are unable to update a plugin via the WP admin console, then you can do the update manually.

Download the zip file to your local hard drive and extract it.

Then, from the command line, do the test run first:

*Make sure to use the trailing slashes with rsync for proper operation with directories.

Validate the output, then remove the --dry-run and do it for real:

How To DROP DATABASE LIKE In MySQL

Author: , Posted on Tuesday, January 21st, 2020 at 6:01:23pm

How To Fix Bamboo Start Errors After Java Upgrade

Author: , Posted on Tuesday, January 21st, 2020 at 10:40:40am

PROBLEM DEFINITION

Bamboo Catalina error found in catalina.out:

SOLUTION SUMMARY
Correct by using Java 8 instead.

Do it manually using alternatives --set, or interactively using alternatives --config.

MANUAL PROCEDURE – two steps, one for java and one for javac

INTERACTIVE PROCEDURE – two steps, one for java and one for javac

How To Fix “TypeError: Language code” JavaScript Errors in WordPress

Author: , Posted on Monday, January 20th, 2020 at 8:08:13am

PROBLEM
Wordpress site broken with Javascript errors with zero plugins or themes installed.
The issue followed different devices, OS’es and different browsers.

SOLUTION
User account corrupted.
The wp_usermeta locale field had an invalid value of “regular”, and nulling the field solved the issue.

DETAILS
JS console shows this:

How To Use a PEM File With rsync

Author: , Posted on Friday, January 10th, 2020 at 2:30:39pm

Use the -e option like so:

How To Convert An RSA Private Key to PEM Format

Author: , Posted on Friday, January 10th, 2020 at 12:04:42pm

How To Properly Specify Command and Arguments to Exec in Perl

Author: , Posted on Wednesday, December 11th, 2019 at 2:39:49pm

When using Perl’s exec() call, the best way to invoke it is as follows:

This syntax does some important things:
– passes a scalar value as the first argument which exec interprets as PROGRAM
– passes an array as the second argument which exec will use as the arguments to pass into PROGRAM

Note the use of the parentheses, which I have found to be required for proper behavior.

For more information, please see: https://perldoc.perl.org/functions/exec.html

How To Change Your Commit Message in Git

Author: , Posted on Monday, December 2nd, 2019 at 8:15:31am

Not pushed + most recent commit:

How To Force vim to Convert Tabs to Spaces

Author: , Posted on Tuesday, November 26th, 2019 at 12:57:23pm

To create indents with 4 space characters which are entered by pressing the TAB key:

To make the above settings permanent add to your ~/.vimrc file.

For more details on any of these see :help ‘optionname’ in vim (e.g. :help ‘tabstop’)

tabstop
The width of a hard tabstop measured in “spaces” — effectively the (maximum) width of an actual tab character.
shiftwidth
The size of an “indent”. It’s also measured in spaces, so if your code base indents with tab characters then you want shiftwidth to equal the number of tab characters times tabstop. This is also used by things like the =, > and < commands. softtabstop
Setting this to a non-zero value other than tabstop will make the tab key (in insert mode) insert a combination of spaces (and possibly tabs) to simulate tab stops at this width.
expandtab
Enabling this will make the tab key (in insert mode) insert spaces instead of tab characters. This also affects the behavior of the retab command.
smarttab
Enabling this will make the tab key (in insert mode) insert spaces or tabs to go to the next indent of the next tabstop when the cursor is at the beginning of a line (i.e. the only preceding characters are whitespace).