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
<?php | |
// Require the autoloader | |
require_once 'vendor/autoload.php'; | |
// Use the library namespace | |
use ProxmoxVE\Proxmox; | |
// Create your credentials array | |
$credentials = [ |
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/sh | |
apt-get -y install git bc | |
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
mkdir /etc/letsencrypt |
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 | |
############################################################ | |
# Get the pre-requisite packages installed | |
############################################################ | |
apt install -y htop iotop iftop | |
apt install -y curl apt-transport-https | |
# Install docker | |
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - |
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
docker ps -q | xargs -n 1 docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} {{ .Name }}' | sed 's/ \// /' |
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
# | |
# https://www.sublimetext.com/docs/3/linux_repositories.html | |
# | |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
sudo apt install apt-transport-https | |
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
sudo apt update && sudo apt install sublime-text |
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 | |
############################################################ | |
# Count Number of BIND Zone files | |
############################################################ | |
cd /var/named | |
echo -n 'Total Zones: ' | |
ls -lh *.db | wc -l |
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 | |
# ========================================================== | |
# Instructions from https://documentation.cpanel.net/display/CKB/How+to+Disable+Network+Manager | |
# ========================================================== | |
systemctl stop NetworkManager.service | |
systemctl disable NetworkManager.service | |
echo "NM_CONTROLLED=no" > /etc/sysconfig/network-scripts/ifcfg-eth0 | |
systemctl enable network.service | |
systemctl start network.service | |
yum remove NetworkManager |
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 | |
# --------------------------------------- | |
# Virtual Machine Setup | |
# --------------------------------------- | |
# Adding multiverse sources. | |
cat > /etc/apt/sources.list.d/multiverse.list << EOF | |
deb http://archive.ubuntu.com/ubuntu trusty multiverse | |
deb http://archive.ubuntu.com/ubuntu trusty-updates multiverse |
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/sh | |
# Credits to: | |
# - http://vstone.eu/reducing-vagrant-box-size/ | |
# - https://github.com/mitchellh/vagrant/issues/343 | |
aptitude -y purge ri | |
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide | |
aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30 | |
aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5 |
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/sh | |
# PATH TO YOUR HOSTS FILE | |
ETC_HOSTS=/etc/hosts | |
# DEFAULT IP FOR HOSTNAME | |
IP="127.0.0.1" | |
# Hostname to add/remove. | |
HOSTNAME=$1 |