- Purpose: Set up a WireGuard VPN Docker bridge network to route specific Docker containers' traffic through a VPN without affecting the host or other containers.
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 | |
sudo mount -o rw,remount / | |
mkdir -p /home/phablet/aptcache | |
sudo mount --bind /home/phablet/aptcache /var/cache/apt | |
sudo apt update | |
sudo apt install -y anbox-ubuntu-touch android-tools-adb |
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 | |
# | |
# Credit: http://cloudinservice.com/tune-apache-performance-using-mpm-prefork-module/ | |
# | |
ps -ylC ${1} | awk '{x += $8;y += 1} END {print "Process Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}'; |
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 | |
# | |
# @Author: Josh Sunnex | |
# @Date: 2019-01-31 10:26:00 | |
# @Last Modified by: josh5 | |
# @Last Modified time: 2019-01-31 10:36:07 | |
# | |
# usage: | |
# curl -sSL https://gist.githubusercontent.com/Josh5/ff6ccfe4c75ae27a3f1efebcb645e7c4/raw/calculate_apache_mpm_config.sh | bash -s [PID] | |
# |
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
# The idea of this series of commands is to rename your home folder files asynchronously. | |
# If you do your whole /home/ folder in one go, it will take forever. Better to open up several terminals and run this command splitting up the task | |
HOME_DIR=/mnt/encrypted/home/josh5 | |
OLD_USER= | |
# Make a temp directory. | |
# This is where we run from to prevent our for loop from checking every folder if we add '*' | |
mkdir -p /tmp/blah | |
cd /tmp/blah |
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 | |
# @Author: jsunnex | |
# @Date: 2017-10-02 10:18:03 | |
# @Last Modified by: jsunnex | |
# @Last Modified time: 2018-08-17 14:06:36 | |
# | |
# | |
# Use this script to backup your systemo config for quick redeploy | |
# | |
# chmod +x /opt/cloudsync.sh |
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 | |
# | |
# @Author: Josh Sunnex | |
# @Date: 2018-08-13 12:54:13 | |
# @Last Modified by: Josh.5 | |
# @Last Modified time: 2019-03-17 11:50:19 | |
# | |
# bash -c "$(curl -sSL https://gist.githubusercontent.com/Josh5/14bbb2e69b701693fee5790c7f5989b3/raw/SETUP.sh)"; | |
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 | |
# | |
# @Author: Josh Sunnex | |
# @Date: 2018-08-13 12:54:13 | |
# @Last Modified by: Josh Sunnex | |
# @Last Modified time: 2018-08-13 12:54:13 | |
# | |
NOW="$(date +'%Y-%m-%d_%H.%M.%S')"; | |
DIR="/tmp/dpkg-get/"; |