Problem scenario
You are using a Red Hat derivative of Linux. How do you install pip (e.g., on CentOS or Fedora)?
Solution
Run this command: sudo dnf install python3-pip
…
A Technical I.T./DevOps Blog
Problem scenario
You are using a Red Hat derivative of Linux. How do you install pip (e.g., on CentOS or Fedora)?
Solution
Run this command: sudo dnf install python3-pip
…
Problem scenario
You try to log into GitLab for the first time, but you get this error:
“502 Whoops, GitLab is taking too much time to respond.”
What should you do?
Solution
Go to the back end of the server. Run the top command. Is the left most load average above 1 (e.g, 1.08)?
The top line of the results of the top command will look something like this:
load average: 1.08,
…
Problem scenario
You want to list the namespaces for a given user in Linux. You want the output to be in JSON. What should you do?
Solution
Run this command: lsns -J
…
Continue reading “How Do You List Namespaces in Linux in JSON Format?”
Problem scenario
You have a Python program that takes a picture with a USB-attached camera. But when the crontab runs the program, the program does not work. You want vlc or some camera application to launch and capture a photo when the Python program is run with a crontab execution. You want a solution to work if you are logged into a terminal with Putty with no desktop GUI logged in.
…
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.
…
Continue reading “Where Can You Find a List of PowerShell Version 5 Commands?”
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.
…
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),
…
Continue reading “When Manipulating Lists in Python, Why is pop Slower than del?”
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.
…
Continue reading “How Do You Deploy Spring Framework in RHEL?”
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 to modify them or add advertisement banners to your website?
Solution
These sidebar text rectangles are called “Footers” in WordPress. To modify them, delete them,
…
Continue reading “How Do You Get to the Small Windows (aka Widgets) in WordPress?”
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)
…
Continue reading “How Do You Find what Version of C++ Is Installed?”