openpgp4fpr:1fae94134b0c0dd84c02f4a365a765b2f2118faf
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
#!/usr/bin/env python3 | |
# Python modules | |
import time | |
import sys | |
import signal | |
import getopt | |
from rpi_hardware_pwm import HardwarePWM | |
# Configuration |
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
#!/usr/bin/env bash | |
if ! command -v bbk_cli >/dev/null 2>&1 | |
then | |
echo "ERROR: bbk_cli is not installed!" | |
echo "URL: https://github.com/dotse/bbk" | |
exit 1 | |
fi | |
BBK_OUTPUT=$(bbk_cli --quiet) |
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
#!/usr/bin/env bash | |
set -e | |
set -u | |
if [[ ! -f /etc/debian_version ]] | |
then | |
echo "Script only tested in Debian" | |
exit 1 | |
else |
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
# 'notify-host-by-telegram' command definition | |
define command { | |
command_name notify-host-by-telegram | |
command_line notify-by-telegram -t"[TOKEN]" -c"[CHAT ID]" -m"***** Nagios Host *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | |
} | |
# 'notify-service-by-telegram' command definition | |
define command { | |
command_name notify-service-by-telegram | |
command_line notify-by-telegram -t"[TOKEN]" -c"[CHAT ID]" -m"***** Nagios Service *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" |
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
call plug#begin('~/.vim/plugged') | |
Plug 'ncm2/ncm2' | |
Plug 'roxma/nvim-yarp' | |
Plug 'ncm2/ncm2-bufword' | |
Plug 'ncm2/ncm2-path' | |
Plug 'ncm2/ncm2-jedi' | |
Plug 'Yggdroot/indentLine' | |
Plug 'dense-analysis/ale' | |
call plug#end() | |
autocmd BufEnter * call ncm2#enable_for_buffer() |
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 | |
ipv4_pattern = re.compile(r'^1?[0-9]{1,2}\.1?[0-9]{1,2}\.1?[0-9]{1,2}\.1?[0-9]{1,2}|2[0-4][0-9]\.2[0-4][0-9]\.2[0-4][0-9]\.2[0-4][0-9]|25[0-5]\.25[0-5]\.25[0-5]\.25[0-5]$') |
Work in progress!
I wanted to make a simple Firewall/Router setup with pure Debian and WireGuard remote access.
This is what I came up with by creating a test setup with Debian 10 in VirtualBox.
It requires dnsmasq and WireGuard.
enp0s3
is the WAN interface and enp0s8
is the LAN interface.
The WAN interface get's its IP from DHCP and the LAN interface has a static IP.
allow-hotplug enp0s3
iface enp0s3 inet dhcp
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
#!/usr/bin/env python3 | |
import sms | |
import re | |
import sys | |
import argparse | |
import codecs | |
parser = argparse.ArgumentParser() | |
requiredNamed = parser.add_argument_group('required named arguments') |
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
from mutagen.id3 import ID3, CTOC, CHAP, TIT2, CTOCFlags | |
import time | |
import datetime | |
audioFile = input("Audio file: ") | |
audio = ID3(audioFile) | |
numberOfChapters = int(input("Number of chapters: ")) + 1 |
NewerOlder