【20】Quick Notes

SSH 免密码

ssh-keygen
ssh-copy-id [email protected]

转换 CRLF - LF

find . -type f | xargs dos2unix

git 记住密码

git config --global credential.helper store
# 清空
git config --global --unset credential.helper

apt 更新忽略某包

sudo apt-mark hold xxx
sudo apt-mark unhold xxx

WSL 换 apt 源

# 首先将原配置文件备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
# 然后 VIM 打开,替换
:%s/security.ubuntu/mirrors.aliyun/g
:%s/archive.ubuntu/mirrors.aliyun/g
# 最后更新
sudo apt update

微信 QQ 关闭 x5 内核

debugtbs.qq.com

Conda 使用

# 包管理
conda update --all / conda update conda
conda clean --all

conda install pkg_name
conda install -n env_name pkg_name
conda remove -n env_name pkg_name

conda list
conda list -n env_name

conda search pkg_name

# 换源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ 
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ 
conda config --set show_channel_urls yes

# 环境管理
# Doc: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
conda create --name env_name python=*.*
conda create --name env_name --clone othher_env  # Clone other envs
conda remove --name env_name --all

conda info -e
conda info --env
conda env list
# These three are equivalent

conda activate env_name
conda deactivate env_name
# These only work on conda 4.6 and later versions.
# For conda versions prior to 4.6, run:
# Windows: activate or deactivate
# Linux and macOS: source activate or source deactivate

本文阅读量
本站访客量