<commit_before>#!/usr/bin/env bash

### hardware
# ...

### core/base
# enable additional repositories & add 3rd party ones
sudo sed -i -e '/ partner/ s/# //' /etc/apt/sources.list         # Partner
sudo sed -i -e '/extras.ubuntu.com/ s/# //' /etc/apt/sources.list            # Extras
sudo sh -c "echo 'deb http://download.virtualbox.org/virtualbox/debian '$(lsb_release -cs)' contrib non-free' > /etc/apt/sources.list.d/virtualbox.list" && wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -           # Virtualbox
echo "deb http://linux.dropbox.com/ubuntu $(lsb_release -cs) main" |sudo tee -a /etc/apt/sources.list.d/dropbox.list && sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 1C61A2656FB57B7E4DE0F4C1FC918B335044912E            # Dropbox
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" |sudo tee --append /etc/apt/sources.list.d/google.list         # Google Chrome repo
sudo apt-add-repository -y ppa:pipelight/stable         # Silverlight OSS counterpart
# update /etc/passwd hashing algorithm
#sudo authconfig --passalgo=sha512 --update
# allow root only on tty1
#sudo echo "tty1" /etc/securetty
# only root can view /root dir
#sudo chmod 0700 /root

### sysadmin
sudo apt-get update -q && sudo apt-get install -y \
    ssh \
    htop \
    cifs-utils \
    unzip \
    unrar \
    p7zip-full \
    p7zip-rar \
    tcpdump \
    tree \
    nmap \
    iptraf-ng \
    python-setuptools \
 && sudo easy_install pip

### server
# KVM/QEMU+libvirt
#sudo apt-get update -q && sudo apt-get install -y \
#    qemu-kvm \
#    libvirt-bin \
#    bridge-utils \
#    libguestfs-tools 
# (headless) Virtualbox
sudo apt-get -y install build-essential dkms VirtualBox-5.1
cd /tmp && wget http://download.virtualbox.org/virtualbox/5.1.6/Oracle_VM_VirtualBox_Extension_Pack-5.1.6.vbox-extpack
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-*
cd
# Docker (repo config included)
sudo apt-get install -y linux-image-extra-$(uname -r)
echo "aufs" |sudo tee -a /etc/modules
sudo modprobe aufs
curl -sSL https://get.docker.com | sh
#sudo DEFAULT_FORWARD_POLICY="DROP" -> "ACCEPT" /etc/default/ufw
#sudo ufw reload
#sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker
#sudo sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io
#sudo update-rc.d docker.io defaults
# Vagrant
wget https://releases.hashicorp.com/vagrant/1.8.1/vagrant_1.8.1_x86_64.deb
sudo dpkg -i vagrant_1.8.1_x86_64.deb
sudo apt-get -y install libxslt-dev libxml2-dev libvirt-dev zlib1g-dev
vagrant plugin install vagrant-rekey-ssh \
    vagrant-mutate \<commit_msg>utilize Docker official repo and update to the latest version<commit_after>#!/usr/bin/env bash

### hardware
# ...

### core/base
# enable additional repositories & add 3rd party ones
sudo sed -i -e '/ partner/ s/# //' /etc/apt/sources.list         # Partner
sudo sed -i -e '/extras.ubuntu.com/ s/# //' /etc/apt/sources.list            # Extras
sudo sh -c "echo 'deb http://download.virtualbox.org/virtualbox/debian '$(lsb_release -cs)' contrib non-free' > /etc/apt/sources.list.d/virtualbox.list" && wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -           # Virtualbox
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys <KEY> && echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -c -s) main" |sudo tee -a /etc/apt/sources.list.d/docker.list
echo "deb http://linux.dropbox.com/ubuntu $(lsb_release -cs) main" |sudo tee -a /etc/apt/sources.list.d/dropbox.list && sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 1C61A2656FB57B7E4DE0F4C1FC918B335044912E            # Dropbox
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" |sudo tee --append /etc/apt/sources.list.d/google.list         # Google Chrome repo
sudo apt-add-repository -y ppa:pipelight/stable         # Silverlight OSS counterpart
# update /etc/passwd hashing algorithm
#sudo authconfig --passalgo=sha512 --update
# allow root only on tty1
#sudo echo "tty1" /etc/securetty
# only root can view /root dir
#sudo chmod 0700 /root

### sysadmin
sudo apt-get update -q && sudo apt-get install -y \
    ssh \
    htop \
    cifs-utils \
    unzip \
    unrar \
    p7zip-full \
    p7zip-rar \
    tcpdump \
    tree \
    nmap \
    iptraf-ng \
    python-setuptools \
 && sudo easy_install pip

### server
# KVM/QEMU+libvirt
#sudo apt-get update -q && sudo apt-get install -y \
#    qemu-kvm \
#    libvirt-bin \
#    bridge-utils \
#    libguestfs-tools 
# (headless) Virtualbox
sudo apt-get -y install build-essential dkms VirtualBox-5.1
cd /tmp && wget http://download.virtualbox.org/virtualbox/5.1.6/Oracle_VM_VirtualBox_Extension_Pack-5.1.6.vbox-extpack
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-*
cd
# Docker (repo config included)
echo "aufs" |sudo tee -a /etc/modules
sudo modprobe aufs
sudo apt-get update -q && sudo apt-get install -y \
    linux-image-extra-$(uname -r) \
    build-essential \
    apt-transport-https \
    ca-certificates \
    docker-engine
#sudo DEFAULT_FORWARD_POLICY="DROP" -> "ACCEPT" /etc/default/ufw
#sudo ufw reload
#sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker
#sudo sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io
#sudo update-rc.d docker.io defaults
# Vagrant
wget https://releases.hashicorp.com/vagrant/1.8.1/vagrant_1.8.1_x86_64.deb
sudo dpkg -i vagrant_1.8.1_x86_64.deb
sudo apt-get -y install libxslt-dev libxml2-dev libvirt-dev zlib1g-dev
vagrant plugin install vagrant-rekey-ssh \
    vagrant-mutate \
{'fraction_non_alphanumeric': 0.13569829516101256, 'fraction_numerical': 0.023764422249009817, 'mean_word_length': 3.0249480249480247, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 8, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1977349', 'n_tokens_mistral': 2310, 'n_tokens_neox': 2106, 'n_words': 515}