Last active
January 18, 2019 05:11
-
-
Save gertcuykens/763897d586960e3b1515 to your computer and use it in GitHub Desktop.
shell
This file contains hidden or 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 | |
| if [ -r ~/.bashrc ]; then | |
| . ~/.bashrc | |
| fi |
This file contains hidden or 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 | |
| export GOPATH=$HOME/go | |
| export GOBIN=$HOME/go/bin | |
| export GOAPP=$HOME/go_appengine | |
| export JSBIN=$HOME/node/bin | |
| export RUST=$HOME/.cargo/bin | |
| export RUST_SRC_PATH=$HOME/rust/src | |
| export GEM=$HOME/.gem/bin | |
| export ANDROID=$HOME/Library/Android/sdk/platform-tools | |
| export PATH=$PATH:$GOBIN:$GOAPP:$JSBIN:$ANDROID:$GEM:$RUST | |
| export EDITOR="code" | |
| export VISUAL="code" | |
| export CLICOLOR=1 | |
| # export LSCOLORS=GxFxCxDxBxegedabagaced | |
| # export PS1="\u@\h \w> " | |
| # export PS2="continue-> " | |
| # export PS3="Select a day (1-4): " | |
| # export PS4='$LINENO) ' | |
| # $0 FILE | |
| # set -x DEBUG | |
| function prompt { | |
| EXITSTATUS="$?" | |
| BOLD="\[\033[1m\]" | |
| RED="\[\033[1;31m\]" | |
| GREEN="\[\e[32;1m\]" | |
| BLUE="\[\e[34;1m\]" | |
| OFF="\[\033[m\]" | |
| PROMPT='\u@\h \w' | |
| BRANCH=$(git branch 2>/dev/null | sed -n "s/* \(.*\)/\(\1\)/p") | |
| if [ "${EXITSTATUS}" -eq 0 ] | |
| then | |
| PS1="${BOLD}${GREEN}\$${OFF} ${PROMPT} ${BRANCH}\n${BOLD}\$${OFF} " | |
| else | |
| PS1="${BOLD}${RED}\$${OFF} ${PROMPT} ${BRANCH}\n${BOLD}\$${OFF} " | |
| fi | |
| PS2="${BOLD}>${OFF} " | |
| } | |
| export PROMPT_COMMAND=prompt | |
| # bind 'set show-all-if-ambiguous on' | |
| # bind 'TAB:menu-complete' | |
| # complete -C ... | |
| alias ls='ls --color=auto' | |
This file contains hidden or 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 | |
| pkill -9 cockroach | |
| kill -SIGQUIT (pgrep cockroach) | |
| bash -xec | |
| set -xe | |
| set -euo pipefail | |
| cat <<EOF | sudo tee save.json | |
| EOF | |
| DATA=$(< <(cat <<EOF | |
| EOF | |
| )) | |
| curl -d @- <<'EOF' | |
| { | |
| "field1": "test", | |
| } | |
| EOF | |
| # here string | |
| read first second <<< "hello world" | |
| echo $second $first | |
| # https://github.com/golang/go/blob/master/src/crypto/tls/generate_cert.go | |
| # generate_cert -host=127.0.0.1,localhost -ca -ecdsa-curve=P384 |
This file contains hidden or 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
| setenv GOROOT /Users/gert/Documents/sdk-appengine/goroot | |
| setenv GOPATH /Users/gert/Documents/sdk-appengine/gopath | |
| setenv APPENGINE_DEV_APPSERVER /Users/gert/Documents/sdk-appengine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment