<commit_before>#!/bin/bash

echo "This script installs the necessary details for this host to become a vagrant box."
echo -n "Press enter to continue..."
read

echo "Setting up grub timeout..."
sed -i 's/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=1/' /etc/default/grub
update-grub

echo "Setting up /etc/sudoers..."
apt-get install -y sudo
add
sed -i 's/%sudo ALL=(ALL:ALL) ALL/%sudo ALL=NOPASSWD: ALL/' /etc/sudoers
grep -q 'Defaults *env_keep+=SSH_AUTH_SOCK' /etc/sudoers || echo 'Defaults    env_keep+=SSH_AUTH_SOCK' >> /etc/sudoers

echo "Setting up ssh..."
mkdir /home/vagrant/.ssh
wget --no-check-certificate "https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub" -O - > /home/vagrant/.ssh/authorized_keys

echo "Installing packages..."
apt-get install -y less
apt-get install -y vim
update-alternatives --set editor /usr/bin/vim.basic
apt-get install -y zerofree
apt-get install -y lsof

apt-get install -y linux-headers-$(uname -r) build-essential

echo
echo "Insert the Virtualbox Guest Addtion CD (HOST+D in console) and press enter..."
read
mount /dev/cdrom /media/cdrom
/media/cdrom/VBoxLinuxAdditions.run

apt-get clean

cat <<EOF<commit_msg>Fixing problem with sudo setup.<commit_after>#!/bin/bash

echo "This script installs the necessary details for this host to become a vagrant box."
echo -n "Press enter to continue..."
read

echo "Setting up grub timeout..."
sed -i 's/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=1/' /etc/default/grub
update-grub

echo "Setting up /etc/sudoers..."
apt-get install -y sudo
cat <<EOF > /etc/sudoers.d/vagrant.sudo
%sudo ALL=NOPASSWD: ALL
Defaults    env_keep+=SSH_AUTH_SOCK
EOF

echo "Setting up ssh..."
mkdir /home/vagrant/.ssh
wget --no-check-certificate "https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub" -O - > /home/vagrant/.ssh/authorized_keys

echo "Installing packages..."
apt-get install -y less
apt-get install -y vim
update-alternatives --set editor /usr/bin/vim.basic
apt-get install -y zerofree
apt-get install -y lsof

apt-get install -y linux-headers-$(uname -r) build-essential

echo
echo "Insert the Virtualbox Guest Addtion CD (HOST+D in console) and press enter..."
read
mount /dev/cdrom /media/cdrom
/media/cdrom/VBoxLinuxAdditions.run

apt-get clean

cat <<EOF
{'fraction_non_alphanumeric': 0.135183527305282, 'fraction_numerical': 0.0008952551477170994, 'mean_word_length': 3.796137339055794, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '316925', 'n_tokens_mistral': 826, 'n_tokens_neox': 786, 'n_words': 238}