Skip to content

Instantly share code, notes, and snippets.

@yuq-1s
Last active July 3, 2018 00:06
Show Gist options
  • Save yuq-1s/4f0821633d5de62ed8e79083453679d2 to your computer and use it in GitHub Desktop.
Save yuq-1s/4f0821633d5de62ed8e79083453679d2 to your computer and use it in GitHub Desktop.
The way I set up a new Ubuntu 16.04 when Windows Update kills all my data
# disable system problem detected
sudo sed -i 's/enabled=1/enabled=0/' /etc/default/apport
# update and install necessary software
## shadowsocks-libev
sudo apt-get install software-properties-common -y
sudo add-apt-repository ppa:max-c-lv/shadowsocks-libev -y
sudo apt-get update
sudo apt install shadowsocks-libev -y
## aptitude, git
sudo apt install aptitude -y
sudo aptitude install git python3-pip curl cmake python-dev -y
## install google-chrome (may need to fan qiang)
# wget -O chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && sudo dpkg -i chrome.deb
# install ccsm for inverting color
sudo aptitude install compizconfig-settings-manager
sudo aptitude install compiz-plugins
# recover old config files
cd && mkdir recover && cd recover && scp -P 27393 yyy@23.105.216.64:recover.zip . && unzip recover.zip && export OLD_HOME=$HOME/recover/home/yuq
cd ~/.config/dconf && mv user user.old && cp $OLD_HOME/.config/dconf/user .
cp $OLD_HOME/.config/autostart ~/.config
# setup Vim
sudo apt-add-repository ppa:neovim-ppa/stable -y
sudo apt-get update
sudo apt-get install neovim
pip3 install --user neovim # python3 support for youcompeleteme
## install vim-plug
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
## restore vimrc
cp $OLD_HOME/.vimrc $HOME/.config/nvim/init.vim
### TODO: run PlugInstall in vim
cd $HOME/.config/dotfiles/vim/plugin/youcompleteme && ./install.py
# Config git
git config --global core.editor "vim"
git config --global user.email "zxdewr@sjtu.edu.cn"
git config --global user.name "yuq"
# setup ssh keys
ssh-keygen -t ecdsa
#TODO: copy $HOME/.ssh/id_ecdsa.pub to bitbucket.com github.com and remote server
# setup python
sudo -H pip3 install jupyter matplotlib
sudo aptitude install python3-tk # for pyplot
# Install sogou input method
sudo dpkg -i sogoupinyin_2.2.0.0108_amd64.deb
sudo apt-get install -f # DO NOT use aptitude here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment