Closed daidai21 closed 1 year ago
in .bashrc add or .zshrc
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias cman='man -M /usr/share/man/zh_CN'
func! Run() " run function
let type = b:current_syntax
if type == "c"
exec "!gcc % -std=c11 -pthread; ./a.out"
elseif type == "cpp" || type == "cc"
exec "!g++ % -std=c++11 -pthread ; ./a.out"
elseif type == "python"
exec "!python %"
endif
endfunc
sudo apt install build-essential
TODO:multi GCC G++ CLANG version
alias ps= 'ps -aux'
alias du= 'du -h'
alias free= 'free -h'
tmux session restore & store
https://github.com/mislav/dotfiles/blob/d2af5900fce38238d1202aa43e7332b20add6205/bin/tmux-session
https://github.com/daidai21/dotfiles/blob/minimalist_version/.vimrc#L44
change to
exec "!gcc % -Wall ; ./a.out"
https://github.com/daidai21/dotfiles/blob/minimalist_version/.vimrc#L46
change to
exec "!g++ % -std=c++11 -Wall ; ./a.out"
./a.out | c++filt -t
output c++ variable type full name
mac下,command + k + 0,折叠所有代码块。 command + k + j,展开所有代码块。
brew install cloc
benchmark test tool:
brew install wrk
➜ fastapi wrk http://localhost:8000
Running 10s test @ http://localhost:8000
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 5.70ms 1.03ms 14.77ms 90.09%
Req/Sec 0.88k 82.09 0.98k 82.50%
17556 requests in 10.01s, 2.38MB read
Requests/sec: 1753.48
Transfer/sec: 243.17KB
➜ fastapi wrk http://localhost:8000
Running 10s test @ http://localhost:8000
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 3.27ms 317.35us 10.67ms 93.55%
Req/Sec 1.54k 97.97 2.74k 97.01%
30726 requests in 10.10s, 4.16MB read
Requests/sec: 3041.76
Transfer/sec: 421.83KB
brew install ffmpeg
brew install pkg, but not update other pkg.
https://github.com/Homebrew/brew/issues/1670
export HOMEBREW_NO_AUTO_UPDATE=1
# 设置持久化环境变量
echo "export HOMEBREW_NO_AUTO_UPDATE=1" >> ~/.bash_profile
vscode plugin todo tree
命令行快速打开 idea 项目
docekr pull rabbitmq \
redis \
mysql \
ubuntu \
redis \
elasticsearch \
python:3.6 \
golang:1.14 \
java \
bitnami/kafka \
foxiswho/rocketmq \
apache/dubbo-admin \
zookeeper
brew install protobuf
vscode multi line tab
https://stackoverflow.com/questions/42462777/multirow-tabs-for-vscode
"workbench.editor.wrapTabs": true,
vscode 关闭所有打开文件 Ctrl+k
->Ctr+W
chrome 快捷关闭全屏模式: command+control+F
in
.bashrc
addnot test
add:
sudo apt-get install colordiff