pvesh get /cluster/nextid
pct create 100 \
local:vztmpl/ubuntu-16.04-standard_16.04-1_amd64.tar.gz \
--cores 2 --cpuunits 1024 \
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! |
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. """ |
# 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 |
This guide will walk you through the steps required to grow a partition in Linux. You will have to reboot through this guide.
Often, you will want to grow the partition table because you made your virtual hard disk too small, and you tried to extend it in your hypervisor, only to find out that your partition is still the same size as it was before.
# Get editor completions based on the config schema | |
"$schema" = 'https://starship.rs/config-schema.json' | |
# Inserts a blank line between shell prompts | |
add_newline = true | |
#format = """ | |
#[╭─user───❯](bold blue) $username | |
#[┣─system─❯](bold yellow) $hostname | |
#[┣─project❯](bold red) $directory$rust$git_branch$git_status$package$golang$terraform$docker_context$python$docker_context$nodejs |
#! /usr/bin/env sh | |
# Create unprivileged Alpine linux user. Run this script as root/sudo | |
# Don't prompt for password and make group same as username, default path & shell | |
adduser -D -g appuser appuser | |
# Set a decent random password (aiming for a 256 bit security level, but better than "monkey") | |
PW=$(head -c 32 /dev/urandom | base64) && echo -e "$PW\n$PW" | passwd appuser && unset PW |
# External network (WAN) connection watchdog | |
# | |
# Tested and works in RouterOS 6.49.17 (stable) | |
# | |
# If device gets 10 unsuccessfull pings to all ips in $pingAdresses array, it will try to restart the | |
# LTE modem and its interface - multiple times (RebootThreshold - ResetThreshold), until the | |
# RebootThreshold is met. Then the device reboots completely. | |
# | |
# How to kill the routeros script/job? | |
# With terminal: |
Rather than set up even more infrastructure, I run Proxmox Backup Server on the same machine that's running a Proxmox VE host.
Open a shell on your Proxmox VE host. We'll be installing PBS alongside Proxmox VE at the OS level. We will NOT run PBS inside a container.