30.11.2020: Updated with the new patchseries and instructions for Windows
02.12.2020: Added tweaks
08.12.2020: Updated with patchseries v4
31.01.2020: Updated with patchseries v6
| https://medium.com/@jackklpan/auto-format-and-lint-by-black-isort-flake8-in-vs-visual-studio-code-a62a3f5d940e | |
| https://ipython.readthedocs.io/en/stable/interactive/tutorial.html | |
| https://py-vscode.readthedocs.io/en/latest/files/linting.html |
| https://apn-checklists.s3.amazonaws.com/foundational/partner-hosted/partner-hosted/CVLHEC5X7.html#prerequisites |
| server: | |
| http_listen_port: 9080 | |
| grpc_listen_port: 0 | |
| clients: | |
| - url: "http://10.36.19.72:3100/loki/api/v1/push" | |
| positions: | |
| filename: /opt/promtail/positions.yaml |
| [Unit] | |
| Description=ROT13 demo service | |
| After=network.target | |
| StartLimitIntervalSec=0 | |
| [Service] | |
| Type=simple | |
| Restart=always | |
| RestartSec=1 | |
| User=centos |
| #!/usr/bin/env bash | |
| set -e | |
| # Setup | |
| if command -v docker-compose &> /dev/null | |
| then | |
| dccmd='docker-compose' | |
| else | |
| dccmd='docker compose' | |
| fi |
| #!/usr/bin/env bash | |
| set -e | |
| cat << "EOF" | |
| _ _ _ _ | |
| | |__ (_) |___ ____ _ _ __ __| | ___ _ __ | |
| | '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \ | |
| | |_) | | |_ \ V V / (_| | | | (_| | __/ | | | | |
| |_.__/|_|\__| \_/\_/ \__,_|_| \__,_|\___|_| |_| |
| Recording Rule Example 1 | |
| ================================ | |
| # Aggregating up requests per second that has a path label: | |
| - record: instance_path:requests:rate5m | |
| expr: rate(requests_total{job="myjob"}[5m]) | |
| - record: path:requests:rate5m | |
| expr: sum without (instance)(instance_path:requests:rate5m{job="myjob"}) | |
| Recording Rule Example 2 |
| # https://www.middlewareinventory.com/blog/github-list-all-repositories-using-rest-api/ | |
| # get last page of github list repos | |
| set -euo pipefail | |
| export ORG= "" your orgname | |
| export BASEURL="https://api.github.com/orgs/$ORG/repos" | |
| export USERNAME="" # your username | |
| export TOKEN="" # your github token |
##How to check file integrity with shasum
For verifying the integrity (but not authenticity of data, i.e., who authored it or the origin of the file) of a file, it is necessary to run a checksum function on the file which will output a value and compare it to a previously stored checksum value; if it matches we can be relatively confident that the file hasn't been tampered with or altered.
You might be asked to verify a file's sha1sum or sha2sum–all this means is calculating and verifying the cryptographic sha1 or sha2 hash value or digest included in the file.
###Various commands and methods for verifying shasum 1 or 2:
Organic:
In terminal run: