How Do You Use Partitions on a Disk and Have Complete Disk Encryption with Ubuntu?

Problem scenario
You want your entire hard disk to have encryption. You want to install Ubuntu Linux with partitions. What do you do?

Solution
Follow these directions, but make sure the second partition (with GRUB) uses 80 MB. To do this, mentally find this command “sgdisk –new=2:0:+2M $DEV” here:
https://help.ubuntu.com/community/Full_Disk_Encryption_Howto_2019

When you get to that command,

How Do You Change Your WordPress Website’s Icon at The top of a Web Browser’s Tab?

Problem scenario
You are using WordPress and you want to change the icon that your website has (e.g., in a tab of a web browser). How do you change the website’s icon when you use WordPress?

Solution
1. Log into WordPress
2. Appearance -Themes
3. Find which theme is active and click “Customize”.
4. Click “Site Identity”
5.

What is the Difference between a Bottom-Up Approach and a Top-Down Approach in Computer Programming?

Problem scenario
You have heard of bottom-up programming and top-down programming. How are the two types different?

Solution
A bottom-up programming approach involves composing small sub-solutions into a bigger whole solution. There is an integration of components to make a whole with bottom-up programming. This method can be difficult to create the final, coherent product.

A top-down programming approach involves decomposing a big problem into smaller fragments.

Do “if x in dic” Statements Look at Keys or Values in Python Dictionaries?

Problem scenario
In Python if you test if a value is in a dictionary, does it look at the keys, the values, or both?

For example, you have code like this:

good_kv = {}
good_kv[”a”] = 1
good_kv[”b”] = 2
good_kv[”c”] = 3

if “b” in good_kv:
print(“The value is in the dictionary!”)
else:
print(“The value is not in the dictionary!”)

print (“testing keys of dictionary above and values of dictionaries below”)

if 3 in good_kv:
print(“The value is in the dictionary!”)
else:
print(“The value is not in the dictionary!”)

Do dictionaries keys,

How Do You Troubleshoot the Kubernetes Pods Error “CrashLoopBackOff”?

Problem scenario
You have a problem with Pods not starting up. They have a status of “CrashLoopBackOff”. What should you do?

Possible Solution #1
Can the Pods start in a lower environment with minimal utilization? Being able to reproduce the problem can help. Trying the YAML in an optimal environment can help you pinpoint the error (e.g., traffic may be high in a production environment).

How Do You Troubleshoot a PVC That Appears to Still Be in Use?

Problem scenario
You are working with Kubernetes. A PVC cannot be mounted. It seems like the Persistent Volume is still in use. What should you do?

Possible Solution #1
Find out about the volume attachments with these commands:

kubectl get volumeattachment
kubectl get pv

Find the Pods that use it. Is unmounting working? Perhaps the unmounting process has a problem.

In Python when Source Code is Used to Create Byte Code, what is the Intermediate Content?

Problem scenario
Python can compile source code. There is a process that happens. What form does the code take in the interim (before byte code is created)?

Solution
Abstract Syntax Tree (according to page 175 of Expert Python Programming by Jaworski and Ziade). There is an ast module that allows you to interact with the Abstract Syntax Tree via its grammar.

How Do You Troubleshoot Running a File and Getting “syntax error near unexpected token”?

Problem scenario
You have a file that is in an executable directory. This file allows a user to execute it.

You run a command, but you get something like this as the output:

/usr/bin/foobar: line 1: syntax error near unexpected token `<‘
/usr/bin/foobar: line 1: `<html<bodyYou are being <a href=”https://objects.githubusercontent.com/github-production-release-asset-abcd/123456789/1234568d-5290-4412-bb2b-abcd?X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Credential=AKIAIWABCD1234%2F20220113%2Fus-east-1%2Fs3%2Faws4_request&amp;X-Amz-Date=20200113T184113Z&amp;X-Amz-Expires=300&amp;X-Amz-Signature=79cfe429ab0794f4ef1234fd567891cc2ae0a0d2513abcdefgaa97b37e681a856&amp;X-Amz-SignedHeaders=host&amp;actor_id=0&amp;key_id=0&amp;repo_id=59522149&amp;response-content-disposition=attachment%3B%20filename%3Dfoobar_linux_arm64&amp;response-content-type=application%2Foctet-stream”redirected</a.</body</html’

What should you do?

Solution
Check the contents of the binary file you are running.

Where Does the Dollar Sign “$” Come from?

Problem scenario
You are curious why an “S” with a line through it is the sign of the dollar. Where did the cash sign “$” (or dollar symbol) originate?

Answer
It is not clear, but it appears to have something to do with Spanish coinage with “pesos” meaning “pieces” and an abbreviation would be “ps”. In smaller coins or on containers,