pvesh get /cluster/nextid
pct create 100 \
local:vztmpl/ubuntu-16.04-standard_16.04-1_amd64.tar.gz \
--cores 2 --cpuunits 1024 \
# MikroTik (RouterOS) script for automatically setting DNS records | |
# for clients when they obtain a DHCP lease. | |
# | |
# author SmartFinn <https://gist.github.com/SmartFinn> | |
:local dnsTTL "00:15:00"; | |
:local token "$leaseServerName-$leaseActMAC"; | |
# Normalize hostname (e.g. "-= My Phone =-" -> "My-Phone") | |
# - truncate length to 63 chars |
from states import LockedState | |
class SimpleDevice(object): | |
""" | |
A simple state machine that mimics the functionality of a device from a | |
high level. | |
""" | |
def __init__(self): | |
""" Initialize the components. """ |
SWAG - Secure Web Application Gateway (formerly known as linuxserver/letsencrypt) is a full fledged web server and reverse proxy with Nginx, PHP7, Certbot (Let's Encrypt™ client) and Fail2Ban built in. SWAG allows you to expose applications to the internet, doing so comes with a risk and there are security measures that help reduce that risk. This article details how to configure SWAG and enhance it's security.
This article assumes that you already have a functional SWAG setup. Following is the compose yaml used to create the SWAG container referenced in this article. Keep in mind your local mount paths will be different so adjust accordingly.
---
version: "2.1"
services:
swag:
#!/usr/bin/env bash | |
## Configs ## | |
ZFSSNAPSHOTNAME="duplicacy" | |
DUPLICACY_CMD="/root/duplicacy" | |
mountSnapshots () { | |
mkdir -p "/mnt/$ZFSSNAPSHOTNAME" | |
mount -t zfs "$ZFSSNAPSHOTBASE@$ZFSSNAPSHOTNAME" "/mnt/$ZFSSNAPSHOTNAME" |
#!/usr/bin/env bash | |
## Configs ## | |
ZFSSNAPSHOTNAME="rclone" | |
RCLONECONFIGPATH="/root/.config/rclone/rclone.conf" | |
BWLIMIT="10M" | |
TRANSFERS=15 | |
KEEPSNAPSHOTS=7 | |
usage () |
config_files = Dir.glob("#{ENV['HOME']}/Library/Application Support/Viscosity/OpenVPN/*/config.conf") | |
config_files.each do |file| | |
certificate_files = ['ca', 'cert', 'key', 'tls-auth'] | |
config_dir = File.dirname(file) | |
connection_name = nil | |
new_config = [] | |
File.read(file).each_line do |line| | |
line.strip! |
#!/bin/sh | |
#USE AT YOUR OWN RISK. | |
#THIS SCRIPT DOES NOT COME WITH ANY WARRANTY WHATSOEVER. | |
# | |
#Backs up selected nvram variables in "nvram export --set" format. | |
# | |
#Correctly handles multi-line entries. | |
# | |
#Thanks to ryzhov_al for basic approach. |
Installing CYGWIN with SSH | |
1) Download cygwin setup.exe from http://www.cygwin.com | |
- Execute setup.exe | |
- Install from internet | |
- Root directory: `c:\cygwin` + all users | |
- Local package directory: use default value | |
- Select a mirror to download files from | |
- Select these packages: | |
- editors > xemacs 21.4.22-1 | |
- net > openssh 6.1-p |
#!/bin/sh | |
logger -t "nvram_archive" "start script" | |
[ $# -eq 0 ] && { echo "Usage: $0 days_to_keep" ; logger -t "nvram_archive" "end script with error; no arg supplied"; exit 1; } | |
keep_for_days=$1 | |
echo "removing backups older than $keep_for_days days" | |
#keep_for_days=${1-14} | |
logger -t "nvram_archive" "removing backups older than $keep_for_days days" |