Where Can You Find a List of PowerShell Version 5 Commands?

Problem scenario
You want to see every PowerShell 5 command available. What should you do?

Solution
This may not show every PowerShell v. 5 command, but it will show many: Get-Command

Another was is to open Windows PowerShell then go to View -Show Command Add-On. The list will be different if you are running Windows in Google Cloud Platform or AWS.

 » Read more..

How Do You Troubleshoot Messages about a markupsafe Fatal Error, C Extension Not Being Compiled, And/Or a Syntax Error with async when You Are Trying to Build a Docker Image?

Problem scenario
You wrote a Dockerfile. You are using it to try to create a Docker image. When you run the “docker build” command you get some error messages. The errors include one or more of the following:

1) A MarkupSafe fatal error related to Python.h.
2) A C extension not being compiled.
3) An invalid syntax error related to async (e.g., Jinja2/jinja2/asyncfilters.py”).

You need to base the image off Ubuntu.

 » Read more..

When Manipulating Lists in Python, Why is pop Slower than del?

Problem scenario
You use del and pop to remove items from lists. You noticed that pop is slower than del. Why is this the case?

Solution
There are two reasons. One, pop returns the value that is removed. Two, pop acts as a function call as opposed to a primitive action. Whereas the del invokes a primitive action (a non-recursive function call),

 » Read more..

How Do You Deploy Spring Framework in RHEL?

Problem scenario
You want to use the MVC model without Microsoft technologies. You want to try out the Spring framework to leverage its inverse-of-control. How do you quickly deploy the Spring framework?

Solution
Prerequisites
i. This assumes that you have installed Git. If you need to install it, try this command:
sudo yum -y install git

ii.

 » Read more..

How Do You Get to the Small Windows (aka Widgets) in WordPress?

Problem scenario
You recently migrated to WordPress. There are small windows of text on the left or right side of your blog. They are not posts. You do not know how to modify them. What should you do?

Solution
These sidebar text rectangles are called “Footers” in WordPress. To modify them, delete them, or create new ones do the following three steps:

  1. Log into WordPress.

 » Read more..

How Do You Find what Version of C++ Is Installed?

Problem scenario
You have C++ installed. You want to know what version it is. What do you do?

Solution
Possible solution #1
Run this command: /usr/bin/cpp -v

Look for the word “version”. Use CTRL-c to exit out.

Possible solution #2
Run these two commands:

. /opt/intel/bin/iccvars.sh intel64
icc -v

(Taken from https://superuser.com/questions/465949/how-to-know-what-version-of-c-compiler-is-installed-on-linux-server)

 » Read more..

How Do You Install lsattr on Ubuntu?

Problem scenario
You want to see if the immutable flag is set on a file. What do you do?

Solution
Run this command: sudo apt -y install e2fsprogs

 » Read more..

How Do You Install chattr on Ubuntu?

Problem scenario
You get “command not found” when you try to run “chattr”. What should you do?

Solution
Run this command: sudo apt -y install e2fsprogs

 » Read more..

Where Does The Term Ping Come From?

Question
Ping is a common diagnostic tool in networking technology. It is essentially an echo request to confirm an IP address is up and accessible. Where does the term ping come from?

Answer
The acronym for “packet inter-network groper” seems like it is a backronym for the trademarked table tennis game which involves a lightweight ball being returned in the opposite direction that it was sent.

 » Read more..

How Do You Find Files on a Linux Disk That Are larger than One Gigabyte?

Problem scenario
How do you find files on a Linux server that consume more than one gigabyte of space?

Solution
Run this command: sudo find / -size +1G -type f -print

 » Read more..