Skip to content

huangrt01/dotfiles

Repository files navigation

dotfiles

从零搭建工作环境

  • Macbook

    • 触控板:轻点
  • 飞书、飞连

  • 个人git仓库:

    • Dotfiles、CS-Notes

    • Dotfiles-local

      • 配置ssh + git账号
      • git clone git@github.com:huangrt01/dotfiles-local.git
    • git config --global user.name "huangrt01"
      git config --global user.email huangrt01@163.com
      
      # MacOs
      ssh-keygen -t rsa -b 4096 -C "huangrt01@163.com" # 如果rsa已占用,可用ssh-keygen -t ed25519 -C "huangruiteng@xxx.com"
      eval "$(ssh-agent -s)"
      ssh-add ~/.ssh/id_rsa --apple-use-keychain # MacOS带
      pbcopy < ~/.ssh/id_rsa.pub  # MacOS , Linux用xclip
      
      上github添加SSH Key
      
      ssh -T git@github.com
      # ssh-keygen -y -f ~/.ssh/id_rsa
      
      # Linux
  • Iterm2、Sublime text

    • enter iTerm2/Settings
      • Profiles/Text/Font -> Meslo*
      • Profiles/Colors/ColorPresets -> Pastel*
    • Unlimited scroll back
  • Chrome

    • 账号
  • Typora

    • 序列号
    • image-20250319230752532
    • 内联公式开启
  • 豆包、微信、网易云音乐

  • Clion、VSCode、Trae

  • Mendeley

  • QuickJump

  • MailMaster, WeChat

  • 解压缩 https://theunarchiver.com/

  • Discord

  • 暂时搁置

dotfile

  • my dotfiles, the design philosophy is illustrated in my Shell Note
  • easy-to-use
chmod 777 bootstrap.sh
./bootstrap.sh
zsh

submodules

local customization

  • shell
if [ -f ~/.zshrc_local ]; then
    source ~/.zshrc_local
fi
  • git
[include]
        path = ~/.gitconfig_local
  • vim
let $LOCALFILE=expand("~/.vimrc_local")
if filereadable($LOCALFILE)
    source $LOCALFILE
endif
  • tmux
if-shell "[ -f ~/.tmux_local.conf ]" 'source ~/.tmux_local.conf'

Manually install (apt/pip)

apt install shellcheck
npm install -g write-good
# apt install silversearcher-ag
git clone https://github.com/satanson/the_silver_searcher.git --depth=1
sudo apt install -y automake pkg-config libpcre3-dev zlib1g-dev liblzma-dev
./build.sh
sudo make install

apt install tree

# https://nodejs.org/en/download/package-manager/#installing-node-js-via-package-manager
npm install -g tldr

apt install fd-find
apt install cloc
sudo apt-get update
pip3 install --upgrade pip

sudo apt install zsh
zsh --version

# log out and login back
echo $SHELL
$SHELL --version

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

sudo apt-get install python3-pip
pip install --upgrade pip
pip install --upgrade setuptools
pip install ipython
pip install ipdb
pip3 install thefuck

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple virtualenvwrapper
export WORKON_HOME=~/Envs
mkdir -p $WORKON_HOME
source /usr/local/bin/virtualenvwrapper.sh
# or
source ~/.local/bin/virtualenvwrapper.sh

# install perf
sudo apt install linux-source
cd /usr/src
tar -xjf linux-source-4.4.0.tar.bz2
cd tools/perf
make # fail! why?
sudo apt install linux-tools-common

perf
# ...
# follow the instructions
# ...
# finish installing perf

apt install stress
apt install htop
pip install pycallgraph, tabulate, line_profiler, memory-profiler
pip3 install openai
apt install graphviz
# dot -v

Security:

Firefox Add-on

  • HTTPS Everywhere, Multi-Account Containers(No Chrome), uBlock Origin, 1Password

  • stylus

  • Full Web Page Screenshots (Chrome: Full Page Screen Capture

Linux

apt update
apt install gdb manpages-dev file sysstat

X11 Forwarding

https://blog.wangluyuan.cc/2020/12/24/forwarding-x11/

Macbook

  • 自动化:
    • 安装brew
    • 下载安装powerline font

Trae

插件

  • GitLens
  • basedpyright
  • python

Clion

  • git插件生效

    • git config --global --add safe.directory /root/newrec/huangruiteng/tiger_team
  • yapf format

    • image-20250401162909307
    • 需要重启IDE才能在KeyMap里看到

VSCode

开发必备插件

  • 公共:
    • Python
    • Remote - SSH
    • ByteDance Authenticator
    • MarsCode
    • GitLens
    • Code Spell Checker, EditorConfig for VSCode, String Manipulation, Visual Studio IntelliCode
    • Code Runner
  • Python:
    • Python
    • yapf
      • 添加settings.json
  • C++: cpplint, CodeLLDB, Header source switch, Rainbow Brackets, C++ Intellisense
    • CMake, CMake Tools

      • cmake插件需要cmake3.9.4以上版本的cmake的支持,ubuntu16.04以下的用户可能需要手动安装新版本的cmake
    • Clangd

    • Tabnine:AI加持的自动补全,用GPT

    • Peacock:不同workspace可以用不同的颜色区分

    • 调大C++插件的可用内存:

      • c++
    • 如何优雅的用 VScode 编写 C++ 大型项目?

      • lsp(language service provider): vscode clangd
      • 依赖 compile_commands.json
        • 自动构建
        • 手动生成:mkdir build && cd build && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
      • 如果linux的glibc版本较旧,需要给clangd打补丁(patchelf),链接向新版glibc

Reference

About

my dotfiles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published