git clone https://github.com/certbot/certbot /opt/letsencrypt
ln -s /opt/letsencrypt/certbot-auto /usr/bin/certbot
certbot certonly --expand --agree-tos --text --non-interactive \
--standalone \
# Specs: | |
# - SKR 1.2 Pro | |
# - TMC2209 | |
# - 1.8 stepper on XYZ | |
# - Dual Z | |
# - BLTouch | |
# - Sensorless homing on X | |
# - Physical endstops on Y | |
# - BMG extruder with 1.8 stepper | |
# - e3d Volcano with 12V 40 watts heater |
# This file contains common pin mappings for the BIGTREETECH SKR mini | |
# E3 v1.2. To use this config, the firmware should be compiled for the | |
# STM32F103 with a "28KiB bootloader". Also, select "Enable extra | |
# low-level configuration options" and configure "GPIO pins to set at | |
# micro-controller startup" to "!PC13". | |
# The "make flash" command does not work on the SKR mini E3. Instead, | |
# after running "make", copy the generated "out/klipper.bin" file to a | |
# file named "firmware.bin" on an SD card and then restart the SKR | |
# mini E3 with that SD card. |
import argparse | |
CONSOLE_ARGUMENTS = None | |
def test(): | |
print(CONSOLE_ARGUMENTS.color_enabled) | |
def main(): | |
parser = argparse.ArgumentParser(description='test script with global argparse') |
git clone https://github.com/certbot/certbot /opt/letsencrypt
ln -s /opt/letsencrypt/certbot-auto /usr/bin/certbot
certbot certonly --expand --agree-tos --text --non-interactive \
--standalone \
#!/bin/bash | |
TARGET="mysite.example.net"; | |
RECIPIENT="hostmaster@mysite.example.net"; | |
DAYS=7; | |
echo "checking if $TARGET expires in less than $DAYS days"; | |
expirationdate=$(date -d "$(: | openssl s_client -connect $TARGET:443 -servername $TARGET 2>/dev/null \ | |
| openssl x509 -text \ | |
| grep 'Not After' \ | |
|awk '{print $4,$5,$7}')" '+%s'); | |
in7days=$(($(date +%s) + (86400*$DAYS))); |
# allow pbcopy | pbpase on OSX | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
# set colours | |
set -g default-terminal "screen-256color" | |
# use ctrl+a rather than ctrl+b (capslock == ctrl) | |
unbind C-b | |
set-option -g prefix C-a | |
bind C-a send-prefix |
#!/bin/bash | |
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'` | |
for JAIL in $JAILS | |
do | |
fail2ban-client status $JAIL | |
done |