chore: psm(ps with readable memory, commitlint, etc
This commit is contained in:
parent
6bb7098e01
commit
3127f52dd3
@ -5,7 +5,7 @@ function! paiyou#before() abort
|
|||||||
\ 'args': ['--stdin', '--stdin-filepath', '"%:p"', '--parser', 'typescript'],
|
\ 'args': ['--stdin', '--stdin-filepath', '"%:p"', '--parser', 'typescript'],
|
||||||
\ 'stdin': 1
|
\ 'stdin': 1
|
||||||
\ }
|
\ }
|
||||||
let g:neoformat_enabled_typescriptreact = ['tsfmt', 'prettier']
|
let g:neoformat_enabled_typescriptreact = ['prettier']
|
||||||
let g:neoformat_enabled_ruby = ['rubocop']
|
let g:neoformat_enabled_ruby = ['rubocop']
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -21,10 +21,9 @@ alias yup='yadr update-plugins'
|
|||||||
alias yip='yadr init-plugins'
|
alias yip='yadr init-plugins'
|
||||||
|
|
||||||
# PS
|
# PS
|
||||||
alias psa="ps aux"
|
psm() {
|
||||||
alias psg="ps aux | grep "
|
ps aux | awk 'NR>1 {$5=int($5/1024)"M";$6=int($6/1024)"M";}{ print;}'
|
||||||
alias psr='ps aux | grep ruby'
|
}
|
||||||
|
|
||||||
# Moving around
|
# Moving around
|
||||||
alias cdb='cd -'
|
alias cdb='cd -'
|
||||||
alias cls='clear;ls'
|
alias cls='clear;ls'
|
||||||
@ -130,6 +129,26 @@ alias gt='git t'
|
|||||||
alias gbg='git bisect good'
|
alias gbg='git bisect good'
|
||||||
alias gbb='git bisect bad'
|
alias gbb='git bisect bad'
|
||||||
alias gdmb='git branch --merged | grep -v "\*" | xargs -n 1 git branch -d'
|
alias gdmb='git branch --merged | grep -v "\*" | xargs -n 1 git branch -d'
|
||||||
|
alias gfR='gf origin master; gwR origin/master'
|
||||||
|
alias gpb='git push origin "$(git-branch-current 2> /dev/null):build"'
|
||||||
|
alias gfs="gs;gfr;gsp"
|
||||||
|
git_rebase_to_origin() {
|
||||||
|
BRANCH=${1:-master}
|
||||||
|
DIRTY=false
|
||||||
|
git fetch origin
|
||||||
|
[[ -n $(git status -s) ]] && DIRTY=true
|
||||||
|
$DIRTY && echo "Git is dirty"
|
||||||
|
$DIRTY && (git add .; git stash)
|
||||||
|
git rebase origin/$BRANCH
|
||||||
|
$DIRTY && (git stash pop; git reset HEAD)
|
||||||
|
}
|
||||||
|
git_rm_tag_of_remote() {
|
||||||
|
TAG=$1
|
||||||
|
REMOTE=${2:-origin}
|
||||||
|
git tag -d $TAG
|
||||||
|
git push --delete $REMOTE $TAG
|
||||||
|
}
|
||||||
|
git_log_history='git log -p --'
|
||||||
|
|
||||||
# Common shell functions
|
# Common shell functions
|
||||||
alias less='less -r'
|
alias less='less -r'
|
||||||
@ -260,3 +279,6 @@ alias docker_restart_in_mac='killall Docker && open /Applications/Docker.app'
|
|||||||
## source files
|
## source files
|
||||||
alias ss="source ~/.zshrc"
|
alias ss="source ~/.zshrc"
|
||||||
alias delete_all_binaries="find . -type f -perm -u+x -not -path './.git/*' | xargs rm"
|
alias delete_all_binaries="find . -type f -perm -u+x -not -path './.git/*' | xargs rm"
|
||||||
|
|
||||||
|
## grep && ag
|
||||||
|
alias agq="ag -Q"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
commitlint_init() {
|
commitlint_init() {
|
||||||
yarn add husky @commitlint/{config-conventional,cli} -D
|
yarn add husky @commitlint/{config-conventional,cli} -D -W
|
||||||
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
|
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
|
||||||
yarn husky install
|
yarn husky install
|
||||||
yarn husky add .husky/commit-msg 'yarn commitlint --edit $1'
|
yarn husky add .husky/commit-msg 'yarn commitlint --edit $1'
|
||||||
|
@ -24,16 +24,6 @@ function post {
|
|||||||
function search_installed_packages {
|
function search_installed_packages {
|
||||||
dpkg --get-selections | grep $1
|
dpkg --get-selections | grep $1
|
||||||
}
|
}
|
||||||
function set_anonymous {
|
|
||||||
git filter-branch --env-filter '
|
|
||||||
if [ "$GIT_AUTHOR_NAME" = "ralletstellar" ]; then \
|
|
||||||
export GIT_AUTHOR_NAME="Anonymous" GIT_AUTHOR_EMAIL="anonymous@anonymous.com"; \
|
|
||||||
fi
|
|
||||||
'
|
|
||||||
}
|
|
||||||
function genAndroidKeystore {
|
|
||||||
keytool -genkey -v -keystore /tmp/.keystore -alias rallets -keyalg RSA -keysize 2048 -validity 10000
|
|
||||||
}
|
|
||||||
function delete_except_latest {
|
function delete_except_latest {
|
||||||
total=`ll | wc -l`
|
total=`ll | wc -l`
|
||||||
num_to_delete=$((total-$1))
|
num_to_delete=$((total-$1))
|
||||||
|
25
zsh/git.zsh
25
zsh/git.zsh
@ -1,25 +0,0 @@
|
|||||||
# Makes git auto completion faster favouring for local completions
|
|
||||||
__git_files () {
|
|
||||||
_wanted files expl 'local files' _files
|
|
||||||
}
|
|
||||||
alias gfR='gf origin master; gwR origin/master'
|
|
||||||
alias gpb='git push origin "$(git-branch-current 2> /dev/null):build"'
|
|
||||||
alias gitUserRallet="git config user.name rallets;git config user.email rallet@rallets.com"
|
|
||||||
alias gfs="gs;gfr;gsp"
|
|
||||||
git_rebase_to_origin() {
|
|
||||||
BRANCH=${1:-master}
|
|
||||||
DIRTY=false
|
|
||||||
git fetch origin
|
|
||||||
[[ -n $(git status -s) ]] && DIRTY=true
|
|
||||||
$DIRTY && echo "Git is dirty"
|
|
||||||
$DIRTY && (git add .; git stash)
|
|
||||||
git rebase origin/$BRANCH
|
|
||||||
$DIRTY && (git stash pop; git reset HEAD)
|
|
||||||
}
|
|
||||||
git_rm_tag_of_remote() {
|
|
||||||
TAG=$1
|
|
||||||
REMOTE=${2:-origin}
|
|
||||||
git tag -d $TAG
|
|
||||||
git push --delete $REMOTE $TAG
|
|
||||||
}
|
|
||||||
git_log_history='git log -p --'
|
|
@ -2,13 +2,12 @@
|
|||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
|
|
||||||
#### Android
|
#### Android
|
||||||
#export ANDROID_HOME=$HOME/Library/Android/sdk
|
export ANDROID_HOME=$HOME/Library/Android/sdk
|
||||||
#export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk
|
export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk
|
||||||
##export ANDROID_SDK_HOME=$HOME/Library/Android/sdk
|
export ANDROID_SDK_HOME=$HOME/Library/Android/sdk
|
||||||
#export ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk-bundle
|
export ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk-bundle
|
||||||
##export NDK_PROJECT_PATH=$HOME/Projects/rallets-android/src/main
|
export NDK_PROJECT_PATH=src/main
|
||||||
#export NDK_PROJECT_PATH=src/main
|
export PATH=$PATH:$HOME/Android/sdk/platform-tools:$HOME/Android/sdk/tools/
|
||||||
#export PATH=$PATH:$HOME/Android/sdk/platform-tools:$HOME/Android/sdk/tools/
|
|
||||||
|
|
||||||
#### Qiniu
|
#### Qiniu
|
||||||
QINIU_ACCESS_KEY=l6Rf0LgQDgpSwjdXr_MgsCynhsofRM7W2dwvIOXO
|
QINIU_ACCESS_KEY=l6Rf0LgQDgpSwjdXr_MgsCynhsofRM7W2dwvIOXO
|
||||||
|
Loading…
Reference in New Issue
Block a user