How Do You Delete Browser Data from Chrome when Your First Attempt Failed?

Problem scenario
In Chrome you deleted browsing data including cookies and autofill form data. You closed the browser and reopen it, but old URLs still show up. What should you do?

Solution
Go to History -Clear browsing data -and go to “Time Range” (the drop down menu). Choose “All time” and then go to “Clear data”.

 » Read more..

How Do You Get curl to Work when the Web Page is Working?

Problem scenario
You can download a file with Lynx and wget. But curl is not working. What should you do?

Solution
First, try to curl the web page without redirecting the output. If the curl command creates a file, it does not necessarily give you an accurate depiction. You may want to examine the file with a text editor. What you see without redirecting the output to a file (that is allowing the output to echo to the screen) may provide a clue.

 » Read more..

When Does the DNS Server Override the /etc/hosts File for FQDN or Domain Name Resolution?

Problem scenario
You notice that on some Linux servers the /etc/hosts file controls the resolution of hostnames and on other servers the DNS server overrides the /etc/hosts file. Which has precedence in DNS resolution, /etc/hosts or the DNS server on the network?

Answer
It depends. The /etc/nsswitch.conf file will decide. There is a “hosts” stanza. This setting will have the DNS server override the /etc/hosts file:

hosts:dns files

This setting will have the /etc/hosts file take precedence for name resolution:

hosts:files dns

To get the hostname,

 » Read more..

How Do You Get a PHP Program to Invoke a Python Program via Browsing a Website?

Problem scenario
You want Debian/Ubuntu Linux to support a website. You want a Python program to run every time a web page is downloaded. How do you get a PHP program to invoke a Python program on Debian/Ubuntu Linux?

Solution

Prerequisites
i. This assumes you have Apache2 and PHP installed. If you need assistance run this: sudo apt -y install apache2 php
ii.

 » Read more..

How Do You Create an Issue for a Repository in a GitHub Organization the API?

Problem scenario
You are running this command:

curl -u jdoe:$password -X PUT -d ‘{“title”: “Look at this bug”, “body”: “This is a serious problem here.”, “assignees”: [ “jdoe” ], “milestone”: 1, “labels”: [ “bug” ]}’ https://api.github.com/repos/$orgname/$reponame/issues

The message in the response you receive is “Not Found”. You found documentation that refers to an “owner” being in the URL. You see “POST /repos/:owner/:repo/issues” (with no reference to the organization).

 » Read more..

How Do You Create a GCP VM to Be a Web Server?

Problem scenario
You have a GCP server. You can run curl commands to its URL via localhost. But with a URL constructed with the server’s external IP address the curl command times out. You cannot reach the URL from your workstation. How do you get the GCP server to present the web service to other machines?

Solution
Modify the firewall rule by following these steps below.

 » Read more..

How Do You Make a Web UI Service Accessible to Outside Web Browser Traffic?

Problem scenario
Sometimes you have a web service listening on the loop back IP address on a non-standard port.

When you run nmap -Pn localhost, you see a service is listening on a given port (e.g., 9200). When you run nmap -Pn on an internal or external IP address, you do not see a service listening on that given port. You want to direct traffic to this listening service (e.g.,

 » Read more..

What is an Ingress Resource in Kubernetes?

Question
What is an Ingress resource in Kubernetes?

Answer
It is a Kubernetes technique of exposing services via an individual IP address (page 135 of Kubernetes in Action by Luksa). In TCP/IP networking, the Ingress port allows inbound traffic to route somewhere. Kubernetes supports other IP address to service mapping methods (e.g., NodePort or LoadBalancer). NodePort operates on layer 4 of the OSI seven-layer model (according to this posting).

 » Read more..

How Do You Install the Angular CLI on a Linux Server?

Problem scenario
You want to test out the Angular CLI on a Linux server. What should you do?

Solution

Prerequisite
Install node and npm. If you nsee assistance, see this posting How Do You Install node and npm on Any Distribution of Linux Server?.

Procedure
Run this command: sudo npm install -g @angular/cli

 » Read more..

How Do You Troubleshoot the ng Error “—–Mg: scratch (fundamental)—-All——————“?

Problem scenario
You run this command ng –version but you receive a blank screen at the terminal like this:

—–Mg: scratch (fundamental)—-All——————

What do you do?

Solution

1. Use “ctrl-z” to exit out.

2. Run these commands:

sudo apt remove ng-common
sudo npm uninstall -g @angular/cli
sudo npm install -g @angular/cli

3.

 » Read more..