Skip to content

Instantly share code, notes, and snippets.

@umarbrowser
Forked from ganine/Vagrantfile
Created December 13, 2017 22:56
Show Gist options
  • Save umarbrowser/b3e7fbc5749e8ebec0b7d2ec8af8c68a to your computer and use it in GitHub Desktop.
Save umarbrowser/b3e7fbc5749e8ebec0b7d2ec8af8c68a to your computer and use it in GitHub Desktop.
Basic Vagrantfile with provisioning shell script
#!/usr/bin/env bash
# Update sources
sudo apt-get update -y
# Git
sudo apt-get install git-core -y
git config --global color.ui true
echo '.*swp' > ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
# Tig
sudo apt-get install tig -y
# Zsh
sudo apt-get install zsh -y
sudo chsh -s $(which zsh) $(whoami)
# Prezto
zsh
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
# tmux
sudo apt-get install tmux -y
# ack!
sudo apt-get install ack-grep -y
echo 'alias ack="ack-grep"' >> ~/.zshrc
# cURL
sudo apt-get install curl -y
# htop
sudo apt-get install htop -y
# Development tools
sudo apt-get install build-essential -y
# Packages required for compilation of some stdlib modules
sudo apt-get install tklib -y
# Extras for RubyGems and Rails
sudo apt-get install zlib1g-dev libssl-dev -y
# Readline Dev on Ubuntu 12.04 LTS
sudo apt-get install libreadline-gplv2-dev -y
# Nokogiri dependencies
sudo apt-get install libxml2 libxml2-dev libxslt1-dev -y
# rbenv
git clone https://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
git clone https://github.com/sstephenson/rbenv-default-gems.git ~/.rbenv/plugins/rbenv-default-gems
echo 'bundler' >> ~/.rbenv/default-gems
# Node.js
sudo apt-get install nodejs -y
# Vim
sudo apt-get install vim -y
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.provision :shell, :privileged => false, :path => "bootstrap_ubuntu1204.sh"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment