Entries Categorized as 'How-To’s'

How To Allow AWS IAM Users EBS Snapshot Create And Delete Access

Author: , July 29th, 2021

SUMMARY: Needed to create an AWS IAM Policy to allow a user access to create and delete EBS snapshots. This script also needed to be able to list volumes:

How To Fix aws Command Error “You must specify a region”

Author: , July 29th, 2021

I was getting error “You must specify a region” when running any aws CLI command. The fix: Using the aws command:

which will automatically add the following to the file ~/.aws/config:

You many simply edit the ~/.aws/config file yourself and append the same thing:

How To Allow IAM Users AWS CDN Read/Write Access For W3 Total Cache

Author: , July 28th, 2021

SUMMARY: Needed to create an AWS IAM Policy to allow a user access to two buckets and their associated CDN’s in WordPress W3 Total Cache

How To Disable VIM Mouse Automatic Visual Mode

Author: , July 27th, 2021

Current Session:

All Sessions: Add the following to your ~/.vimrc file:

How To Match Complex Element IDs In jQuery

Author: , July 22nd, 2021

PROBLEM: An element ID that looked like this would fail to match: service = east node = db1-demo.thedomain.com

SOLUTION: Rig any special characters in the complex hostname (:.[],-@) with a backslash in front of them to ensure proper matching:

How To Count Lines In A String Variable Using Perl

Author: , July 20th, 2021

How To Fix Email Service Unavailable Delivery Issues with IPv6 on Amazon Linux

Author: , July 16th, 2021

PROBLEM: Email delivery to Google was failing with a “Service Unavailable” error:

Note that the network address for the destination is shown as IPv6! That is the root cause of the issue: 1. Sendmail is sending mail from the IPv6 address instead of the IPv4 address 2. Google rejects IPv6 senders without proper reverse […]

How To Preserve Line Breaks When Storing Command Output To A Shell Variable

Author: , July 14th, 2021

Solution: “Double Quote” your variables!

See Also: https://stackoverflow.com/questions/22101778/how-to-preserve-line-breaks-when-storing-command-output-to-a-variable

How To Fix Stuck WordPress Maintenance Mode

Author: , July 8th, 2021

ERROR: Briefly Unavailable for Scheduled Maintenance. Check Back in a Minute CAUSE: WordPress did not complete an action SOLUTION: Either – remove ~/wordpress/.maintenance – edit ~/wordpress/wp-activate.php and set define( ‘WP_INSTALLING’, false );

How To Change Your GIT Name and Email Address Globally and Per Repository

Author: , June 17th, 2021

To update your git user name and email address for all repos:

To update your git user name and email address for a specific repo: