Last active
October 4, 2019 09:48
-
-
Save amjltc295/71f6c84c6049f8518730a575c255eccb to your computer and use it in GitHub Desktop.
Public new TWGC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "=============================================================" | |
echo "1. Update and install zsh, curl, git, tmux" | |
sudo apt update | |
sudo apt -y install zsh curl git tmux | |
echo "=============================================================" | |
echo "2. Install vim8 and vimrc" | |
sudo apt-get -y install software-properties-common | |
sudo add-apt-repository -y ppa:jonathonf/vim | |
sudo apt-get -y update | |
sudo apt-get -y install vim | |
git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime | |
sh ~/.vim_runtime/install_awesome_vimrc.sh | |
echo "=============================================================" | |
echo "3. Change conda owner" | |
sudo chown -R ubuntu:ubuntu /opt/conda | |
echo "=============================================================" | |
echo "4. Setup personal vimrc config" | |
echo "inoremap wq <Esc>:wq<CR> | |
map wq <Esc>:wq<CR> | |
map ww <Esc>:w<CR> | |
map qq <Esc>:q!<CR>" > ~/.vim_runtime/my_configs.vim | |
echo "=============================================================" | |
echo "5. Install oh-my-tmux" | |
cd | |
git clone https://github.com/gpakosz/.tmux.git | |
ln -s -f .tmux/.tmux.conf | |
echo "=============================================================" | |
echo "6. Setup tmux config" | |
cp .tmux/.tmux.conf.local . | |
sed -i -e 's/tmux_conf_new_window_retain_current_path=false/tmux_conf_new_window_retain_current_path=true/g' .tmux.conf.local | |
echo "=============================================================" | |
echo "7. Setup fzf" | |
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf | |
~/.fzf/install --all | |
echo "=============================================================" | |
echo "8. Fix opencv GLIBCXX lib path" | |
sudo cp /opt/conda/lib/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | |
# Install ack2 | |
# gcl [email protected]:beyondgrep/ack2.git | |
# cd ack2 | |
# curl -o cpanminus -L http://cpanmin.us | |
# chmod 755 cpanminus | |
#./cpanminus -l extlib File::Next | |
# export PERL5LIB=extlib/lib/perl5 | |
# perl Makefile.PL | |
# make ack-standalone | |
# [alias ack to ack-standalone] | |
# Change password | |
# sudo passwd ubuntu | |
echo "=============================================================" | |
echo "9. Instal oh-my-zsh" | |
sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
echo "zsh -l" >> .bashrc | |
source .bashrc | |
echo "=============================================================" | |
echo "10 Setup zshrc, this includes ssh-key setup" | |
cp /workspace/lustre/Allen/.zshrc ~/ | |
source ~/.zshrc | |
# Allow password login | |
sudo sed -i -e 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config | |
# sudo passwd ubuntu | |
ps aux | grep sshd | |
sudo kill -HUP 70 | |
# Set Git User | |
# git config --global user.email "[email protected]" | |
# git config --global user.name "Ya-Liang Chang (Allen)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wget -O - https://gist.githubusercontent.com/amjltc295/71f6c84c6049f8518730a575c255eccb/raw/5edc664be2361cf4be54febd2e92affacc383550/new_TWGC_setup.sh | bash