How Do You See the Desktop of a Mac when Using an Atypical Keyboard?

Problem scenario
You want to minimize all your Mac applications to view the desktop only. But you are using a non-standard keyboard. With a Microsoft keyboard (or some non-Apple keyboard), how do you see the desktop on a Mac?

Solution
Hold Fn and tap F11. (With a normal Mac keyboard, holding Command and tapping F3 works.)

How Do You Install Python 3.x on Any Type of Linux?

Problem scenario
You want a script to install Python 3.x that will work on any type of Linux. What should you do?

Solution
Prerequisite

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

Install the zlib development tools. If you have a Red Hat derivative (e.g., CentOS or Fedora), you this command: sudo yum -y install zlib-devel

If you have a Debian/Ubuntu system,

How Do You Connect to an EC-2 Instance in a VPC?

Problem scenario
You cannot reach the public IP address of an EC-2 instance. You get “Network connection timed out” errors. The EC-2 instance is in a VPC. You have configured the relevant Network ACLs of the VPC and the EC-2 instance’s Security Groups to allow connectivity from your workstation. What could be wrong?

Solution

  1. Make sure you have an Internet Gateway that has been created and attached to the relevant VPC.

How Do You Troubleshoot “config.status: error: Something went wrong bootstrapping makefile fragments”?

Problem scenario
You run this command: sudo ./configure –prefix=/usr/local

But you see this:

config.status: error: in `/usr/bin/make-4.3′:
config.status: error: Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the
‘–disable-dependency-tracking’ option to at least be able to build
the package (albeit without support for automatic dependency tracking).

What should you do?

Solution
Run this: sudo bash build.sh

How Do You Read a JSON File to Extract the Value of a Given Key in a JSON File?

Problem scenario
You want to print the value of a given non-nested key in a JSON value. How can Python help you achieve this?

Solution
Here is an illustrative example. Create a file called reader.py with the following lines of code:

import json
with open(“first.json”, “r”) as reading_content:
i = reading_content.read()
j = json.loads(i)
print(j[“bird”])

Have the JSON file look like this:

cat first.json

{“bird”: {“name”: “singy”, …

What Is the Syntax for Viewing ec2_instance_info Return Values in Ansible?

Problem scenario
You read about a supported data type (defined keys) in Ansible playbooks related to EC-2 servers in AWS. How do you view this data?

Solution

  1. Have a playbook (.yaml file) with the following syntax:

ec2_instance_info:
region: us-west-1
register: vara

  1. Refer to vara as a variable. Here is an example of how to see it:

debug:
msg: “{{ item.instance_id }}”
loop: “{{ vara.instances }}”

How Do You Get xargs to Execute Rather Than Print a Command?

Problem Scenario
You are writing a Bash command to craft AWS CLI commands. But the commands are not running with your xargs command. You created something like this:

aws s3 ls s3://bucketname/ | awk ‘{print “/usr/local/bin/aws s3 rm s3://bucketname/”$4}’ | xargs -L 1

But it merely displays the well-crafted AWS CLI commands. You want the commands to execute.

You tried a variation but received “xargs: awscli: No such file or directory.”

What should you do?

How Do You Unhighlight Text in Mac’s TextEdit program?

Problem scenario
You are using a Mac and modifying text with TextEdit. Some text you copied is highlighted. How do you unhighlight the text?

Solution
Highlight the text that is highlighted with the mouse. There should be two pallettes at the top of the TextEdit application. These are solid-color rectangular icons to the right of the font size and to the left of the BIU (bold,

How Do You Troubleshoot the CloudWatch Command Line Error “no outputs found, did you provide a valid config file”?

Problem scenario
You think your amazon-cloudwatch-agent.toml file has been misconfigured. You run “amazon-cloudwatch-agent-ctl” but you get an error about “no outputs found, did you provide a valid config file.” What should you do about this error?

Solution

  1. Use amazon-cloudwatch-agent-config-wizard to create the configuration file. From the command line it will walk you through step-by-step directions in text.
  2. Assuming the default configuration has been saved as “AmazonCloudWatch-linux” (based on how you responded above),

Does Automation Subsume DevOps or Does DevOps Subsume Automation?

Question
Is automation bigger than DevOps?

Answer
We think that the canonical answer is yes, automation subsumes DevOps. Some professionals think in terms of automation, and automation existed before DevOps was a word. It is well known that the Toyota Production System has influenced DevOps. Automation played a big role in the success of Sakichi Toyoda.

His “most famous invention was the automatic power loom [“a hand-operated or power-driven apparatus for weaving fabrics”,