contains several scripts and docs, thanks to https://github.com/mathiasbynens/dotfiles for the basics!
Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.config/terminator
.fonts
.bash_aliases
.bash_profile
.bash_prompt
.bashrc
.gemrc
.git_prompt
.gitattributes
.gitconfig
.inputrc
README.md
apt-install.sh
auth-check.sh
bootstrap.sh
sync-files.sh

README.md

SeriousM’s dotfiles

Installation

Using Git and the bootstrap script

You can clone the repository wherever you want. (I like to keep it in ~/Projects/scripts, with ~/scripts as a symlink.) The bootstrapper script will pull in the latest version and copy the files to your home folder.

git clone https://github.com/SeriousM/scripts.git && cd scripts && set -- -f && source bootstrap.sh ; cd .. ; rm -rf scripts

Sync files only

git clone https://github.com/SeriousM/scripts.git && cd scripts && source sync-files.sh ; cd .. ; rm -rf scripts

To update, cd into your local scripts repository and then:

source bootstrap.sh

Alternatively, to update while avoiding the confirmation prompt:

set -- -f; source bootstrap.sh

Git-free install

To install these dotfiles without Git:

cd; curl -#L https://github.com/SeriousM/scripts/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,bootstrap.sh,apt-install.sh,sync-files.sh,auth-check.sh}

To update later on, just run that command again.

File-Sync only

. sync-files.sh

Extending the default script

It's not recomended to change the schripts because they get overwritten with the next update. Modifying the .bash_env file is a better way to add custom scripts.

Installing rbenv

echo "Installing rbenv to ~/.rbenv"
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv

echo "Installing ruby-build"
git clone git://github.com/sstephenson/ruby-build.git /tmp/ruby-build
cd /tmp/ruby-build

sudo ./install.sh
# export PREFIX=~ && ./install.sh # use this if you cannot sudo

cd -
rm -rf /tmp/ruby-build

echo "Installing ruby 2.1.0"
rbenv install 2.1.0
echo "setting ruby 2.1.0 as global default"
rbenv global 2.1.0
echo "recreating rbenv shims"
rbenv rehash

echo "updating system gems"
gem update --system
echo "installing gems bundler and rails"
gem install bundler
gem install rails

echo "reload shell"
exec $SHELL -l

Uninstalling RVM

echo "yes" | rvm implode
sudo rm -rf ~/.rvm
sudo rm -rf ~/.rvmrc
sudo rm -rf /etc/rvmrc

Installing RVM

# install / upgrade rvm
echo "installing rvm"
curl -s -L get.rvm.io | bash -s stable --auto
. ~/.bash_profile
rvm reload

echo "enable rvm autolibs"
rvm autolibs enable > /dev/null

echo "installing rvm requirements"
rvm requirements > /dev/null

echo "installing ruby 1.9.3"
rvm install 1.9.3

echo "setting up ruby 1.9.3 as default version to use"
rvm use 1.9.3
rvm --default use 1.9.3-p392
rvm rvmrc warning ignore allGemfiles

echo "installing bundler"
gem install bundler
echo "installing rails 3.2.13"
gem install rails -v 3.2.13

echo "reload shell"
exec $SHELL -l

TMUX

Crash Course, dotFiles, practical-tmux

TMUX && Koding.com

Install tmux:

sudo apt-get install tmux

Write in ~/.tmux.conf (ctrl-y will be the tmux prefix, as ctrl-b conflicts with koding's screen session. See the tmux manual pages to understand how to use the prefix command.):

set-option -g prefix C-y
new-session

In the end of ~/.bashrc or ~/.bash_env:

if which tmux 2>&1 >/dev/null; then
    [[ ( $TERM == "screen" ) && ( -z $TMUX ) ]] && tmux attach \
    && echo '+---------------------------+' \
    && echo '| The tmux prefix is ctrl-y |' \
    && echo '+---------------------------+' \
    && exit
fi

Now, you can close your terminal window, it comes back when you reopen it within 15 minutes. The session remains alive during 15 minutes, until koding shuts down your VM. I wish they hibernated it instead.

See the Wiki for more tmux

Troubleshooting

bash: $'\r': command not found: that means that a windows-line-ending was found in one of the executed scripts. usually this error can be found in the .bash_env. To fix this error you need to delete every line ending and re-enter them.

Credits

https://github.com/mathiasbynens/dotfiles