apt-get update
apt-get install -y build-essential flex bison libreadline-dev libssl-dev gettext libtiff-dev uuid-dev libjansson-dev libxml2-dev libsqlite3-dev doxygen libncurses-dev libtool automake autoconf linux-headers-4.9.0-4-amd64 linux-headers-4.9.0-4-common linux-kbuild-4.9 wget vim
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 | |
# Simple tool to automate fetching videos on MacOSX from YouTube | |
# Installing dependencies: | |
# pip install youtube-dl | |
# brew install libav | |
echo "Resetting clipboard ..." | |
echo "-" | pbcopy |
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
# Create a folder for our new root structure | |
$ export centos_root='/centos_image/rootfs' | |
$ mkdir -p $centos_root | |
# initialize rpm database | |
$ rpm --root $centos_root --initdb | |
# download and install the centos-release package, it contains our repository sources | |
$ yum reinstall --downloadonly --downloaddir . centos-release | |
$ rpm --root $centos_root -ivh centos-release*.rpm | |
$ rpm --root $centos_root --import $centos_root/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 | |
# install yum without docs and install only the english language files during the process |
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
# List of maps | |
listener = [{ | |
instance_port = "${var.backend_port}" | |
instance_protocol = "${var.backend_protocol}" | |
lb_port = 80 | |
lb_protocol = "http" | |
},{ | |
instance_port = "${var.backend2_port}" | |
instance_protocol = "${var.backend2_protocol}" | |
lb_port = 8080 |
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
# IF statements | |
# Note: a variable which has value is true | |
if (var1) {} | |
else if (var1 || var && var3) {} | |
else if (var2) {} | |
else {} | |
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
# Convert an existing docker container into a "docker run" command line. | |
# | |
# This is useful when trying to debug containers that have been created | |
# by orchestration tools. | |
# | |
# Install jq: stedolan.github.io/jq/ | |
function format_run() { | |
cid=$1 |