How Do You Floss without Hurting Your Fingers?

Problem scenario
You want to floss, but it can hurt your fingers. You do not want to strangle or cut off the blood circulation to your fingers. What should you do to floss without pain?

Possible Solution #1
Floss your teeth the way dental hygienists floss patients’ teeth. Use latex or vinyl gloves. (To help with overall visibility as even skin-tight gloves may take up some space,

How Do You Quickly Do Some Python Coding?

Problem scenario
You want to test some Python scripting or write a basic program to warm up before a coding interview. You only have access to a Windows machine (e.g., at a hotel “business center”). You cannot install Python on the laptop. How do you do some Python coding?

Solution
As long as you have access to the internet, browse to this site: https://www.onlinegdb.com/

(For a more serious development project,

How Do You Troubleshoot Terraform Commands That Do Not Seem to Use the -var-file= Flag Passed to Them?

Problem scenario
You want to pass the var-file flag in a Terraform command. You have a different configuration/variables file (from the default one) that you want the Terraform command to use. The resulting error indicates that there is insuffient configuration data; the behavior is consistent with no variables files being readable.

How do you get a terraform plan command to look at a different folder location or directory?

How Do You Install Windows DSC on Windows Server 2019?

Problem scenario
You are running Windows Server 2019. You want to install Windows DSC. What do you do?

Solution

  1. Open PowerShell.
  2. Run this command: Install-Module ‘PSDscResources’ -Verbose
  3. When prompted with this question “NuGet provider is required to continue…”, choose “Yes”.
  4. If you believe your Windows Server is in a secure environment, or you have no goals putting sensitive data on your Windows server,

How Do You Secure or Harden a Linux Server?

Problem scenario
You need to make a Linux server very secure. How do you harden a Linux server?

Answer

  1. You may need to reformat the server. Backup the data. When you reinstall Linux use full disk encryption. Make the boot partition read-only.
  2. Enforce complex passwords that must be changed every 30 to 90 days. Use John the Ripper (www.openwall.com/john) to ensure your passwords are strong.

How Do You Rotate a List in Python?

Problem Scenario
Rotating a list can make it appear circular (wherein an iteration from the last element brings you to the first element in the list). You do not want to import any modules. You have a list called foobar. You want to keep the content the same, but adjust the index by 1 on each value. How do you rotate a list in Python?

Solution

foobar = foobar[-1:] + foobar[:-1] …

How Do You Run an AWS CLI Command to Allow Access to an EC-2 Instance in Security Group?

Problem Scenario
You want to modify a security group to allow SSH connections from an IP address. How do you do this with the AWS CLI?

Solution
You have to know the security group’s ID. Replace “sg-abcd1234” with the group ID, and replace 1.2.3.0/24 with the IP address and subnet mask you want to allow to connect from in this command and then run it:

aws ec2 authorize-security-group-ingress \
–group-id sg-abcd1234 \
–protocol tcp \
–port 22 \
–cidr 1.2.3.0/24