How Do You Configure the Wireless Security Camera with a TCP/IP Network?

Problem scenario
You have a camera (e.g., a TCP/IP ADT security camera) attached to your a router on the network with your laptop. You know the camera’s MAC address by looking at the back of the camera itself (or you know its IP address on your network which is even more helpful). How do you use this camera over the network?

Solution
1.

How Do You Find the Web UI of a GitLab Server on Your Network?

Problem scenario
You inherited a GitLab server on your network to manage. You want to find the front end of the URL. What should you do?

Solution
Find the external IP address. Log into the back-end. If it has access to the internet, run this command: curl icanhazip.com

If you have no access to the internet, run this command: ip addr show

Use the IP addresses exhaustively in a web browser with a port in this fashion (where ppp should be replaced with the port number you want to try): http://x.x.x.x:pppp

The port number may be one to five numbers long.

What Type of Linux File Has Permissions That Are Symbolized with a “c”?

Problem scenario
You run this command: sudo ls -lh /dev

You see output like this:

crw-rw—- 1 root tty 7, 131 Dec 23 19:20 vcsa3
crw-rw—- 1 root tty 7, 132 Dec 23 19:20 vcsa4
crw-rw—- 1 root tty 7, 133 Dec 23 19:20 vcsa5
crw-rw—- 1 root tty 7, 134 Dec 23 19:20 vcsa6

You want to know if the “c” is a link to another file or something else.

How Do You Get Molecule Commands to Work when You Get “Unable to contact the Docker daemon”?

Problem scenario
When in virtualenv you try to run a Molecule command. But you get this message:

ERROR: Unable to contact the Docker daemon. Please refer to https://docs.docker.com/config/daemon/ for managing the daemon

What should you do?

Solution
1. Exit virtualenv. Run this command: deactivate

2. Go back into virtualenv (e.g., run a command like this source my_env/bin/activate).

How Do You Get JavaScript to Present in a Web Browser?

Problem scenario
You have a .js file on your desktop or on a web server. You want to have the code execute and present itself nicely (not just see the raw code) in a web browser. How do you do this?

Solution
You must use the .html extension. You must have

<html</html

tags. Here is an example. Name this file contint.html and place it on your desktop,

How Do You Use awk for String Replacement of Lines where the Word to Be Replaced Is in the Same Position?

Problem scenario
You want to substitute the nth word of a given line. How do you use awk to accomplish this?

Solution
Let’s assume the lines that you want to modify are in goodfile.txt. To replace the fourth item in the string with “new string”, run this command:

cat goodfile.txt | awk ‘{ print $1 ” ” $2 ” ” $3 ” new string ” $5 ” ” $6 }’

How Do You Troubleshoot a Bash Script Copied from the Internet?

You have one of the following two problems:

Problem scenario #1
Your GCP startup-script is not working. You do not know why. What should you do?

OR

Problem scenario #2
A bash script is not working. It stops executing after a certain line. There are few clues as to what is wrong.

Solution
Did you copy the script from a webpage?