What Do You Do when Your Internet Speed Is Slow?

Problem scenario
You are at home and your internet is slow. What should you do?

Possible solution #1
Reboot the cable router and any intermediate routers (i.e., any network device such as an IDS or firewall).

Possible solution #2
Log into your router’s interface to view the connected devices. To do this, find the default gateway IP address of your computer.

How Do You Find Words That Match a Pattern and Not the Line with Bash?

Problem
You want to search a file for words that include a given pattern. You want to use grep to return the word that matches a pattern, and you do not want to return the entire line that matches a pattern. You want to return the exact word without the leading space or trailing space. What do you do?

Solution
Try this command:

cat foobar.txt | tr “//” “\n” | grep “coolpattern”

The above,

How Do You Troubleshoot the Adaware Antivirus Problem of “Definitions could not be updated”?

Problem scenario
You are using Adaware Antivirus. You try to download the latest definitions, but you get this error message: “Definitions could not be updated Something prevented the definitions from updating. Please try again at a later time.”

How do you update Adaware Antivirus?

Solution
Try a different internet connection. Some public WiFi spots may block certain ports. VPN tunnels may not help solve the problem.

How Do You Find the Underlying Component in AWS for a Given URL Endpoint?

Problem scenario
You have been given a URL endpoint that is supported by some AWS service or services. How do you find out what the underlying service is?

Solution

  1. Determine the IP address. Ping the hostname. If you have a URL like this, https://acme.com/path/to/file.html, extract the domain name; you can deduce it is acme in the example. Open a command terminal and ping acme.

How Do You Fix a Python Program that Returns “Killed”?

Problem scenario
You are trying to write a Python program. It returns “Killed” on a Linux terminal. How should you fix this?

Possible Solution #1
“Aside from running time, the memory space occupied by a program is a principal cost.” (Taken from The Mythical Man-Month, page 238.)

Refactor your code. There is a programming method called “brute force” which is a reference to creating an exhaustive number of possibilities and processing those possibilities.

How Do You Troubleshoot the Ansible Error “This task includes an option with an undefined variable”?

Problem scenario
You have a playbook, and your variables are defined. But you get an error “FAILED ={‘msg”: ‘The task includes an option with an undefined variable. The error was ‘dict object’ has no attribute ‘Name’…”

What do you do to solve this?

Solution
The variable’s source could be blank. With “ec2_instance_info” the module will connect to AWS.

How Do You Install wxWidgets on Linux?

Problem scenario
You want to install wxWidgets on Linux. What should you do?

Solution
Run the following:

sudo zypper -n install bzip2 gcc-c++
sudo yum -y install bzip2
sudo apt -y install bzip2

widgetversion=3.0.4
cd /tmp/
curl -Ls https://github.com/wxWidgets/wxWidgets/releases/download/v$widgetversion/wxWidgets-$widgetversion.tar.bz2 /tmp/wxWidgets-$widgetversion.tar.bz2
cp /tmp/wxWidgets-$widgetversion.tar.bz2 /bin/
cd /bin/
bzip2 -d wxWidgets-$widgetversion.tar.bz2
tar -xf wxWidgets-$widgetversion.tar
cd wxWidgets-$widgetversion …