This file contains hidden or 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
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
This file contains hidden or 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 | |
function getURL($loc) { | |
switch ($loc) { | |
case "CU": | |
$host = $config->aulaIntegration->uniURL; | |
// wed don't need this | |
// $apiKey = $config->aulaIntegration->uniKey; | |
break; | |
case "CULC": |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |