Instantly share code, notes, and snippets.

View lxcremove
#!/bin/bash
NAME=$1
lxc stop -f $NAME
lxc delete $NAME
sudo sed -i "/$NAME.lxd #lxdeploy/d" /etc/hosts
ssh-keygen -qR "$NAME".lxd &>/dev/null
View lxcdeploy
#!/bin/bash
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-n|--name)
NAME="$2"
View .gitmessage
# Summary on the first line, --------------------|
# its length should not exceed 50 characters. ---|
# Leave a blank line between summary and description.
# Description of the commit, you must wrap line at the 72nd mark. -----|
# The description can be as verbose as you see fit. -------------------|
View commit-msg
#!/usr/bin/python3
import sys
import re
def print_error(msg):
print("\033[91m" + "[error] " + "\033[0m" + msg, file=sys.stderr)