What is MATIC in cryptocurrency?

Question
What is MATIC in the context of cryptocurrency?

MATIC is Polygon’s native cryptocurrency token.
...
Before the project changed its name in February 2021, Polygon was known as Matic network.

https://cointelegraph.com/learn/polygon-blockchain-explained-a-beginners-guide-to-matic

MATIC is the currency of Polygon that enables users to interact with tens of thousands of dApps involved in our ecosystem. It is also used to secure the network by staking.

https://polygon.technology/matic-token

Polygon (MATIC) is a cryptocurrency and a technology platform that was launched to connect and grow Ethereum-compatible projects and blockchains.

https://www.investopedia.com/polygon-matic-definition-5217569

For Golang coders, see the definition of "Bor."

How Do You Troubleshoot the Error Message “Client sent an HTTP request to an HTTPS server”?

Problem scenario
You run curl commands, but you keep getting this error "Client sent an HTTP request to an HTTPS server." What should you do?

Possible Solution #1
Use https instead of http. See this for more information.

Possible Solution #2
The "problem" is not actually a problem or a true error message. Some web servers have nothing but this as text. This is a sign that the web server is working correctly and the curl command was successful.

Possible Solution #3
Are you using Caddy and Nginx Proxy Manager? Can you not use Caddy and Nginx Proxy Manager (per https://vaultwarden.discourse.group/t/i-get-a-client-sent-an-http-request-to-an-https-server-error-on-all-pages/2296) at the same time?

Possible Solution #4
Are you using Go instead of just curl? If so, see https://github.com/golang/go/issues/49310

How Do You Troubleshoot a “SyntaxError: invalid syntax” Error in Python?

Problem scenario
You do not know why you are getting the error. The line has an "l" (a lowercase "L") or a numeral one ("1") in it.

You may have identified that the line of code is different in one file from another. You cannot tell what is different about your code or why you are getting this error. What should you do?

Solution
Enter vi or open Notepad++ to view the code. Search for a lowercase L "l" or a numeral one "1". PEP8 recommends this: "Never use the characters 'l' (lowercase letter el), 'O' (uppercase letter oh), or 'I' (uppercase letter eye) as single character variable names." (This was taken from https://www.python.org/dev/peps/pep-0008/#id36)"

"If a function argument's name clashes with a reserved keyword, it is generally better to append a single trailing underscore rather than use an abbreviation or spelling corruption." (This was taken from https://www.python.org/dev/peps/pep-0008/#id44)

(If you do not have an "l" or a "1" in your code, did you forget to put parentheses around the item being printed? Or is there an unmatched parens "(" or ")" somewhere?)

How Do You Set Up a New Linux Server on Hardware?

Problem scenario
You are configuring a new physical server without an image, without an automated unattended installation script or a remote ghosting-type tool (such as Ghost or the NIM tool). How should you format it, install Linux and configure it?

Solution

  1. Gather the requirements for what its purpose will be and how the monitoring/maintenance and support will be done.
  2. Configure the BIOS/iLOs/iDRACs first. You will want to lock down the BIOS with a password. In the case of some hardware vendors two or more user accounts will control different aspects of the BIOS/CMOS/UEFI; one account can serve as a backup to the other (if you do not mind having two or more accounts). If you lock yourself out with some unfamiliar options (as few I.T. professionals protect BIOS/UEFI and other pre-boot menus with credentials on a regular basis), it will be best if you have done no work yet. The process for bypassing the credentials could involve losing data.
  3. Choose your OS. Make an .iso file on some bootable media with the computer you are using to view this website. Remember that CentOS is not what it used to be. Odd versions of Ubuntu are often end-of-lifed sooner than an even-numbered version that is smaller! (Yes, Ubuntu 21.x has a shorter life than 20.x.)
  4. Configure your RAID array. The one or ones you chose depend on the hardware you have and the future purpose of the server.
  5. Configure partitioning when you install your OS. There is (usually) no good reason to not have partitioning. Even with one hard disk, partitioning directories can isolate a future file system corruption; this gives your server greater robustness. Suggested partitions (logical volumes): /tmp, /etc, /usr, /home, /var, and /opt. (With an Ubuntu installation look for the "Installation type" menu. You will want to choose "Something else" (not "Erase disk and install Ubuntu"). We know this specific install step because of this page https://www.tecmint.com/install-ubuntu-20-04-desktop/.)
  6. For Ubuntu some sources disagree, but here are ball park estimates for a typical Debian installation as of 2023:
  • boot should be 600 MB (sometimes 250 MB is enough)
  • tmp should be the same as the swap partition (unless you need to download very large files to /tmp)
  • usr should often be 15% of the available disk space.
  • If you are going to be doing considerable development or verbose logging, make sure your /var/ directory is quite large. Some development involves extensive logging.
  • If there will be many users, the /usr/ and /home directories should be larger than many regular (website) estimates. Some servers will have very few users, and these directories can be much smaller. Some people use the /opt directory for various third party packages or their own development. But some people use other directories and avoid /opt too.
  • Many sources recommend committing all extra space to /home.
  • The /usr partition is not for new users. This is where many new packages and many dependencies go by default. Normally it is good to have at least 7 GB for a desktop environment. But we think 10 to 15 GB is preferred. It is possible, but tedious, to install packages and dependencies in other partitions. Some packages like Wine, Darling, graphics tools, Libreoffice may go into /usr or their dependencies will go there. These packages can be quite big.
  1. It is ideal to encrypt at the beginning when you are installing the OS. It is more secure and manageable to do full disk encryption at the time of the installation.
    • Once you encrypt it, you will enter a passphrase before logging in. Servers that get to an OS passphrase prompt are generally usable even if you do not enter a passphrase. But some types of encryption, at the firmware level or with some special hardware module, may require someone to enter the passphrase locally at the "master console."
  1. You are done. For more details on a partition scheme, see these external pages:

How Do You Troubleshoot This Error: “no limited resources used”?

Problem scenario
You run quota -g foobar where "foobar" is the name of the group you want a quota to apply to. But you get this: "Disk quotas for group foobar: no limited resources used"

What should you do?

Possible solution
Run a command like this:
sudo quotacheck -gm /path/to/filesystem

(Don't use the -u flag if you have no user quota configured.)

Now try the quota -g foobar command again.

How Do You Troubleshoot “mkfs unable to open device /dev/nvme device or resource busy”?

Problem scenario
You are trying to run an mkfs command. But you get "mkfs unable to open device /dev/nvme device or resource busy". What should you do?

Solution
Are you 100% sure the target of the mkfs command is the one you want?

The target may be /dev/mapper/nvmeABC123 for example. Try to ascertain the destination (often the last argument) of the mkfs command. Is it really /dev/mapper/nvmeABC123? You may want to try rebooting the server. If you are following directions, there may be a mistake in the directions.

How Do You Troubleshoot “Requested offset is beyond real size of device”?

Problem scenario
You are trying to run a cryptsetup open command. You enter the passphrase, but you get "Requested offset is beyond real size of device." What should you do?

Solution
Try starting over with that partition. Can you create a partition that is at least 16 MB? If it is less than that, or there are some overlapping partitions, that may be your problem.

This posting provides relevant details: https://superuser.com/questions/1557750/why-does-cryptsetup-fail-with-container-10m-in-size
There are sgdisk commands that you can run to view the size of your partition (e.g., sgdisk --print /dev/sda).

How Do You Handle Discrepant Results from df and du Commands?

Problem scenario
You run df and du. You see different amounts of CPU space that are free versus utilized. What should you do?

Possible Solution #1
Reboot the server. Rebooting may fix the problem.

Possible Solution #2
Run this command: lsof

Some files may be open that should not be. The lsof command should help you determine if a file's utilization is lingering.

Possible Solution #3
Do you know what directory is relevant? Through iterations of du and df commands, you can often determine what directory has the discrepancy.

Run this command (but substitute /foo/bar/ with the directory path in question):

fuser -v -m /foo/bar

Possible Solution #4
Can you unmount the file system in question (e.g., with umount)? If you can unmount it, run this command: Run this command (but substitute /foo/bar with the path to the file system): fsck /foo/bar
(This was adapted from https://www.ibm.com/support/pages/causes-mismatch-between-disk-usage-reported-df-and-du.)

Possible Solution #5 (less of a df issue but more of a du and quota discrepancy)
If you are having an issue with your disk quota settings and the du command results, see this Stackexchange.com posting.

Potential root cause #1
The root cause could be that an inode has been deallocated but some aspects of the system have not been updated (possibly because another process is using a file that lost its inode).

Potential root cause #2
A hidden directory could have a files with large sizes.

Potential root cause #3
An administrator with greater privileges could have isolated some directories with files that are taking up a good deal of space.

How Do You Troubleshoot The Message “no module named pandas”?

Problem scenario
From a Python command prompt or when you run a Python program, you get the error message "no module named pandas". You have used pip and pip3 to install pandas. What should you do?

Solution
Use "python3" instead of "python" to ensure you are using Python 3.

You may also want to see this posting.

How Do You Determine What WordPress Theme Your Website Is Using?

Problem scenario
You use WordPress. You want to find (or identify) what theme you are using. What should you do?

Solution

  1. Find the URL you use to browse WordPress (e.g., with wp-admin).
  2. Hack (or create or draft) the URL in text by making it follow this convention: https://www.foobar.com/wp-admin/themes.php
  3. Be logged into WordPress, and then browse to that drafted/hacked URL.
  4. Search for the word "active".