Skip to content

Instantly share code, notes, and snippets.

@QinMing
Last active June 21, 2024 02:06
Show Gist options
  • Save QinMing/364774610afc0e06cc223b467abe83c0 to your computer and use it in GitHub Desktop.
Save QinMing/364774610afc0e06cc223b467abe83c0 to your computer and use it in GitHub Desktop.

Revisions

  1. QinMing revised this gist Sep 7, 2020. 1 changed file with 0 additions and 67 deletions.
    67 changes: 0 additions & 67 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -1,59 +1,6 @@
    # Copyright (c) 2016-2018 Ming Qin (覃明) <https://github.com/QinMing>
    # Open source under MIT LICENSE.

    ZSH_THEME="agnoster"
    plugins=(zsh-autosuggestions git pip django docker docker-compose)

    # ......

    unsetopt AUTO_CD
    # AUTO_CD: if the command isn't found in the current directory, the shell will automatically cd into the command name, if the directory is found.

    alias gw=./gradlew
    alias gradlew=./gradlew
    # compdef gw=gradle
    # https://github.com/gradle/gradle-completion/issues/14#issuecomment-478816232

    alias l='ls -alhtr'
    alias upthis='ss u'
    alias downthis='ss d'
    alias dcp='docker-compose'
    alias docker-clean='docker system prune --volumes -f'
    alias tff='find ./*/infrastructure -maxdepth 0 | xargs -L 1 tf fmt'

    alias g='git'
    alias gs='git status'
    alias gl='git l'
    alias gd='git diff'
    alias gb='git branch'
    alias gck='git checkout'
    alias gp='git pull'

    # https://stackoverflow.com/questions/1904860/how-to-remove-unreferenced-blobs-from-my-git-repo
    alias git-clean='git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 -c gc.rerereunresolved=0 -c gc.pruneExpire=now gc "$@"'

    unalias gbd || true
    gbd() {
    # Delete local branches that squash-merged to `master`. Forked from https://github.com/not-an-aardvark/git-delete-squashed
    git remote prune origin &&
    git checkout -q master &&
    git fetch origin &&
    git fetch --tags -f &&
    git merge --ff-only origin/master &&
    git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do
    mergeBase=$(git merge-base master $branch) &&
    [[ $(
    git cherry master $(
    git commit-tree $(
    git rev-parse $branch^{tree}
    ) -p $mergeBase -m _
    )
    ) == "-"*
    ]] && git branch -D $branch;
    done;
    git prune
    }

    lazy_load() {
    # Act as a stub to another shell function/command. When first run, it will load the actual function/command then execute it.
    # E.g. This made my zsh load 0.8 seconds faster by loading `nvm` when "nvm", "npm" or "node" is used for the first time
    @@ -97,17 +44,3 @@ unset -f group_lazy_load
    # simple python virtual environment wrapper
    alias ve="lazy_load 've' $HOME/git/simple-virtualenv-wrapper/ve.sh ve"

    # If using GnuPG to sign git commits, etc, need the following.
    export GPG_TTY=$(tty)

    export AUTOSUGGESTION_HIGHLIGHT_COLOR='fg=cyan' # water mark for history commands

    # Generated by hashicorp vault
    # autoload -U +X bashcompinit && bashcompinit
    # complete -o nospace -C /usr/local/bin/vault vault

    # Other applications
    # eval $(thefuck --alias)
    # eval "$(pyenv init -)"
    # export PIPENV_PYTHON=$HOME/.pyenv/shims/python
    # export VIRTUALENV_PYTHON=$HOME/.pyenv/shims/python
  2. QinMing revised this gist Jul 19, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,7 @@ plugins=(zsh-autosuggestions git pip django docker docker-compose)
    # ......

    unsetopt AUTO_CD
    # AUTO_CD: if the command isn't found in the current directory, the shell will automatically cd into the command name, if the directory is found.

    alias gw=./gradlew
    alias gradlew=./gradlew
  3. QinMing revised this gist Jul 4, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -86,7 +86,7 @@ group_lazy_load() {
    }

    export NVM_DIR=~/.nvm
    group_lazy_load $HOME/.nvm/nvm.sh nvm node npm truffle gulp
    group_lazy_load $HOME/.nvm/nvm.sh nvm node npm truffle gulp yarn

    export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
    group_lazy_load $HOME/.rvm/scripts/rvm rvm irb rake rails
  4. QinMing revised this gist May 27, 2020. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,9 @@ plugins=(zsh-autosuggestions git pip django docker docker-compose)

    unsetopt AUTO_CD

    compdef gw=gradle
    alias gw=./gradlew
    alias gradlew=./gradlew
    # compdef gw=gradle
    # https://github.com/gradle/gradle-completion/issues/14#issuecomment-478816232

    alias l='ls -alhtr'
  5. QinMing revised this gist Aug 24, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,7 @@ alias upthis='ss u'
    alias downthis='ss d'
    alias dcp='docker-compose'
    alias docker-clean='docker system prune --volumes -f'
    alias tff='find ./*/infrastructure -maxdepth 0 | xargs -L 1 tf fmt'

    alias g='git'
    alias gs='git status'
  6. QinMing revised this gist Jul 30, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -34,6 +34,7 @@ gbd() {
    git remote prune origin &&
    git checkout -q master &&
    git fetch origin &&
    git fetch --tags -f &&
    git merge --ff-only origin/master &&
    git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do
    mergeBase=$(git merge-base master $branch) &&
  7. QinMing revised this gist Jul 25, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -33,7 +33,7 @@ gbd() {
    # Delete local branches that squash-merged to `master`. Forked from https://github.com/not-an-aardvark/git-delete-squashed
    git remote prune origin &&
    git checkout -q master &&
    git fetch --all &&
    git fetch origin &&
    git merge --ff-only origin/master &&
    git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do
    mergeBase=$(git merge-base master $branch) &&
  8. QinMing revised this gist Jul 25, 2019. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -33,7 +33,8 @@ gbd() {
    # Delete local branches that squash-merged to `master`. Forked from https://github.com/not-an-aardvark/git-delete-squashed
    git remote prune origin &&
    git checkout -q master &&
    git pull --ff-only origin master &&
    git fetch --all &&
    git merge --ff-only origin/master &&
    git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do
    mergeBase=$(git merge-base master $branch) &&
    [[ $(
  9. QinMing revised this gist Jul 17, 2019. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -88,11 +88,20 @@ group_lazy_load $HOME/.rvm/scripts/rvm rvm irb rake rails

    unset -f group_lazy_load

    # simple python virtual environment wrapper
    alias ve="lazy_load 've' $HOME/git/simple-virtualenv-wrapper/ve.sh ve"

    # If using GnuPG to sign git commits, etc, need the following.
    export GPG_TTY=$(tty)

    export AUTOSUGGESTION_HIGHLIGHT_COLOR='fg=cyan' # water mark for history commands

    # Generated by hashicorp vault
    # autoload -U +X bashcompinit && bashcompinit
    # complete -o nospace -C /usr/local/bin/vault vault

    # Other applications
    # eval $(thefuck --alias)
    # eval "$(pyenv init -)"
    # export PIPENV_PYTHON=$HOME/.pyenv/shims/python
    # export VIRTUALENV_PYTHON=$HOME/.pyenv/shims/python
  10. QinMing revised this gist May 28, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -81,7 +81,7 @@ group_lazy_load() {
    }

    export NVM_DIR=~/.nvm
    group_lazy_load $HOME/.nvm/nvm.sh nvm node npm truffle
    group_lazy_load $HOME/.nvm/nvm.sh nvm node npm truffle gulp

    export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
    group_lazy_load $HOME/.rvm/scripts/rvm rvm irb rake rails
  11. QinMing revised this gist May 2, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -33,7 +33,7 @@ gbd() {
    # Delete local branches that squash-merged to `master`. Forked from https://github.com/not-an-aardvark/git-delete-squashed
    git remote prune origin &&
    git checkout -q master &&
    git merge --ff-only origin/master &&
    git pull --ff-only origin master &&
    git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do
    mergeBase=$(git merge-base master $branch) &&
    [[ $(
  12. QinMing revised this gist Apr 2, 2019. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,9 @@ plugins=(zsh-autosuggestions git pip django docker docker-compose)

    unsetopt AUTO_CD

    compdef gw=gradle
    # https://github.com/gradle/gradle-completion/issues/14#issuecomment-478816232

    alias l='ls -alhtr'
    alias upthis='ss u'
    alias downthis='ss d'
  13. QinMing revised this gist Mar 8, 2019. 1 changed file with 23 additions and 5 deletions.
    28 changes: 23 additions & 5 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -11,22 +11,40 @@ unsetopt AUTO_CD
    alias l='ls -alhtr'
    alias upthis='ss u'
    alias downthis='ss d'
    alias dcp='docker-compose'
    alias docker-clean='docker system prune --volumes -f'

    alias g='git'
    alias gs='git status'
    alias gl='git l'
    alias gd='git diff'
    alias gb='git branch'
    alias gbd='git checkout -q master && git remote prune origin && git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do mergeBase=$(git merge-base master $branch) && [[ $(git cherry master $(git commit-tree $(git rev-parse $branch^{tree}) -p $mergeBase -m _)) == "-"* ]] && git branch -D $branch; done; git prune'
    # Delete local branches that squash-merged to `master`. Forked from https://github.com/not-an-aardvark/git-delete-squashed

    alias gck='git checkout'
    alias gp='git pull'
    alias dcp='docker-compose'
    alias docker-clean='docker system prune --volumes -f'

    # https://stackoverflow.com/questions/1904860/how-to-remove-unreferenced-blobs-from-my-git-repo
    alias git-clean='git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 -c gc.rerereunresolved=0 -c gc.pruneExpire=now gc "$@"'

    unalias gbd || true
    gbd() {
    # Delete local branches that squash-merged to `master`. Forked from https://github.com/not-an-aardvark/git-delete-squashed
    git remote prune origin &&
    git checkout -q master &&
    git merge --ff-only origin/master &&
    git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do
    mergeBase=$(git merge-base master $branch) &&
    [[ $(
    git cherry master $(
    git commit-tree $(
    git rev-parse $branch^{tree}
    ) -p $mergeBase -m _
    )
    ) == "-"*
    ]] && git branch -D $branch;
    done;
    git prune
    }

    lazy_load() {
    # Act as a stub to another shell function/command. When first run, it will load the actual function/command then execute it.
    # E.g. This made my zsh load 0.8 seconds faster by loading `nvm` when "nvm", "npm" or "node" is used for the first time
  14. QinMing revised this gist Sep 24, 2018. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -71,3 +71,7 @@ alias ve="lazy_load 've' $HOME/git/simple-virtualenv-wrapper/ve.sh ve"

    # If using GnuPG to sign git commits, etc, need the following.
    export GPG_TTY=$(tty)

    # Other applications
    # eval $(thefuck --alias)
    # eval "$(pyenv init -)"
  15. QinMing revised this gist Aug 2, 2018. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -68,3 +68,6 @@ group_lazy_load $HOME/.rvm/scripts/rvm rvm irb rake rails
    unset -f group_lazy_load

    alias ve="lazy_load 've' $HOME/git/simple-virtualenv-wrapper/ve.sh ve"

    # If using GnuPG to sign git commits, etc, need the following.
    export GPG_TTY=$(tty)
  16. QinMing revised this gist Jul 23, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Copyright (c) 2016 Ming Qin (覃明) <https://github.com/QinMing>
    # Copyright (c) 2016-2018 Ming Qin (覃明) <https://github.com/QinMing>
    # Open source under MIT LICENSE.

    ZSH_THEME="agnoster"
  17. QinMing revised this gist Jul 23, 2018. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@ alias dcp='docker-compose'
    alias docker-clean='docker system prune --volumes -f'

    # https://stackoverflow.com/questions/1904860/how-to-remove-unreferenced-blobs-from-my-git-repo
    alias git-gc-all='git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 -c gc.rerereunresolved=0 -c gc.pruneExpire=now gc "$@"'
    alias git-clean='git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 -c gc.rerereunresolved=0 -c gc.pruneExpire=now gc "$@"'

    lazy_load() {
    # Act as a stub to another shell function/command. When first run, it will load the actual function/command then execute it.
    @@ -68,6 +68,3 @@ group_lazy_load $HOME/.rvm/scripts/rvm rvm irb rake rails
    unset -f group_lazy_load

    alias ve="lazy_load 've' $HOME/git/simple-virtualenv-wrapper/ve.sh ve"

    #alias makedocker=". '/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh'"
    #eval "$(docker-machine env default)"
  18. QinMing revised this gist Jul 23, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ alias gbd='git checkout -q master && git remote prune origin && git for-each-ref
    alias gck='git checkout'
    alias gp='git pull'
    alias dcp='docker-compose'
    alias docker-clean='docker volume ls -qf dangling=true | xargs docker volume rm'
    alias docker-clean='docker system prune --volumes -f'

    # https://stackoverflow.com/questions/1904860/how-to-remove-unreferenced-blobs-from-my-git-repo
    alias git-gc-all='git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 -c gc.rerereunresolved=0 -c gc.pruneExpire=now gc "$@"'
  19. QinMing revised this gist Jun 22, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -16,8 +16,8 @@ alias gs='git status'
    alias gl='git l'
    alias gd='git diff'
    alias gb='git branch'
    alias gbd='git checkout -q develop && git remote prune origin && git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do mergeBase=$(git merge-base develop $branch) && [[ $(git cherry develop $(git commit-tree $(git rev-parse $branch^{tree}) -p $mergeBase -m _)) == "-"* ]] && git branch -D $branch; done; git prune'
    # Delete local branches that squash-merged to `develop`. Forked from https://github.com/not-an-aardvark/git-delete-squashed
    alias gbd='git checkout -q master && git remote prune origin && git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do mergeBase=$(git merge-base master $branch) && [[ $(git cherry master $(git commit-tree $(git rev-parse $branch^{tree}) -p $mergeBase -m _)) == "-"* ]] && git branch -D $branch; done; git prune'
    # Delete local branches that squash-merged to `master`. Forked from https://github.com/not-an-aardvark/git-delete-squashed

    alias gck='git checkout'
    alias gp='git pull'
  20. QinMing revised this gist Jun 22, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ alias gs='git status'
    alias gl='git l'
    alias gd='git diff'
    alias gb='git branch'
    alias gbd='git checkout -q develop && git remote prune origin && git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do mergeBase=$(git merge-base develop $branch) && [[ $(git cherry develop $(git commit-tree $(git rev-parse $branch^{tree}) -p $mergeBase -m _)) == "-"* ]] && git branch -D $branch; done'
    alias gbd='git checkout -q develop && git remote prune origin && git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do mergeBase=$(git merge-base develop $branch) && [[ $(git cherry develop $(git commit-tree $(git rev-parse $branch^{tree}) -p $mergeBase -m _)) == "-"* ]] && git branch -D $branch; done; git prune'
    # Delete local branches that squash-merged to `develop`. Forked from https://github.com/not-an-aardvark/git-delete-squashed

    alias gck='git checkout'
  21. QinMing revised this gist Jun 22, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ alias gs='git status'
    alias gl='git l'
    alias gd='git diff'
    alias gb='git branch'
    alias gbd='git checkout -q develop && git remote prune origin && git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do mergeBase=$(git merge-base master $branch) && [[ $(git cherry master $(git commit-tree $(git rev-parse $branch^{tree}) -p $mergeBase -m _)) == "-"* ]] && git branch -D $branch; done'
    alias gbd='git checkout -q develop && git remote prune origin && git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do mergeBase=$(git merge-base develop $branch) && [[ $(git cherry develop $(git commit-tree $(git rev-parse $branch^{tree}) -p $mergeBase -m _)) == "-"* ]] && git branch -D $branch; done'
    # Delete local branches that squash-merged to `develop`. Forked from https://github.com/not-an-aardvark/git-delete-squashed

    alias gck='git checkout'
  22. QinMing revised this gist Jun 22, 2018. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,9 @@ alias gs='git status'
    alias gl='git l'
    alias gd='git diff'
    alias gb='git branch'
    alias gbd='git checkout -q develop && git remote prune origin && git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do mergeBase=$(git merge-base master $branch) && [[ $(git cherry master $(git commit-tree $(git rev-parse $branch^{tree}) -p $mergeBase -m _)) == "-"* ]] && git branch -D $branch; done'
    # Delete local branches that squash-merged to `develop`. Forked from https://github.com/not-an-aardvark/git-delete-squashed

    alias gck='git checkout'
    alias gp='git pull'
    alias dcp='docker-compose'
  23. QinMing revised this gist May 13, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -57,7 +57,7 @@ group_lazy_load() {
    }

    export NVM_DIR=~/.nvm
    group_lazy_load $HOME/.nvm/nvm.sh nvm node npm
    group_lazy_load $HOME/.nvm/nvm.sh nvm node npm truffle

    export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
    group_lazy_load $HOME/.rvm/scripts/rvm rvm irb rake rails
  24. QinMing revised this gist May 7, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    # Open source under MIT LICENSE.

    ZSH_THEME="agnoster"
    plugins=(git pip docker docker-compose django)
    plugins=(zsh-autosuggestions git pip django docker docker-compose)

    # ......

  25. QinMing revised this gist Apr 27, 2018. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,7 @@ alias gs='git status'
    alias gl='git l'
    alias gd='git diff'
    alias gb='git branch'
    alias gck='git checkout'
    alias gp='git pull'
    alias dcp='docker-compose'
    alias docker-clean='docker volume ls -qf dangling=true | xargs docker volume rm'
  26. QinMing revised this gist Apr 6, 2018. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,7 @@ alias gd='git diff'
    alias gb='git branch'
    alias gp='git pull'
    alias dcp='docker-compose'
    alias docker-clean='docker volume ls -qf dangling=true | xargs docker volume rm'

    # https://stackoverflow.com/questions/1904860/how-to-remove-unreferenced-blobs-from-my-git-repo
    alias git-gc-all='git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 -c gc.rerereunresolved=0 -c gc.pruneExpire=now gc "$@"'
  27. QinMing revised this gist Nov 22, 2017. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,9 @@ alias gb='git branch'
    alias gp='git pull'
    alias dcp='docker-compose'

    # https://stackoverflow.com/questions/1904860/how-to-remove-unreferenced-blobs-from-my-git-repo
    alias git-gc-all='git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 -c gc.rerereunresolved=0 -c gc.pruneExpire=now gc "$@"'

    lazy_load() {
    # Act as a stub to another shell function/command. When first run, it will load the actual function/command then execute it.
    # E.g. This made my zsh load 0.8 seconds faster by loading `nvm` when "nvm", "npm" or "node" is used for the first time
  28. QinMing revised this gist Nov 7, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -60,6 +60,6 @@ group_lazy_load $HOME/.rvm/scripts/rvm rvm irb rake rails
    unset -f group_lazy_load

    alias ve="lazy_load 've' $HOME/git/simple-virtualenv-wrapper/ve.sh ve"
    alias makedocker=". '/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh'"

    #alias makedocker=". '/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh'"
    #eval "$(docker-machine env default)"
  29. QinMing revised this gist Oct 3, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    # Open source under MIT LICENSE.

    ZSH_THEME="agnoster"
    plugins=(git pip docker django)
    plugins=(git pip docker docker-compose django)

    # ......

  30. QinMing revised this gist Oct 3, 2017. 1 changed file with 10 additions and 11 deletions.
    21 changes: 10 additions & 11 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -8,17 +8,16 @@ plugins=(git pip docker django)

    unsetopt AUTO_CD

    alias l="ls -alhtr"

    alias upthis="ss u"
    alias downthis="ss d"

    alias g="git"
    alias gs="git status"
    alias gl="git l"
    alias gd="git diff"
    alias gb="git branch"
    alias gp="git pull"
    alias l='ls -alhtr'
    alias upthis='ss u'
    alias downthis='ss d'
    alias g='git'
    alias gs='git status'
    alias gl='git l'
    alias gd='git diff'
    alias gb='git branch'
    alias gp='git pull'
    alias dcp='docker-compose'

    lazy_load() {
    # Act as a stub to another shell function/command. When first run, it will load the actual function/command then execute it.