Skip to content

huangrt01/dotfiles

Repository files navigation

dotfiles

从零搭建工作环境

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

brew/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
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 memory-profiler
pip install line_profiler
pip install pycallgraph
apt/brew install graphviz
# dot -v

Security:

brew install gnupg

Firefox Add-on

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

  • stylus

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

Linux

sudo apt-get update
sudo apt-get install manpages-dev
sudo apt-get install gdb

Macbook

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

VSCode

开发必备插件

  • 公共:
    • Remote - SSH
    • ByteDance Authenticator
    • MarsCode
    • GitLens
    • Code Spell Checker, GitLens, EditorConfig for VSCode, String Manipulation, Visual Studio IntelliCode
    • Code Runner
  • 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

About

my dotfiles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published