Skip to content

Instantly share code, notes, and snippets.

@viniciusnz
Created January 6, 2017 22:22
Show Gist options
  • Save viniciusnz/d60d94797a74a6cd69840c8de4370c9d to your computer and use it in GitHub Desktop.
Save viniciusnz/d60d94797a74a6cd69840c8de4370c9d to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Adriano Mitre, 2016-09-19
#
mkdir -p ~/Downloads
cd ~/Downloads
NUM_CORES=6
# Git
sudo apt-get -y install build-essential libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip
wget https://www.kernel.org/pub/software/scm/git/git-2.10.2.tar.xz
tar xvJf git-2.10.2.tar.xz
cd git-2.10.2
./configure
make -j$NUM_CORES
sudo make install
cd ..
rm -rf git-2.10.2
# jemalloc
sudo apt-get -y build-dep jemalloc
wget https://github.com/jemalloc/jemalloc/releases/download/4.2.1/jemalloc-4.2.1.tar.bz2
tar xvjf jemalloc-4.2.1.tar.bz2
cd jemalloc-4.2.1
./configure
make -j$NUM_CORES
sudo make install
cd ..
rm -rf jemalloc-4.2.1
# rbenv
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
echo 'export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
# ruby-build
cd ~
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
# ruby
sudo apt-get -y install libssl-dev libreadline-dev libcurl4-openssl-dev
CONFIGURE_OPTS="--with-jemalloc" MAKE_OPTS="-j$NUM_CORES" rbenv install 2.3.1
# Sublime Text
wget https://download.sublimetext.com/sublime-text_build-3126_amd64.deb
sudo dpkg -i sublime-text_build-3126_amd64.deb
# MySQL
sudo apt-get -y install mysql-server mysql-client libmysqlclient-dev
# ruby gems
rbenv global 2.3.1
gem install bundle
gem install mysql2
# Gympass app (assume que você tem conta no GitHub e tem chave pública autorizada)
cd ~
mkdir -p projects
cd ~/projects
git clone https://github.com/viniciusnz/GymPass
cd ~/projects/GymPass
bundle install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment