How Do You Get a Table in HTML/Javascript to Display Only The First n (or 10) Rows?

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.

What is a Recommended Practice for Handling Asynchronous Requests with Long-Running Processes with Flask?

Problem scenario
You are designing a Flask application with Python running some long-running processes. You want to handle the requests asynchronously. The individual requests will have a duration of more than one hour. What is the recommended way of handling this?

Solution
Use a task queue like Celery or RQ (Redis Queue).

Sources:
https://stackoverflow.com/questions/42790362/how-to-handle-long-sql-query-in-flask

Flask API app for long running process?

How Do You Search the Logs of a Website that Is Not Functioning Properly?

Problem scenario
You have a website that is not working. You tried using Fiddler on the front-end. You want to examine the logs on the backend to find the problem. What should you do?

Possible Solution #1
Use a case insensitive grep for “error” or “violation”. Search also for patterns such as “40” and “50” in separate searches.

To get help finding the logs,

With Nginx Can a .pem file replace a .crt and/or a .key File?

Problem scenario
You know .crt and .key files can pair as ssl_certificates and SSL certificate keys respectively. In Nginx, can .pem files replace .crt files? Can .pem files potentially replace .key files? Can a .pem file be a substitute?

Solution
Yes to some extent, for the nginx.conf file, a .pem file can replace a .crt file and potentially a .key file too.

What is a Mutating Webhook?

Question
In the context of Kubernetes, what is a mutating webhook?

Answer
They are an API invocation that make changes to resources (and in some cases before they are created per medium.com).

“MutatingAdmissionWebhook is one of easiest ways of extending Kubernetes with new policy controls and resources mutation and a host of other options.” (Taken from medium.com )

“Mutating controllers may modify related objects to the requests they admit;

What is an Apache Web Server Container?

Problem scenario
You are reading about Apache Web Server containers. These are not related to Docker containers. You often see them near or tags. What are Apache Web Server containers?

Answer
They are portions of text that contain Apache web server configuration. (The source of this is https://httpd.apache.org/docs/2.4/sections.html.) The configuration includes directives often related to the VirtualHost in Apache web server.

What is Long Tail Latency or Tail Latency in the Context of Application/Website/System Performance?

Question
What is long-tail latency or tail latency?

Answer
Tail latency is the worst performing time-measured response from an application. Outliers can be described as requests that take far longer than others in a statistical sample. Such irregular durations, with long latencies, are said to be at the tail-end of a chart or graph. Long-tail latency would generally refer to the worst 1% or worst 2% of the requests.

What is a VirtualHost in Apache Web Server?

Problem scenario
You do not think that Apache web server does virtualization (like a hypervisor). But you see the term Virtual Host when you read about Apache web server configurations. What is a VirtualHost in the context of Apache web server?

Solution

“Apache Virtual Hosts A.K.A Virtual Host(Vhost) are used to run more than one web site(domain) using a single IP address.

How Do You Troubleshoot Errors Such as “/lib64/libcurl.so.4: no version information available”?

Problem scenario
You try to run an obs command. You get errors like these:

var/lib/snapd/snap/obs-studio/1195/usr/bin/obs: /lib64/libcurl.so.4: no version information available (required by /var/lib/snapd/snap/obs-studio/1195/usr/bin/obs)
/var/lib/snapd/snap/obs-studio/1195/usr/bin/obs: symbol lookup error: /var/lib/snapd/snap/obs-studio/1195/usr/bin/obs: undefined symbol: obs_get_module_lib

What should you do?

Solution

  1. Back up the /lib64/libcurl.so.4 to a user’s home directory (just in case).
  2. Run this:
    sudo find / -name libcurl.so.4 | grep -i obs
  3. Copy one of the files found above to /lib64/