daidai21 / dotfiles

Myself dotfiles
4 stars 0 forks source link

new Feature #7

Closed daidai21 closed 1 year ago

daidai21 commented 4 years ago

in .bashrc add

alias nl = 'nl -b a'
alias df = 'df -h'
alias l = 'ls -d .* --color=auto'
alias bc ='bc -l'
alias ls='ls --color=auto'
alias diff='colordiff'

not test

add: sudo apt-get install colordiff

daidai21 commented 4 years 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'
daidai21 commented 4 years ago
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
daidai21 commented 4 years ago
sudo apt install build-essential

TODO:multi GCC G++ CLANG version

daidai21 commented 4 years ago
alias ps= 'ps -aux'
alias du= 'du -h'
alias free= 'free -h'
daidai21 commented 4 years ago

tmux session restore & store

https://github.com/mislav/dotfiles/blob/d2af5900fce38238d1202aa43e7332b20add6205/bin/tmux-session

daidai21 commented 4 years ago

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"

daidai21 commented 4 years ago

./a.out | c++filt -t output c++ variable type full name

daidai21 commented 3 years ago

mac下,command + k + 0,折叠所有代码块。 command + k + j,展开所有代码块。

daidai21 commented 3 years ago

Alfred

http://louiszhai.github.io/2018/05/31/alfred/ https://ihtcboy.com/2020/02/09/2020-02-09_%E7%A8%8B%E5%BA%8F%E5%91%98%E7%9A%84macOS%E7%B3%BB%E5%88%97%EF%BC%9A%E9%AB%98%E6%95%88Alfred%E8%BF%9B%E9%98%B6/

daidai21 commented 3 years ago

brew install cloc

daidai21 commented 3 years ago

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
daidai21 commented 3 years ago

brew install ffmpeg

视频剪辑软件 https://github.com/FFmpeg/FFmpeg

daidai21 commented 3 years ago

brew install pkg, but not update other pkg.

https://apple.stackexchange.com/questions/293250/how-to-install-an-homebrew-formula-without-updating-homebrew-itself

https://github.com/Homebrew/brew/issues/1670

export HOMEBREW_NO_AUTO_UPDATE=1
# 设置持久化环境变量
echo "export HOMEBREW_NO_AUTO_UPDATE=1" >> ~/.bash_profile
daidai21 commented 3 years ago

vscode plugin todo tree

daidai21 commented 3 years ago

命令行快速打开 idea 项目

https://luyiisme.github.io/2017/04/12/idea-open-project/

daidai21 commented 2 years ago
docekr pull rabbitmq \
            redis \
            mysql \
            ubuntu \
            redis \
            elasticsearch \
            python:3.6 \
            golang:1.14 \
            java \
            bitnami/kafka \
            foxiswho/rocketmq \
            apache/dubbo-admin \
            zookeeper
daidai21 commented 2 years ago

brew install protobuf

daidai21 commented 2 years ago

chrome page分组

标签分组扩展

https://chrome.google.com/webstore/detail/tab-groups-extension/nplimhmoanghlebhdiboeellhgmgommi/related

daidai21 commented 2 years ago

vscode multi line tab

https://stackoverflow.com/questions/42462777/multirow-tabs-for-vscode "workbench.editor.wrapTabs": true,

daidai21 commented 2 years ago

vscode 关闭所有打开文件 Ctrl+k->Ctr+W

daidai21 commented 2 years ago

chrome 快捷关闭全屏模式: command+control+F