# Ensure trailing slash in variable
URL=https://example.com/
echo ${URL%/}/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-Uptime { | |
<# | |
.SYNOPSIS | |
Gets the uptime of computers. | |
.DESCRIPTION | |
Gets the uptime of computers. | |
.EXAMPLE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Links | |
https://www.wireguard.com/install/ | |
https://www.wireguard.com/quickstart/ | |
# Install on Fedora | |
dnf install -y wireguard-tools | |
# Install on Raspberry Pi OS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Steps on a clean Raspberry Pi OS memory card: | |
# 0. Edit variables at the start of this script | |
# 1. Add this script to /init.sh | |
# 2. Add a cronjob /etc/cron.d/init: echo '@reboot root /bin/bash /init.sh 1> /init.log 2>&1 && rm /etc/cron.d/init' | |
# 3. Add userconf to boot pratition: echo "pi:$(echo 'mypassword' | openssl passwd -6 -stdin)" | |
# 4. Add configuration for wifi: | |
# SSID="MySSID" | |
# PSK="mypassword" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import sys | |
import bs4 | |
import requests | |
ref = sys.argv[1] | |
url = f"https://www.legelisten.no/leger/{ref}" | |
content = requests.get(url).text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat > openssl.cnf <<EOF | |
[ ca ] | |
default_ca = ca_default | |
[ ca_default ] | |
dir = ./ca | |
certs = \$dir\certs | |
crl_dir = \$dir/crl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using Hashicorp Vault with Zabbix is not a very good idea | |
# https://www.zabbix.com/documentation/6.0/en/manual/config/secrets | |
mkdir /tmp/zabbix-vault-test | |
cd /tmp/zabbix-vault-test | |
git clone [email protected]:paalbra/zabbix-simple.git | |
cd zabbix-simple | |
echo 'diff --git a/docker-compose.yml b/docker-compose.yml | |
index 550ef48..c3dd95f 100644 | |
--- a/docker-compose.yml |
dump1090-fa seems to be most up to date.
https://github.com/adsbxchange/dump1090-fa
TLDR (the dump1090-fa package kindof wants you to use lighttpd):
Download for 2MiB size.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Command that provides disk usage for a given path. | |
.DESCRIPTION | |
Command that provides disk usage for a given path. Needs DU from Sysinternals. | |
.EXAMPLE |
OlderNewer