開發環境準備


Git

.gitconfig

[core]
        ignorecase = false
        editor = vim
[user]
        name = USERNAME
        email = USER-EMAIL
        useConfigOnly = true
[pull]
        ff = only
[include]
        # path = /Users/USERHOME/.gitalias  # macOS
        path = /home/USERHOME/.gitalias  # Ubuntu
[init]
        defaultBranch = main
[diff]
        tool = vimdiff

.gitalias

mkdir -p $HOME/src
git clone https://github.com/GitAlias/gitalias.git $HOME/src/gitalias
ln -s $HOME/src/gitalias/gitalias.txt $HOME/.gitalias

Python

pyenv

git clone https://github.com/pyenv/pyenv.git ~/.pyenv
 cd ~/.pyenv && src/configure && make -C src

Bash + Ubuntu

# the sed invocation inserts the lines at the start of the file
# after any initial comment lines
sed -Ei -e '/^([^#]|$)/ {a \
export PYENV_ROOT="$HOME/.pyenv"
a \
export PATH="$PYENV_ROOT/bin:$PATH"
a \
' -e ':a' -e '$!{n;ba};}' ~/.profile
echo 'eval "$(pyenv init --path)"' >>~/.profile

echo 'eval "$(pyenv init -)"' >> ~/.bashrc

Relogin to activate the settings.

$ pipenv --version

pipenv, version 2021.11.23

Install the following packages for the build environment.

sudo apt-get install build-essential gdb lcov pkg-config \
      libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
      libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
      lzma lzma-dev tk-dev uuid-dev zlib1g-dev

Compile the Python versions with pyenv.

pyenv install 3.8.12

Override the global Python.

pyenv global 3.8.12
$ pyenv versions

  system
* 3.8.12 (set by /Users/tom/.python-version)
  3.9.9

Pipenv

python3 -m pip install -U pip setuptools wheel
python3 -m pip install --user pipenv

Set environment variables.

export PIPENV_VENV_IN_PROJECT="1"
export PIPENV_SKIP_LOCK="1"

check this scipt for more information.

Vim

TBD

  • edit .vimrc
  • manage plugins wiht Vundle
#Git






Related Posts

JS Advanced --pass by value && pass by reference && pass by sharing

JS Advanced --pass by value && pass by reference && pass by sharing

JavaScript 進階 04:物件導向與 Prototype

JavaScript 進階 04:物件導向與 Prototype

AI輔導室|製作日式繩圈

AI輔導室|製作日式繩圈






Comments