This file contains 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 | |
BACKUPHOST=10.20.30.40 | |
PASSWORD=fettmepara | |
USERNAME=sst_user | |
BACKUPPATH=/backup/db | |
OPTIONS="--backup --compress --compress-threads=4 --host $BACKUPHOST --user $USERNAME --password=$PASSWORD" | |
STARTDAY=1 # 0=Sun, 1=Mon etc |
This file contains 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
auto wg0 | |
iface wg0 inet static | |
address <changeme>.1 | |
netmask 255.255.255.0 | |
pre-up ip link add $IFACE type wireguard | |
pre-up wg setconf $IFACE /etc/wireguard/$IFACE.conf | |
post-down ip link del $IFACE |
This file contains 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 | |
INTERFACE="wg0" | |
WGDIR=/etc/wireguard | |
WGCONF="$WGDIR/$INTERFACE.conf" | |
WGPORT="51820" | |
cd $WGDIR | |
if [ -f "$WGDIR/wg_private.key" ] | |
then |
This file contains 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 | |
# License: MIT | |
# Author: Fredrik Lundhag <f@mekk.com> | |
# Date: 2020-02-17 | |
# | |
# range for the VPN itself | |
IPRANGE=192.168.255.1/24 | |
WGSERVER="<hostname or IP of the vpn server>" |
This file contains 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
<?php | |
// simple proxy from Grafana to Pushbullet. Bare minimum. | |
// please update Access-token to your liking. Feel free to use device_iden if | |
// you want to send to a specific device. Default is all. | |
// usage: example.com/pushbullet-proxy.php?title=test&body=testbody | |
// Find your token here: https://www.pushbullet.com/#settings/account | |
$access_token = '<my token>'; |
This file contains 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
/* | |
* Project 'Stream Cheap' Mini Macro Keyboard. Modified to work with Seeeduino XIAO | |
* @author David Madison, modified by Fredrik Lundhag <f@mekk.com> | |
* @link partsnotincluded.com/electronics/diy-stream-deck-mini-macro-keyboard | |
* @license MIT - Copyright (c) 2018 David Madison | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains 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
2021-11-30T12:54:26.603+0100 [DEBUG] Adding temp file log sink: /tmp/terraform-log028892851 | |
2021-11-30T12:54:26.603+0100 [INFO] Terraform version: 1.0.11 | |
2021-11-30T12:54:26.603+0100 [INFO] Go runtime version: go1.16.4 | |
2021-11-30T12:54:26.603+0100 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply"} | |
2021-11-30T12:54:26.603+0100 [DEBUG] Attempting to open CLI config file: /home/jolt/.terraformrc | |
2021-11-30T12:54:26.603+0100 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2021-11-30T12:54:26.603+0100 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins | |
2021-11-30T12:54:26.603+0100 [DEBUG] ignoring non-existing provider search directory /home/jolt/.terraform.d/plugins | |
2021-11-30T12:54:26.603+0100 [DEBUG] ignoring non-existing provider search directory /home/jolt/.local/share/terraform/plugins | |
2021-11-30T12:54:26.603+0100 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins |
This file contains 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 | |
# add this to crontab for automatic updates: | |
# @daily root /path/to/get-cloudflare-ips.sh | |
FILENAMEv4="/etc/network/cloudflare-ips-v4.new" | |
EXISTINGv4="/etc/network/cloudflare-ips-v4" | |
FILENAMEv6="/etc/network/cloudflare-ips-v6.new" | |
EXISTINGv6="/etc/network/cloudflare-ips-v6" |
This file contains 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 | |
# Copyright (C) 2016 Fredrik Lundhag - f@mekk.com | |
# Simple script to get VPS bandwidth usage into collectd with the exec plugin. | |
# Should work for all VPS providers that uses SolusVM for VPS control panel. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
This file contains 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 | |
CRTFILE=~/.acme.sh/domain.com_ecc/fullchain.cer | |
KEYFILE=~/.acme.sh/domain.com_ecc/domain.com.key | |
CRTNAME="Acme.sh domain.com $(date +%Y-%m-%d)" | |
ADMINPORT=8444 | |
APITOKEN="<apitoken>" | |
for FIREWALL in vpnhost1 vpnhost2 | |
do | |
POSTCERT=$(echo -n '{"type":"regular","certname":"'"${CRTNAME}"'","scope":"global","file_content":"'$(base64 -w0 ${CRTFILE})'","key_file_content":"'$(base64 -w0 ${KEYFILE})'"}' | \ |