Skip to content

Instantly share code, notes, and snippets.

View gist:2f2d523f5f0456a6fd2d0339c5743cb2
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
@joltcan
joltcan / streamdeck.ino
Created Apr 23, 2021
Streamdeck - Seeeduino XIAO version
View streamdeck.ino
/*
* 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
View get-cloudflare-ips.sh
#!/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"
View wg_server_create.sh
#!/bin/bash
INTERFACE="wg0"
WGDIR=/etc/wireguard
WGCONF="$WGDIR/$INTERFACE.conf"
WGPORT="51820"
cd $WGDIR
if [ -f "$WGDIR/wg_private.key" ]
then
View wg-interface.conf
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
@joltcan
joltcan / backup-db.sh
Created Nov 25, 2019
Rolling backup for mariadb. Rsync $BACKUPPATH to some other $HOST to have a rolling backup.
View backup-db.sh
#!/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
@joltcan
joltcan / gen-wireguard-client.sh
Last active Feb 17, 2020
Generate wireguard client configuration
View gen-wireguard-client.sh
#!/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>"
@joltcan
joltcan / myweechat.md
Created Nov 8, 2018 — forked from pascalpoitras/myweechat.md
My always up-to-date WeeChat configuration (weechat-dev)
View myweechat.md

WeeChat Screenshot

You need at least WeeChat 2.3 for everything to work

Enable mouse

/mouse enable

@joltcan
joltcan / fnmatch-exclude.txt
Last active Mar 30, 2018
Exclude file for fnmatch-based backup programs, like borg.
View fnmatch-exclude.txt
## Excludes based on Crashplan defaults (https://support.code42.com/CrashPlan/4/Troubleshooting/What_is_not_backing_up)
#
# Generic list
.DS_Store
*.swp
*.pyc
.Trash
.Xauthority
.bash_sessions
*/.[cC]ache
View restic-exclude
# Excludes based on Crashplan defaults (https://support.code42.com/CrashPlan/4/Troubleshooting/What_is_not_backing_up)
*.DS_Store
*.swp
*.pyc
.Trash
.Xauthority
.bash_sessions
.cache
**/.tmp
**/temp/