Coder Social home page Coder Social logo

scripts's Introduction

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

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

scripts's People

Contributors

seriousm avatar

Watchers

 avatar

Forkers

linuxguruji

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.