From 00ec6dffdc4fae4a57ee243dc1e2191c2ba7a3d7 Mon Sep 17 00:00:00 2001 From: appkr Date: Thu, 28 Apr 2022 08:42:40 +0900 Subject: [PATCH 01/17] for apple silicon --- .zshrc | 16 ++++------------ aliases.sh | 2 +- bootstrap.sh | 12 ++++++------ manual_install | 11 +++++++++++ 4 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 manual_install diff --git a/.zshrc b/.zshrc index eee8da7..48fae7b 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,16 +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 -# PATH=$(brew --prefix)/share/zsh-completions:$PATH -# if [ -f "$HOME/.zcompdump" ]; then -# rm -f ~/.zcompdump -# fi -# autoload -Uz compinit -# compinit -# zmodload -i zsh/complist -# fi \ No newline at end of file +eval "$(/opt/homebrew/bin/brew shellenv)" diff --git a/aliases.sh b/aliases.sh index 76db1a2..144b7ee 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 diff --git a/bootstrap.sh b/bootstrap.sh index 08f0fec..a16f237 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,7 +20,7 @@ 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 #------------------------------------------------------------------------------- @@ -35,7 +34,6 @@ brew install coreutils brew install findutils brew install gnu-sed brew install awscli -brew install aws-elasticbeanstalk brew install git brew install htop brew install httpie @@ -57,9 +55,9 @@ brew install telnet brew install git-crypt brew install gnupg brew install graphviz -brew install deviceinsight/packages/kafkactl +#not working in m1 +#brew install deviceinsight/packages/kafkactl brew install ffmpeg -brew install dive brew install composer brew install php @@ -82,13 +80,15 @@ brew install adoptopenjdk11 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 jmc brew install postman brew install obs brew install slack brew install sublime-text +brew install visual-studio-code +brew install visualvm brew install wireshark brew install tableplus brew install homebrew/cask-fonts/font-source-code-pro 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 From 4a1f968aa97a86c2b3d0efe2b760e51ad2a1d9df Mon Sep 17 00:00:00 2001 From: appkr Date: Thu, 28 Apr 2022 11:27:07 +0900 Subject: [PATCH 02/17] java version --- path.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/path.sh b/path.sh index 590c7b6..c3537be 100644 --- a/path.sh +++ b/path.sh @@ -1,8 +1,8 @@ #------------------------------------------------------------------------------- -# Local bin directories before anything else +# Java version #------------------------------------------------------------------------------- -PATH="/usr/local/sbin:$PATH" +PATH="$HOME/.jenv/bin:$PATH" #------------------------------------------------------------------------------- # Use project specific binaries before global ones From c247d66fdff8c61ab344913946653fb8574a16be Mon Sep 17 00:00:00 2001 From: appkr Date: Fri, 29 Apr 2022 08:24:13 +0900 Subject: [PATCH 03/17] fix path --- path.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/path.sh b/path.sh index c3537be..a2e5dbf 100644 --- a/path.sh +++ b/path.sh @@ -24,9 +24,9 @@ export NODE_PATH="$HOME/npm/lib/node_modules" # 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" +export PATH="$(/opt/homebrew/bin/brew --prefix php)/bin:$PATH" -PATH="$(brew --prefix ruby)/bin:$PATH" +PATH="$(/opt/homebrew/bin/brew --prefix ruby)/bin:$PATH" mkdir -p $HOME/gems export GEM_HOME=$HOME/gems export GEM_PATH=$HOME/gems @@ -36,7 +36,7 @@ PATH=$GEM_HOME/bin:$PATH # Make sure coreutils are loaded before system commands #------------------------------------------------------------------------------- -PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH" +PATH="$(/opt/homebrew/bin/brew --prefix coreutils)/libexec/gnubin:$PATH" #------------------------------------------------------------------------------- # Composer From 1f56eba39f6e86e327d1a0e39e67341870d1e786 Mon Sep 17 00:00:00 2001 From: appkr Date: Mon, 2 May 2022 11:27:38 +0900 Subject: [PATCH 04/17] docker-credential-helper --- bootstrap.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index a16f237..bad3e58 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -77,7 +77,8 @@ brew install jenv brew install adoptopenjdk/openjdk/adoptopenjdk8 brew install adoptopenjdk11 -brew install docker +brew install docker --cask +brew install docker-credential-helper brew install firefox brew install google-chrome brew install intellij-idea From 8d0d57a64da0f9e21bee212ff165a3d54a7c8dfc Mon Sep 17 00:00:00 2001 From: appkr Date: Fri, 8 Jul 2022 13:29:33 +0900 Subject: [PATCH 05/17] added GOPATH envvar --- export.sh | 2 ++ path.sh | 11 ++--------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/export.sh b/export.sh index 19c6050..15f18bd 100644 --- a/export.sh +++ b/export.sh @@ -16,3 +16,5 @@ export EDITOR=vim #------------------------------------------------------------------------------- # export MONO_GAC_PREFIX="/usr/local" + +export GOPATH=$HOME/go diff --git a/path.sh b/path.sh index a2e5dbf..62d12bb 100644 --- a/path.sh +++ b/path.sh @@ -39,16 +39,9 @@ PATH=$GEM_HOME/bin:$PATH PATH="$(/opt/homebrew/bin/brew --prefix coreutils)/libexec/gnubin:$PATH" #------------------------------------------------------------------------------- -# Composer +# Go #------------------------------------------------------------------------------- -# PATH="$PATH:$HOME/.composer/vendor/bin" - -#------------------------------------------------------------------------------- -# Load custom commands -#------------------------------------------------------------------------------- - -PATH="/usr/local/opt/icu4c/bin:$PATH" -PATH="/usr/local/opt/icu4c/sbin:$PATH" +PATH=$GOPATH:$PATH export PATH="$DOTFILES/bin:$PATH" From fcf074fc009f7f542efe85e5cbd5cb33f930d575 Mon Sep 17 00:00:00 2001 From: appkr Date: Thu, 15 Sep 2022 17:23:29 +0900 Subject: [PATCH 06/17] sync_refiner function --- functions.sh | 105 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 102 insertions(+), 3 deletions(-) diff --git a/functions.sh b/functions.sh index abceee3..31ba3d4 100644 --- a/functions.sh +++ b/functions.sh @@ -1,3 +1,51 @@ +GREEN='\033[0;32m' +RED='\033[0;31m' +YELLOW='\033[0;33m' +NC='\033[0m' + +ensure_dependency() { + if ! which "$1" &>/dev/null ; then + echo "$1 not found" + exit 1 + fi +} + +confirm() { + read -r -p "${1:-Are you sure? [y/N]} " response + case "$response" in + [yY]) + true + ;; + *) + false + ;; + esac +} + +print_bold() { + if [ ! -z "$1" ]; then + echo -e "${BOLD}${1}${NC}" + fi +} + +print_red() { + if [ ! -z "$1" ]; then + echo -e "${RED}${1}${NC}" + fi +} + +print_green() { + if [ ! -z "$1" ]; then + echo -e "${GREEN}${1}${NC}" + fi +} + +print_yellow() { + if [ ! -z "$1" ]; then + echo -e "${YELLOW}${1}${NC}" + fi +} + #------------------------------------------------------------------------------- # Shell function chestsheet #------------------------------------------------------------------------------- @@ -611,11 +659,11 @@ function javahome() { function mt() { if [ "$1" = "" ]; then - echo "git re-tag and push" + echo "change git tag and push" echo "" echo "Usage:" - echo ' retag ' - echo " e.g. retag jenkins" + echo ' mt ' + echo " e.g. mt jenkins" return 0; fi; @@ -640,3 +688,54 @@ function mt() { # cd $HOME/msa/vroong-accountsbff && export APPLICATION_UAAENDPOINT=http://localhost:9999 && ./gradlew clean bootRun # cd - # } + +#------------------------------------------------------------------------------- +# sync neogeorefiner +#------------------------------------------------------------------------------- + +function sync_refiner() { + if [ "$1" = "" ]; then + echo "neogeorefiner 이미지를 최신화합니다" + echo "" + echo "Usage:" + echo " $0 " + echo " e.g. $0 etpost-20220915030019" + return 0; + fi; + + container=$(docker inspect neogeorefiner --format "{{json .State.Status}}" 2> /dev/null | xargs) + if [ "running" = "$container" ]; then + print_red "neogeorefiner docker container is running" + echo "" + print_bold " cd vroong-neogeo && ./gradlew composeDown" + echo "" + return 0; + fi + + print_red "기존 이미지를 지울까요? [y/N]} " + read -r response + case "$response" in + [yY]) + candidate1=$(docker image ls --filter=reference="neogeorefiner" --quiet) + candidate2=$(docker image ls --filter=reference="200327251464.dkr.ecr.ap-northeast-2.amazonaws.com/vroong/neogeorefiner" --quiet) + docker image rm $candidate1 $candidate2 --force + ;; + esac + + print_green "ECR에 로그인합니다" + aws ecr get-login-password --region ap-northeast-2 --profile meshtools | docker login --username AWS --password-stdin 200327251464.dkr.ecr.ap-northeast-2.amazonaws.com + + echo "" + + print_green "이미지를 내려받습니다" + docker pull 200327251464.dkr.ecr.ap-northeast-2.amazonaws.com/vroong/neogeorefiner:$1 + + echo "" + + print_green "neogeorefiner:latest 태그를 부여합니다" + docker tag 200327251464.dkr.ecr.ap-northeast-2.amazonaws.com/vroong/neogeorefiner:$1 neogeorefiner:latest + + echo "" + + print_green "성공" +} From d07f54b4f2d4ceae5e2ac9770e7c87d0031459c2 Mon Sep 17 00:00:00 2001 From: appkr Date: Tue, 4 Oct 2022 08:52:04 +0900 Subject: [PATCH 07/17] guide to how to install xcode command line tool --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index c27c781..cb00f2c 100644 --- a/readme.md +++ b/readme.md @@ -11,7 +11,7 @@ - Install xcode command line tools ```bash -$ xcode-select -p +$ sudo xcode-select --install ``` - Copy files from the backup, including ssh keys From ba16457dc881b8cf9e40432a4f7ea7597c88477b Mon Sep 17 00:00:00 2001 From: appkr Date: Wed, 26 Oct 2022 09:44:47 +0900 Subject: [PATCH 08/17] added json alias --- aliases.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aliases.sh b/aliases.sh index 144b7ee..2bb8d28 100644 --- a/aliases.sh +++ b/aliases.sh @@ -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' +#------------------------------------------------------------------------------- From fc65b85bb618882a7ccbcad76c0f63b7b573e099 Mon Sep 17 00:00:00 2001 From: appkr Date: Thu, 27 Oct 2022 09:51:48 +0900 Subject: [PATCH 09/17] add k logs function --- functions.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/functions.sh b/functions.sh index 31ba3d4..cc08fe6 100644 --- a/functions.sh +++ b/functions.sh @@ -739,3 +739,19 @@ function sync_refiner() { print_green "성공" } + +#------------------------------------------------------------------------------- +# k8s pod log +#------------------------------------------------------------------------------- + +function klogs() { + if [ "$1" = "" ]; then + echo "view k8s pod logs" + echo "" + echo "Usage:" + echo ' klogs ' + return 0; + fi; + + logs -f "$1" | jq -R '. as $line | try (fromjson) catch $line' +} \ No newline at end of file From 0d0491a66a3bfa74f300c14322e9799b76721c11 Mon Sep 17 00:00:00 2001 From: appkr Date: Thu, 27 Oct 2022 09:53:46 +0900 Subject: [PATCH 10/17] fix klogs functions --- functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index d6de17d..047151a 100644 --- a/functions.sh +++ b/functions.sh @@ -753,5 +753,5 @@ function klogs() { return 0; fi; - logs -f "$1" | jq -R '. as $line | try (fromjson) catch $line' + kubectl logs -f "$1" | jq -R '. as $line | try (fromjson) catch $line' } From 2f1123c801f44d7c9dbf2724e9d39f1712d4c1fa Mon Sep 17 00:00:00 2001 From: appkr Date: Wed, 2 Nov 2022 10:29:45 +0900 Subject: [PATCH 11/17] fix "dotfiles/path.sh:47: command not found: brew" --- path.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/path.sh b/path.sh index b1db187..bb6df2d 100644 --- a/path.sh +++ b/path.sh @@ -44,4 +44,4 @@ PATH="$(/opt/homebrew/bin/brew --prefix coreutils)/libexec/gnubin:$PATH" PATH=$GOPATH:$PATH -export PATH="$(brew --prefix kubernetes-cli@1.22)/bin:$DOTFILES/bin:$PATH" +export PATH="$(/opt/homebrew/bin/brew --prefix kubernetes-cli@1.22)/bin:$DOTFILES/bin:$PATH" From 140906edd55afc79ef28e480889b5efdc0e457f8 Mon Sep 17 00:00:00 2001 From: appkr Date: Thu, 2 Mar 2023 09:08:45 +0900 Subject: [PATCH 12/17] added architecture in brew install statement --- bootstrap.sh | 143 +++++++++++++++++++++++++-------------------------- path.sh | 4 +- 2 files changed, 72 insertions(+), 75 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 3b5dea9..b0d0fec 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -27,79 +27,76 @@ 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 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 -#not working in m1 -#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 --cask -brew install docker-credential-helper -brew install firefox -brew install google-chrome -brew install intellij-idea -brew install iterm2 -brew install jmc -brew install postman -brew install obs -brew install slack -brew install sublime-text -brew install visual-studio-code -brew install visualvm -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 + +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/path.sh b/path.sh index e78cf24..4552c65 100644 --- a/path.sh +++ b/path.sh @@ -61,7 +61,7 @@ PATH="/opt/homebrew/opt/mysql-client/bin:$PATH" # Load Kubernetes #------------------------------------------------------------------------------- -PATH="$(brew --prefix kubernetes-cli@1.22)/bin:$PATH" +PATH="$(/opt/homebrew/bin/brew --prefix kubernetes-cli@1.22)/bin:$PATH" -export PATH="$(brew --prefix kubernetes-cli@1.22)/bin:$DOTFILES/bin:$PATH" +export PATH="$(/opt/homebrew/bin/brew --prefix kubernetes-cli@1.22)/bin:$DOTFILES/bin:$PATH" From 5527f319424bf6d4ee505bb73cf5297d9282511a Mon Sep 17 00:00:00 2001 From: appkr Date: Tue, 28 Mar 2023 19:11:48 +0900 Subject: [PATCH 13/17] change clang reference: mac default -> homebrew --- path.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/path.sh b/path.sh index 4552c65..153de86 100644 --- a/path.sh +++ b/path.sh @@ -63,5 +63,15 @@ PATH="/opt/homebrew/opt/mysql-client/bin:$PATH" PATH="$(/opt/homebrew/bin/brew --prefix kubernetes-cli@1.22)/bin:$PATH" -export PATH="$(/opt/homebrew/bin/brew --prefix kubernetes-cli@1.22)/bin:$DOTFILES/bin:$PATH" +#------------------------------------------------------------------------------- +# CLang +#------------------------------------------------------------------------------- + +PATH="$(/opt/homebrew/bin/brew --prefix llvm)/bin:$PATH" + +#------------------------------------------------------------------------------- +# Return +#------------------------------------------------------------------------------- + +export PATH="$DOTFILES/bin:$PATH" From 0c25ed6cf5a72cc87d674478896bd90e528bc8b3 Mon Sep 17 00:00:00 2001 From: appkr Date: Mon, 15 May 2023 07:40:51 +0900 Subject: [PATCH 14/17] golang toolchain --- export.sh | 1 + path.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/export.sh b/export.sh index 15f18bd..60129b7 100644 --- a/export.sh +++ b/export.sh @@ -17,4 +17,5 @@ export EDITOR=vim # export MONO_GAC_PREFIX="/usr/local" +export GOROOT=$(/opt/homebrew/bin/brew --prefix go) export GOPATH=$HOME/go diff --git a/path.sh b/path.sh index 153de86..ca20543 100644 --- a/path.sh +++ b/path.sh @@ -69,6 +69,12 @@ PATH="$(/opt/homebrew/bin/brew --prefix kubernetes-cli@1.22)/bin:$PATH" PATH="$(/opt/homebrew/bin/brew --prefix llvm)/bin:$PATH" +#------------------------------------------------------------------------------- +# Golang +#------------------------------------------------------------------------------- + +PATH="$(/opt/homebrew/bin/brew --prefix go)/bin:$PATH" + #------------------------------------------------------------------------------- # Return #------------------------------------------------------------------------------- From 0bfe13986d275fcce0a12303aa89c5c417c1c098 Mon Sep 17 00:00:00 2001 From: appkr Date: Mon, 24 Jul 2023 11:28:27 +0900 Subject: [PATCH 15/17] added rlwrap --- bootstrap.sh | 2 ++ functions.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index df85cd5..9159f69 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -60,6 +60,8 @@ 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 diff --git a/functions.sh b/functions.sh index 740c58c..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 - } From 313324bc49a1c90b3c075fb55f41c3f90c575fd5 Mon Sep 17 00:00:00 2001 From: appkr Date: Fri, 28 Jul 2023 14:53:17 +0900 Subject: [PATCH 16/17] fix path --- path.sh | 46 ++++------------------------------------------ 1 file changed, 4 insertions(+), 42 deletions(-) diff --git a/path.sh b/path.sh index ca20543..9c7d961 100644 --- a/path.sh +++ b/path.sh @@ -1,8 +1,4 @@ -#------------------------------------------------------------------------------- -# Java version -#------------------------------------------------------------------------------- - -PATH="$HOME/.jenv/bin:$PATH" +PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" #------------------------------------------------------------------------------- # Use project specific binaries before global ones @@ -17,20 +13,11 @@ 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="$(/opt/homebrew/bin/brew --prefix php)/bin:$PATH" - -PATH="$(/opt/homebrew/bin/brew --prefix ruby)/bin:$PATH" mkdir -p $HOME/gems export GEM_HOME=$HOME/gems export GEM_PATH=$HOME/gems -PATH=$GEM_HOME/bin:$PATH + +PATH="$(/opt/homebrew/bin/brew --prefix php)/bin:$(/opt/homebrew/bin/brew --prefix ruby)/bin:$GEM_HOME/bin:$PATH" #------------------------------------------------------------------------------- # Make sure coreutils are loaded before system commands @@ -42,26 +29,7 @@ PATH="$(/opt/homebrew/bin/brew --prefix coreutils)/libexec/gnubin:$PATH" # Go #------------------------------------------------------------------------------- -PATH=$GOPATH:$PATH - -#------------------------------------------------------------------------------- -# Load custom commands -#------------------------------------------------------------------------------- - -PATH="/usr/local/opt/icu4c/bin:$PATH" -PATH="/usr/local/opt/icu4c/sbin:$PATH" - -#------------------------------------------------------------------------------- -# Load mysql-client -#------------------------------------------------------------------------------- - -PATH="/opt/homebrew/opt/mysql-client/bin:$PATH" - -#------------------------------------------------------------------------------- -# Load Kubernetes -#------------------------------------------------------------------------------- - -PATH="$(/opt/homebrew/bin/brew --prefix kubernetes-cli@1.22)/bin:$PATH" +PATH="$(/opt/homebrew/bin/brew --prefix go)/bin:$GOPATH:$PATH" #------------------------------------------------------------------------------- # CLang @@ -69,12 +37,6 @@ PATH="$(/opt/homebrew/bin/brew --prefix kubernetes-cli@1.22)/bin:$PATH" PATH="$(/opt/homebrew/bin/brew --prefix llvm)/bin:$PATH" -#------------------------------------------------------------------------------- -# Golang -#------------------------------------------------------------------------------- - -PATH="$(/opt/homebrew/bin/brew --prefix go)/bin:$PATH" - #------------------------------------------------------------------------------- # Return #------------------------------------------------------------------------------- From 20bf678f75c5c7d422ed395e5e93b8e7aed952ab Mon Sep 17 00:00:00 2001 From: appkr Date: Mon, 31 Jul 2023 07:40:47 +0900 Subject: [PATCH 17/17] node@18 path --- path.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/path.sh b/path.sh index 9c7d961..7011b31 100644 --- a/path.sh +++ b/path.sh @@ -4,7 +4,7 @@ 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" #-------------------------------------------------------------------------------