Problem scenario
You want to run some firewall-cmd commands. You see the flag --remove-port. Will it allow or block the given TCP/UDP port?
Answer
It will block connectivity on the port.
A Technical I.T./DevOps Blog
Problem scenario
You want to run some firewall-cmd commands. You see the flag --remove-port. Will it allow or block the given TCP/UDP port?
Answer
It will block connectivity on the port.
Question
Given the obsolescence of information technology topics, should you hold on to study guides and books for years later as an investment?
Answer
Possibly. Sometimes one book that was published in 2010 can list for over $1,000. This book is RHCSA/RHCE Red Hat Linux Certification Study Guide (Exams EX200 & EX300) 6th (sixth) edition Text Only Paperback by Michael Jang. Some books are collectibles or copyrighted masterpieces.
Problem scenario
You want to run some firewall-cmd commands. You see the flag --add-port. Will it allow or block the given TCP/UDP port?
Answer
It will allow connectivity on the port.
Problem scenario
You want to retrieve lines from a log file with the word "failed". How do you do this with Python?
Solution
Assuming the log file is named "auth.log", this will work:
log_reader = open('auth.log', 'r')
for line in log_reader:
lower_line = line.lower()
if lower_line.find("failed") != -1:
print(line)
Problem scenario
You are trying to remove curl with dnf or yum commands. You cannot do it because dnf or yum requires curl. What should you do to reinstall curl?
Solution
Prerequisites
You need make installed. If you need assistance with this, see this posting.
Procedures
Manually back up then delete curl. Run "which curl". Move it to a user's home directory.
Go here: https://curl.haxx.se/download/?C=M;O=D
Get a link to the .tar.gz media. Download it.
Use commands like this to expand the files and install curl:
copy the file downloaded into /opt/
tar -zxvf NameOfFileAbove.tar.gz
cd into the directory created
Run commands such as these:
./configure
make
sudo make install
Problem scenario
You have a web page with a table. It uses HTML and Javascript. You want only a sub-portion of the rows to be displayed and allow the user from the front-end to click a drop down menu to see more results. What should you do?
Possible Solution #1
Have two blocks in the .html file. Have the top one define a function that accepts a parameter and filters the table results if/when called. The parameter will accept a variable (e.g., a Boolean). The function will have conditional logic based on this Boolean value.
Have the lower block invoke the function. This function can be invoked with a drop down menu (associated with an event from the front-end of the web page). This function can be invoked in the Javascript code embedded in the .html file or in a separate .js file (referenced in the .html file).
Possible Solution #2
Use DataTables (the JQuery plugin) in Javascript code. HTML can have embeddeed Javascript (between tags) or refer to a separate .js file.
"DataTables is a powerful Javascript library for adding interaction features to HTML tables." Taken from https://www.c-sharpcorner.com/article/create-datatable-in-jquery/
The Javascript code can have stanzas such as these:
…
bpaginate: true,
bLengthChange: true,
…
You can read more about them here. Here is an example of how to do it: https://www.programmersought.com/article/44601760749/
Problem scenario
You want to install a feature rich screen capture video software program that can record via a camera too. What do you do?
Solution
Prerequisite
Install snap: sudo dnf install snapd
sudo snap install obs-studio
# If you are using Fedora 32, run this command:
sudo dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-32.noarch.rpm
# If you are using a different version of Fedora, see this external page: http://download1.rpmfusion.org/free/fedora/
sudo dnf install obs-studio-libs
sudo dnf install qt5-qtsvg
# Run these commands:
sudo find / -name librtmp.so.1
sudo ln -s <pathFoundAbove> /lib64/
Problem scenario
You try to run obs (Open Broadcaster Studio Software) on Fedora, but you get a message like this:
/var/lib/snapd/snap/obs-studio/1195/usr/bin/obs: error while loading shared libraries: libQt5Svg.so.5: cannot open shared object file: No such file or directory
What should you do?
Solution
Run this command:
sudo dnf install qt5-qtsvg
Problem scenario
The built-in camera of your laptop or desktop is not working. What should you do?
Possible Solutions
These links may also help:
https://www.technewstoday.com/laptop-camera-not-working/
https://www.youtube.com/watch?v=KOJHbJxiJZ8
https://www.youtube.com/watch?v=NSXPZYlV1sY
https://www.youtube.com/watch?v=w6geNk3QnBQ
https://www.youtube.com/watch?v=uggw6Bnlsjs
For a Windows computer, you may want to try these:
https://support.wepow.com/hc/en-us/articles/360021426334-My-Lenovo-camera-isn-t-working
https://windowsreport.com/fix-laptop-camera-wont-work/
For a Mac, you may want to try these:
https://support.apple.com/en-us/HT211130
https://setapp.com/how-to/fix-camera-on-mac-not-working
https://nektony.com/how-to/fix-mac-camera-not-working
https://www.igeeksblog.com/macbook-camera-not-working/
For a Linux system with a USB-connected camera, see this.
For a USB-connected camera, see this.
Problem scenario
You have installed Open Broadcaster Software. You know want to run the GUI application. What do you do?
Solution
From a terminal window, run this command:
sudo find / -name obs -type f
Run the file that is found as a command.