This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IMPORTANT! | |
# This gist has been transformed into a github repo | |
# You can find the most recent version there: | |
# https://github.com/Neo23x0/auditd | |
# ___ ___ __ __ | |
# / | __ ______/ (_) /_____/ / | |
# / /| |/ / / / __ / / __/ __ / | |
# / ___ / /_/ / /_/ / / /_/ /_/ / | |
# /_/ |_\__,_/\__,_/_/\__/\__,_/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Usage: dev_signed_cert.sh HOSTNAME | |
# | |
# Creates a CA cert and then generates an SSL certificate signed by that CA for the | |
# given hostname. | |
# | |
# After running this, add the generated dev_cert_ca.cert.pem to the trusted root | |
# authorities in your browser / client system. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
# Ubuntu 18.04 dev Server | |
# Run like - bash install_lamp.sh | |
# Script should auto terminate on errors | |
echo -e "\e[96m Adding PPA \e[39m" | |
sudo add-apt-repository -y ppa:ondrej/apache2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env sh | |
SSH_HOST=host.name | |
BACKUP_DISK="sda" | |
DISK_SIZE_BYTES=$(($(ssh $SSH_HOST "lsblk --all | grep \"$BACKUP_DISK\" | head -1" | while read c1; do echo $c1; done | cut -d" " -f4 | sed "s/G//g") * 1073741824)) | |
BLOCK_SIZE=512 | |
IMAGE_NAME="./sda.disk" | |
[ -f $IMAGE_NAME ] && IMAGE_CUR_SIZE=$(stat -c "%s" $IMAGE_NAME) || IMAGE_CUR_SIZE=0 | |
WRITEN_BLOCKS=$(($IMAGE_CUR_SIZE / $BLOCK_SIZE)) | |
echo -e "Current clone file size: \e[1m$IMAGE_CUR_SIZE\e[0m, total remote disk size: \e[1m$DISK_SIZE_BYTES\e[0m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# shopt -s nullglob | |
shopt -s nocasematch | |
veros=$( grep 'release' /etc/*release | grep release | cut -d " " -f4 | uniq ) | |
#read -p "please enter your ip:" ipinput | |
#ssh -o StrictHostKeyChecking=no $ipnput -l root "main" | |
vminstall() { |