diff --git a/.zshrc b/.zshrc index c5a85ef..c514dd0 100644 --- a/.zshrc +++ b/.zshrc @@ -133,7 +133,8 @@ unset files file; #------------------------------------------------------------------------------- source <(kubectl completion zsh) -source <(kafkactl completion zsh) +#not working in m1 +#source <(kafkactl completion zsh) #------------------------------------------------------------------------------- # Activate jenv & rbenv & pyenv @@ -148,8 +149,7 @@ if which pyenv > /dev/null; then fi #------------------------------------------------------------------------------- -# Prefer zsh-completions -# @see https://stackoverflow.com/a/26479426 +# homebrew for apple silicon #------------------------------------------------------------------------------- # if type brew &>/dev/null; then @@ -163,4 +163,4 @@ fi # fi # source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh -source $DOTFILES/kubectl.zsh \ No newline at end of file +source $DOTFILES/kubectl.zsh diff --git a/aliases.sh b/aliases.sh index 76db1a2..2bb8d28 100644 --- a/aliases.sh +++ b/aliases.sh @@ -3,7 +3,7 @@ #------------------------------------------------------------------------------- # List current directory -alias ll="$(brew --prefix coreutils)/libexec/gnubin/ls -ahlF --color --group-directories-first" +alias ll="ls -ahlF --color" #------------------------------------------------------------------------------- # Homebrew @@ -102,4 +102,9 @@ alias kf=kafkactl # ffplay #------------------------------------------------------------------------------- -alias ff=ffplay -hide_banner -stats -i \ No newline at end of file +alias ff=ffplay -hide_banner -stats -i + +#------------------------------------------------------------------------------- +# jq, reference https://stackoverflow.com/a/69906667 +# command | jq -R '. as $line | try (fromjson) catch $line' +#------------------------------------------------------------------------------- diff --git a/bootstrap.sh b/bootstrap.sh index 19d58c0..9159f69 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -6,7 +6,6 @@ #------------------------------------------------------------------------------- export DOTFILES=$HOME/dotfiles -# export HOMEBREW_CASK_OPTS="--appdir=/Applications" #------------------------------------------------------------------------------- # Update dotfiles itself @@ -21,83 +20,85 @@ fi #------------------------------------------------------------------------------- if test ! $(which brew); then - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" fi #------------------------------------------------------------------------------- # Install executables and libraries #------------------------------------------------------------------------------- -brew install bash -brew install zsh -brew install zsh-completions -brew install coreutils -brew install findutils -brew install gnu-sed -brew install awscli -brew install aws-elasticbeanstalk -brew install git -brew install ghz -brew install htop -brew install httpie -brew install jq -brew install kubectl -brew install k9s -brew install openssl -brew install tcpdump -brew install tree -brew install watch -brew install wget -brew install yarn -brew install youtube-dl -brew install openapi-generator -brew install aws-iam-authenticator -brew install speedtest-cli -brew install colordiff -brew install telnet -brew install git-crypt -brew install gnupg -brew install graphviz -brew install deviceinsight/packages/kafkactl -brew install ffmpeg -brew install dive -brew install protobuf -brew install grpcurl - -brew install composer -brew install php -brew install phpunit -brew install brew-php-switcher - -brew install ruby -brew install rbenv - -brew install python -brew install pyenv - -brew install gradle -brew install maven -brew install sbt -brew install jenv - -brew install mysql-client - -brew install corretto8 -brew install corretto11 -brew install corretto17 -brew install docker -brew install firefox -brew install google-chrome -brew install google-backup-and-sync -brew install intellij-idea -brew install iterm2 -brew install postman -brew install obs -brew install slack -brew install sublime-text -brew install wireshark -brew install tableplus -brew install homebrew/cask-fonts/font-source-code-pro +arch -arm64 brew install bash +arch -arm64 brew install zsh +arch -arm64 brew install zsh-completions +arch -arm64 brew install coreutils +arch -arm64 brew install findutils +arch -arm64 brew install gnu-sed +arch -arm64 brew install awscli +arch -arm64 brew install git +arch -arm64 brew install ghz +arch -arm64 brew install htop +arch -arm64 brew install httpie +arch -arm64 brew install jq +arch -arm64 brew install kubectl +arch -arm64 brew install k9s +arch -arm64 brew install openssl +arch -arm64 brew install tcpdump +arch -arm64 brew install tree +arch -arm64 brew install watch +arch -arm64 brew install wget +arch -arm64 brew install yarn +arch -arm64 brew install youtube-dl +arch -arm64 brew install openapi-generator +arch -arm64 brew install aws-iam-authenticator +arch -arm64 brew install speedtest-cli +arch -arm64 brew install colordiff +arch -arm64 brew install telnet +arch -arm64 brew install git-crypt +arch -arm64 brew install gnupg +arch -arm64 brew install graphviz +arch -arm64 brew install ffmpeg +arch -arm64 brew install dive +arch -arm64 brew install protobuf +arch -arm64 brew install grpcurl +# workaround for jshell console error, @see https://github.com/mrsarm/jshell-plugin#tab-completion-and-arrow-keys-not-working +arch -arm64 brew install rlwrap + +arch -arm64 brew install composer +arch -arm64 brew install php +arch -arm64 brew install phpunit +arch -arm64 brew install brew-php-switcher + +arch -arm64 brew install ruby +arch -arm64 brew install rbenv +arch -arm64 brew install python +arch -arm64 brew install pyenv + +arch -arm64 brew install gradle +arch -arm64 brew install maven +arch -arm64 brew install sbt +arch -arm64 brew install jenv + +arch -arm64 brew install mysql-client + +arch -arm64 brew install corretto8 +arch -arm64 brew install corretto11 +arch -arm64 brew install corretto17 +arch -arm64 brew install docker --cask +arch -arm64 brew install docker-credential-helper +arch -arm64 brew install firefox +arch -arm64 brew install google-chrome +arch -arm64 brew install intellij-idea +arch -arm64 brew install iterm2 +arch -arm64 brew install jmc +arch -arm64 brew install postman +arch -arm64 brew install obs +arch -arm64 brew install slack +arch -arm64 brew install sublime-text +arch -arm64 brew install visual-studio-code +arch -arm64 brew install visualvm +arch -arm64 brew install wireshark +arch -arm64 brew install tableplus +arch -arm64 brew install homebrew/cask-fonts/font-source-code-pro #------------------------------------------------------------------------------- # Install global Git configuration diff --git a/export.sh b/export.sh index 602318b..60129b7 100644 --- a/export.sh +++ b/export.sh @@ -17,5 +17,5 @@ export EDITOR=vim # export MONO_GAC_PREFIX="/usr/local" -export GOROOT=~/sdk/go1.20.4 -export GOPATH=~/go +export GOROOT=$(/opt/homebrew/bin/brew --prefix go) +export GOPATH=$HOME/go diff --git a/functions.sh b/functions.sh index 0f3da56..b95a2d1 100644 --- a/functions.sh +++ b/functions.sh @@ -633,7 +633,7 @@ mp3() { #------------------------------------------------------------------------------- jsh() { - cd $HOME/jsh && ./gradlew --no-daemon --console plain jshell + cd $HOME/jsh && rlwrap ./gradlew --no-daemon --console plain jshell cd - } @@ -752,33 +752,3 @@ klogs() { kubectl logs -f "$1" | jq -R '. as $line | try (fromjson) catch $line' } - -#------------------------------------------------------------------------------- -# Tunneling through K8S POD -# To install tcpserver: brew install ucspi-tcp -#------------------------------------------------------------------------------- - -kubetunnel() { - ensure_dependency tcpserver - ensure_dependency nc - - ROW=(`kubectl get pods -n "$1" | grep "$2" | head -n 1`) - POD="$ROW[1]" - DEST="$3" - LPORT="${4:=5000}" - - if [ -z "$POD" -o -z "$DEST" ]; then - echo "Usage: kubetunnel [LPORT]" - echo "" - echo "Required" - echo " NS : K8S namespace" - echo " POD : POD name to use as a proxy" - echo " DEST : dest address and port" - echo "Optional" - echo " LPORT : local binding port(default: 5000)" - return 1 - fi - - echo "Connect to 127.0.0.1:$LPORT to access $DEST tunneling through $POD..." - tcpserver -v 127.0.0.1 "$LPORT" kubectl exec -n "$1" -it "$POD" -- nc "$DEST" -} \ No newline at end of file diff --git a/manual_install b/manual_install new file mode 100644 index 0000000..8b3a33b --- /dev/null +++ b/manual_install @@ -0,0 +1,11 @@ +Docker +notion +sequel pro nightly +vscode +zoom +dbsafer +카카오톡 +한컴오피스한글뷰어 +IntelliJ +DataGrip +corretto jdk \ No newline at end of file diff --git a/path.sh b/path.sh index 8e77d66..7011b31 100644 --- a/path.sh +++ b/path.sh @@ -1,14 +1,10 @@ -#------------------------------------------------------------------------------- -# Local bin directories before anything else -#------------------------------------------------------------------------------- - -PATH="/usr/local/sbin:$PATH" +PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" #------------------------------------------------------------------------------- # Use project specific binaries before global ones #------------------------------------------------------------------------------- -PATH="$HOME/npm/bin:$PATH" +PATH="$(/opt/homebrew/bin/brew --prefix node@18)/bin:$HOME/npm/bin:$PATH" export NODE_PATH="$HOME/npm/lib/node_modules" #------------------------------------------------------------------------------- @@ -17,56 +13,33 @@ export NODE_PATH="$HOME/npm/lib/node_modules" # @see https://gist.github.com/appkr/e90ddf378a28745fcd75c56a1fa9ba72 #------------------------------------------------------------------------------- -# For old version of PHP @see https://tecadmin.net/install-php-macos/ -# $ curl -s http://php-osx.liip.ch/install.sh | bash -s 7.{y} -# Note the install location is /usr/local/php5/bin -#export PATH=/usr/local/php5/bin:$PATH - -# For old version of PHP @see https://gist.github.com/appkr/e90ddf378a28745fcd75c56a1fa9ba72 -# But following line is not required when brew-php-switcher is installed -export PATH="$(brew --prefix php)/bin:$PATH" - -PATH="$(brew --prefix ruby)/bin:$PATH" mkdir -p $HOME/gems export GEM_HOME=$HOME/gems export GEM_PATH=$HOME/gems -PATH=$GEM_HOME/bin:$PATH - -#------------------------------------------------------------------------------- -# Make sure coreutils are loaded before system commands -#------------------------------------------------------------------------------- - -PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH" - -#------------------------------------------------------------------------------- -# Composer -#------------------------------------------------------------------------------- -# PATH="$PATH:$HOME/.composer/vendor/bin" +PATH="$(/opt/homebrew/bin/brew --prefix php)/bin:$(/opt/homebrew/bin/brew --prefix ruby)/bin:$GEM_HOME/bin:$PATH" #------------------------------------------------------------------------------- -# Load custom commands +# Make sure coreutils are loaded before system commands #------------------------------------------------------------------------------- -PATH="/usr/local/opt/icu4c/bin:$PATH" -PATH="/usr/local/opt/icu4c/sbin:$PATH" +PATH="$(/opt/homebrew/bin/brew --prefix coreutils)/libexec/gnubin:$PATH" #------------------------------------------------------------------------------- -# Load mysql-client +# Go #------------------------------------------------------------------------------- -PATH="/opt/homebrew/opt/mysql-client/bin:$PATH" +PATH="$(/opt/homebrew/bin/brew --prefix go)/bin:$GOPATH:$PATH" #------------------------------------------------------------------------------- -# Load Kubernetes +# CLang #------------------------------------------------------------------------------- -PATH="$(brew --prefix kubernetes-cli@1.22)/bin:$PATH" +PATH="$(/opt/homebrew/bin/brew --prefix llvm)/bin:$PATH" #------------------------------------------------------------------------------- -# Golang +# Return #------------------------------------------------------------------------------- -PATH="${HOME}/sdk/go1.20.4/bin:$PATH" - export PATH="$DOTFILES/bin:$PATH" +