Skip to content

Instantly share code, notes, and snippets.

View Vedrillan's full-sized avatar

David Wattier Vedrillan

View GitHub Profile
@Vedrillan
Vedrillan / lxcremove
Created November 15, 2018 13:40
Script used to remove the lxc container
#!/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
@Vedrillan
Vedrillan / lxcdeploy
Last active January 16, 2019 09:30
Script used to create the lxc container
#!/bin/bash
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-n|--name)
NAME="$2"
@Vedrillan
Vedrillan / .gitmessage
Last active November 22, 2018 11:17
File used as template for Git commit message.
# 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. -------------------|
@Vedrillan
Vedrillan / commit-msg
Last active December 31, 2018 10:03
Git hooks
#!/usr/bin/python3
import sys
import re
def print_error(msg):
print("\033[91m" + "[error] " + "\033[0m" + msg, file=sys.stderr)