Signed-off-by: Lee Tang <i@d0zingcat.dev>
This commit is contained in:
Lee Tang
2023-01-30 14:49:33 +08:00
parent d0a65bbc5d
commit d89197d212
4 changed files with 26 additions and 4 deletions

View File

@@ -67,6 +67,7 @@ cask "lark"
cask "logi-options-plus"
cask "notion"
cask "raycast"
cask "sourcetree"
cask "spotify"
cask "stats"
cask "telegram"
@@ -77,6 +78,7 @@ mas "1Password for Safari", id: 1569813296
mas "Bob", id: 1630034110
mas "Microsoft Remote Desktop", id: 1295203466
mas "Microsoft Word", id: 462054704
mas "Notion Web Clipper", id: 1559269364
mas "Reeder", id: 1529448980
mas "Slack", id: 803453959
mas "Twitter", id: 1482454543

4
.zshrc
View File

@@ -83,12 +83,10 @@ alias vi='nvim'
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 zerotier_reload='sudo launchctl unload /Library/LaunchDaemons/com.zerotier.one.plist && sudo launchctl load /Library/LaunchDaemons/com.zerotier.one.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 leetcode_today='curl -sL "https://leetcode-cn.com/graphql" -H "content-type: application/json" -d '\''{"operationName":"questionOfToday","variables":{},"query":"query questionOfToday {\n todayRecord {\n question {\n questionFrontendId\n questionTitleSlug\n __typename\n }\n lastSubmission {\n id\n __typename\n }\n date\n userStatus\n __typename\n }\n}\n"}'\'' | jq '\''.data.todayRecord[0].question'\'''
alias clean_tmux_session='ls ~/.tmux/resurrect/* -1dtr | head -n 100 | xargs rm -v'
alias pn='pnpm'
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
[ -f /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc ] && . /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc

View File

@@ -20,7 +20,7 @@
[core]
editor = nvim
excludesfile = /Users/d0zingcat/.config/git/.gitignore
excludesfile = /Users/d0zingcat/.config/git/.gitignore
[pager]
difftool = true
@@ -33,6 +33,7 @@
prompt = false
[difftool "difftastic"]
prompt = false
cmd = difft "$LOCAL" "$REMOTE"
[alias]
@@ -49,3 +50,11 @@
d = diff
ds = diff --staged
dc = diff --cached
#[difftool "sourcetree"]
# cmd = opendiff \"$LOCAL\" \"$REMOTE\"
# path =
#
#[mergetool "sourcetree"]
# cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
# trustExitCode = true

View File

@@ -192,6 +192,19 @@ return require('packer').startup(function(use)
require('config.tagbar')
end,
})
-- BETTER editor
use({
'vinnymeller/swagger-preview.nvim',
run = "npm install -g swagger-ui-watcher",
config = function()
require("swagger-preview").setup({
-- The port to run the preview server on
port = 9000,
-- The host to run the preview server on
host = "localhost",
})
end,
})
-- LANGUAGES
use({