How Do You Paste Copied Content without the Formatting Using a Mac?

Problem scenario
You have a Mac and want to copy heavily-formatted text from a web page or Excel spreadsheet into TextEdit. But you do not want the formatting to come with it. How do you do this?

Solution

  1. Copy it as you normally would.
  2. If you are using a Microsoft keyboard, use Alt-Windows-Shift-v to paste it.

How Do You Troubleshoot the Unexpected Output to a grep Command “Binary file (standard input) matches”?

Problem scenario
When grepping a file or output, you get “Binary file (standard input) matches”. You only see a subportion of the matching strings. What should you do?

Solution
Use the -a flag. Here is an example:
cat foobar.txt | grep -a coolterm

How Do You Fix a Drain Pop Up Stopper That Will Not Go Up and Down or Move Vertically Like It Should?

Problem scenario
Your drain stopper in your bathroom sink has broken. You can no longer place a plastic/chrome pop-up stopper to be connected to a rod inches into the drain. The metal or plastic protrusion rod is no longer visible in the drain. It broke off and fell into the drain pipe (e.g., the P-Trap). How do you fix this problem with replacing the fewest amount of tools and parts?

How Do You Fix the Ansible Problem about “libselinux-python”?

Problem scenario
You try to run an Ansible playbook, but you get an error like this: “msg: Aborting target uses selinux but python bindings (libselinux-python) aren’t installed!”

You are using a Red Hat derivative of Linux (e.g., Red Hat Enterprise Linux, CentOS or Fedora) and Python 3. What should you do?

Solution
Prerequisite

Install pip3. If you need assistance, see this posting.

How Do You Troubleshoot the Postfix Error “454 4.7.1 jdoe@acme.com: Relay access denied”?

Problem scenario
You are trying to send an email on a Postfix server. But you keep getting this error: “454 4.7.1 jdoe@acme.com: Relay access denied”

What should you do?

Solution

  1. Back up the /etc/postfix/main.cf file just in case. (This is an optional step.)
  2. Find you server’s internal IP address with a command like this: ip addr show | grep eth0 | grep inet | awk ‘{print $2}’
  3. Modify the /etc/postfix/main.cf file.

How Do You Troubleshoot Ansible Errors about SELinux?

Problem scenario
You have Python 3 installed, but you do not have pip3 installed. One of the following also apply to your situation:

Problem scenario #1
You run an Ansible playbook. You receive the error message “Aborting, target uses selinux but python bindings (libselinux-python) aren’t installed.”

Problem scenario #2
You run an Ansible playbook. You receive the error message “module ‘selinux’ has no attribute ‘is_selinux_enabled'”.

How Do You Get the libselinux-python to Work with Python 3?

Problem scenario
You have Python 2 and Python 3 installed. When you run Python 3 programs, you get an error message about selinux. The message is consistent with libselinux-python not being installed.

When you enter the Python interpreter for Python 2, you can run this command without errors: import selinux

But when you enter the Python interpreter for Python 3 (e.g., python3), you get errors when you run this command: import selinux

Security of the server is not critical,

How Do You Troubleshoot the “aws ssm” Command Failing with a Message about “InvalidInstanceId”?

Problem scenario
In AWS Systems Manager you run an “aws ssm” command. You get “An error occurred (InvalidInstanceId) when calling the Send Command operation.” What should you do?

Solution
Are there spaces or braces inside the double quotes? These symbols are not part of the instance ID. If you are running a script or complex command, extraneous symbols may be getting injected into your instance ID.

Considerations when Negotiating the Fine Print of an Employment Contract

Bill Gates’ father was an attorney, and President of the Washington State Bar Association (according to this site). Bill Gates was concerned with the details of contracts in Microsoft’s early days.

I.T. Contractors need to understand American law. To learn about how the contract language works, you may want to hire an attorney. To prepare yourself beforehand, you should try to learn more. If you are an independent contractor who performs software consulting,