Last active
October 11, 2021 12:33
-
-
Save ChenTanyi/8bdb39fb9fcadbd1c9307a83d0874f07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
parse_git_branch() { | |
branch=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'` | |
if [[ ! -z "$branch" ]]; then | |
printf " $branch" | |
fi | |
} | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h \[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch) \[\033[01;35m\]\t\[\033[00m\]\$ ' | |
findshasum() { | |
if [[ $# < 1 ]]; then | |
echo "need folder" | |
return | |
fi | |
find "$1" -type f -exec sha256sum {} \; > "$1.sha256" | |
} | |
alias l="ls" | |
alias ll="ls -al" | |
alias dockerrm="docker rm $(docker ps -aq)" | |
alias dockerrmf="docker rm -f $(docker ps -aq)" | |
alias dockerrmi="docker rmi $(docker images -q -f dangling=true)" | |
alias dockerrmia="docker rmi $(docker images -q)" | |
alias kubectlgetall="kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get --show-kind --ignore-not-found" | |
alias kubectltest="kubectl exec -it test -- sh" | |
alias kubectltestb="kubectl exec -it test -- bash" | |
alias sshproxy="ssh -o ProxyCommand='ncat --proxy-type socks5 --proxy 127.0.0.1:1080 %h %p'" # http remove --proxy-type | |
export NODE_OPTIONS=--max-old-space-size=8192 | |
export MAVEN_OPTS="-Djava.net.useSystemProxies=true" | |
alias mvns="mvn -DskipTests" | |
alias mvnt="mvn -Dmaven.test.skip" | |
alias mvnrun="mvn compile exec:java" | |
alias mvnpackall='mvn -Dmaven.test.skip=true source:jar javadoc:jar package' | |
alias updatejava='sudo update-alternatives --config java' | |
alias proxy='http_proxy=http://127.0.0.1:8087 https_proxy=http://127.0.0.1:8087 HTTP_PROXY=http://127.0.0.1:8087 HTTPS_PROXY=http://127.0.0.1:8087' | |
alias exportproxy='export http_proxy=http://127.0.0.1:8087 https_proxy=http://127.0.0.1:8087 HTTP_PROXY=http://127.0.0.1:8087 HTTPS_PROXY=http://127.0.0.1:8087 MAVEN_OPTS="$MAVEN_OPTS -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8087 -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8087"' | |
alias gitproxy='git config --global http.proxy http://127.0.0.1:8087' | |
alias gitunsetproxy='git config --global --unset http.proxy' | |
export PYTHONIOENCODING='utf-8' | |
eval $(thefuck --alias) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment