/setup

Primary LanguageShell

How to setup a simple working environment quickly.

SSH config

copy ssh public key and private key to ~/.ssh/

~/.ssh/config file:

Host liuxueyang-gitee
     HostName gitee.com
     User git
     IdentityFile ~/.ssh/gitee_liuxueyang

config user email and name:

git config --global user.email "liuxueyang457@gmail.com"
git config --global user.name "liuxueyang"

Clone repository

mkdir ~/fun/
cd ~/fun/
git clone git@liuxueyang-gitee:liuxueyang/setup.git
cd setup

git config --local user.email "liuxueyang457@gmail.com"
git config --local user.name "liuxueyang"

XTerm

minimal xterm configuration

cd ~/fun/setup
cat simple-xterm-config >> ~/.Xresources
xrdb -merge ~/.Xresources

Xresources

TODO

cd ~/fun/setup
cp -i .Xresources ~/

Tmux

oh my tmux

git clone git@liuxueyang-gitee:liuxueyang/oh-my-tmux.git ~/.tmux
cd
ln -s .tmux/.tmux.conf

cd ~/fun/setup
cp -i .tmux.conf.local ~/

Emacs

touch ~/.emacs-custom.el

git clone git@liuxueyang-gitee:liuxueyang/plis-emacs.d.git emacs.d

mv emacs.d ~/.emacs.d

Eclipse

Eclipse Installer

Programming Language Development Environments

Go

  1. Install a new version.
  2. configure proxy and turn on go mod:
go env -w GOPROXY="https://goproxy.io,https://goproxy.cn,direct"
go env -w GO111MODULE="on"
  1. install go tools (eg. language server):
go get github.com/go/golang/x/tools/cmd/goimports
go get github.com/golang/go/x/tools/...
go get github.com/kisielk/errcheck
go get github.com/rogpeppe/godef
go get github.com/stamblerre/gocode
go get golang.org/x/tools/cmd/goimports
go get golang.org/x/tools/gopls

Rust

  1. Install rustup
  2. Use tuna mirror:

bash:

# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
echo 'export RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup' >> ~/.bash_profile
cd ~/fun/setup/
bash rust.sh

fish config:

echo 'set -x RUSTUP_DIST_SERVER https://mirrors.tuna.tsinghua.edu.cn/rustup' >> ~/.config/fish/config.fish
echo "set -x fish_user_paths $fish_user_paths $HOME/.cargo/bin" >> ~/.config/fish/config.fish
  1. Install rust tools (eg. language server):
rustup toolchain add nightly
rustup component add rust-src
rustup default nightly
cargo +nightly install racer

Python

  1. Install Python3
  2. Use tuna pip mirror:
pip install --upgrade pip
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

sudo pip install --upgrade pip
sudo pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

Projects

apue

cd ~/fun/
git clone git@liuxueyang-gitee:liuxueyang/apue.git

gopl

mkdir -p ~/go/src/gitee.com/liuxueyang/
cd ~/go/src/gitee.com/liuxueyang/
git clone git@liuxueyang-gitee:liuxueyang/gopl.git

Personal blog

mkdir -p ~/public_html
git clone git@liuxueyang-gitee:liuxueyang/liuxueyang.git ~/public_html

A little Java

cd ~/fun/
git clone git@liuxueyang-gitee:liuxueyang/little-java.git

RCM

Guide

  1. bootstrap
cp new/rcrc ~/.rcrc
  1. install rcm
  2. install dot files
rcup -v