From 7bc13c6084386bf86feefe98b9244a5461d73183 Mon Sep 17 00:00:00 2001 From: Lee Tang Date: Fri, 10 Feb 2023 15:51:25 +0800 Subject: [PATCH] update Signed-off-by: Lee Tang --- .Brewfile.Darwin.gooddeAir | 10 +++++++--- .zshrc | 13 ++++++++++--- nvim/init.lua | 6 +++++- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.Brewfile.Darwin.gooddeAir b/.Brewfile.Darwin.gooddeAir index aa634e0..497ccf1 100644 --- a/.Brewfile.Darwin.gooddeAir +++ b/.Brewfile.Darwin.gooddeAir @@ -4,6 +4,7 @@ tap "homebrew/cask-drivers" tap "homebrew/core" tap "homebrew/services" tap "mongodb/brew" +brew "argocd" brew "coreutils" brew "openssl@3" brew "readline" @@ -24,7 +25,7 @@ brew "git" brew "gnupg" brew "go" brew "helm" -brew "zookeeper", restart_service: true +brew "zookeeper" brew "kafka" brew "kubernetes-cli" brew "kubectx" @@ -57,6 +58,7 @@ brew "wget" brew "wireguard-tools" brew "mongodb/brew/mongodb-community" cask "1password" +cask "apifox" cask "bartender" cask "brave-browser" cask "charles" @@ -69,6 +71,7 @@ cask "google-drive" cask "lark" cask "logi-options-plus" cask "logseq" +cask "ngrok" cask "notion" cask "rapidapi" cask "raycast" @@ -81,7 +84,9 @@ cask "visual-studio-code" cask "warp" cask "wezterm" mas "1Password for Safari", id: 1569813296 +mas "Best Trace", id: 1037779758 mas "Bob", id: 1630034110 +mas "EuDic", id: 434350458 mas "Microsoft Remote Desktop", id: 1295203466 mas "Microsoft Word", id: 462054704 mas "Notion Web Clipper", id: 1559269364 @@ -89,6 +94,5 @@ mas "Reeder", id: 1529448980 mas "Slack", id: 803453959 mas "Twitter", id: 1482454543 mas "Vimari", id: 1480933944 +mas "WeChat", id: 836500024 mas "Xcode", id: 497799835 -mas "微信", id: 836500024 -mas "欧路词典", id: 434350458 diff --git a/.zshrc b/.zshrc index 967073b..40b8253 100644 --- a/.zshrc +++ b/.zshrc @@ -85,7 +85,6 @@ alias batc='bat --paging=never' alias batcp='bat --plain --paging=never' alias fixscreen='sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.screensharing.plist && sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist' alias git_branch="git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'" -alias git_clean="(git checkout main || git checkout master) && git branch --merged | grep -v 'master' | grep -v 'main' | cat | xargs git branch -d" alias clean_tmux_session='ls ~/.tmux/resurrect/* -1dtr | head -n 100 | xargs rm -v' alias pn='pnpm' @@ -109,8 +108,7 @@ function macnst (){ } # As clash for windows provides TUN mode/ClashX provides enhance mode, there's no necessity to set proxy munally(which proxy all traffix transparently) -# proxy by clashx -#function clashproxy() { +# proxy by clashx function clashproxy() { # local proxy=http://127.0.0.1:7890 # export https_proxy=$proxy http_proxy=$proxy all_proxy=socks5://127.0.0.1:7891; # echo "proxy all set!" @@ -189,6 +187,15 @@ function rsync_work() { fi } +function git_clean() { + if [[ $# != 1 || ! $1 =~ 'main|master|develop' ]] + then + echo 'Invalid parameter, should based on develop/main/master' + else + g checkout $1 && g branch --merged | grep -v $1 | cat | xargs git branch -d + fi +} + #export LESS_TERMCAP_so=$'\E[30;43m' #export LDFLAGS="-L/usr/local/opt/llvm/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/bzip2/lib" diff --git a/nvim/init.lua b/nvim/init.lua index d27318f..1274784 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -44,6 +44,10 @@ cmd([[ autocmd FileType php setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwi cmd([[ autocmd FileType python setlocal tabstop=4 shiftwidth=4 softtabstop=4 ]]) cmd([[ autocmd FileType json setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab ]]) cmd([[ autocmd FileType go setlocal tabstop=8 shiftwidth=8 softtabstop=8 textwidth=120 noexpandtab ]]) +-- in makefiles, don't expand tabs to spaces, since actual tab characters are +-- needed, and have indentation at 8 chars to be sure that all indents are tabs +-- (despite the mappings later): +cmd([[ autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=0]]) cmd([[ autocmd FileType html,htmldjango,xhtml,haml setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=0 ]]) cmd([[ autocmd FileType yaml setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=0 expandtab ]]) cmd([[ autocmd FileType ruby setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=120 ]]) @@ -182,6 +186,6 @@ api.nvim_exec( "endfunction " "set statusline+=%{NearestMethodOrFunction()} -]], +]] , false )