JRehkemper.de

JRehkemper.de

- Homepage and Wiki of Jannik Rehkemper -

New Posts

Check SSL-Certificates with OpenSSL

Check Certificate File If you have a certificate file (.crt or .pem) and want to read its information you can do it like so. openssl x509 -in mycert.crt -text -noout Checking CSR File The same thing works for Certificate Signing Requests (CSR) openssl req -in myreq.csr -text -noout Check Server-Certificate If you Certificate is already in use on a server, you can connect to it, to read the certificate-information. openssl s_client -connect <server>:<port> | openssl x509 -noout -text

Frontmatter Aliases - failed to unmarshal YAML: yaml: line 5: found character that cannot start any token

If you try to build your hugo site and get this error message failed to unmarshal YAML: yaml: line 5: found character that cannot start any token try replacing tabs with two spaces manually.

Go Snippets

Define Variables mynumber := 1 mystring := "string" var emptyint int var emptystringarr []string var sum int = 2 Conversions Convert to String mystring := string(var) Convert to Integer number, err := strconv.Atoi(mystring) Loops For Each Loop for index, element := range myarr { } Loop Over Database Rows for routes.Next() { var link string routes.Scan(&link) CheckRoute(link) } Read File In one String func readFileAsString(filename) string { dat, err := os.

K3S - Use private Regestries

If you want to use private Image-Registries or mirrors to cache your images, you need to specify them in the registries.yaml file on all K3S Nodes. Insecure Registry If you want to access your registry over http and instead of https, you have to specify the url as an insecure registry. That way You can pull and push images with an error. You have to create a registries.yaml file on all you K3S nodes.

Monitor Network Stats with sar

The System Actvity Report or sar for short, can be used to track all kinds of system-metrics. Installation sar is part of the sysstat package and can probably be installed with your distributions packagemanager. [tux@server]$ sudo dnf install sysstat [tux@server]$ sudo apt install sysstat Samples and Intervals sar operates by measuring stats over a certain interval and aggregating them afterwards. Because of that we should always define the interval for every sample and how many samples we want.