Skip to content

Instantly share code, notes, and snippets.

@AlmogBaku
Last active August 14, 2025 15:14
Show Gist options
  • Select an option

  • Save AlmogBaku/97e8514a93350340bfff384f9910b690 to your computer and use it in GitHub Desktop.

Select an option

Save AlmogBaku/97e8514a93350340bfff384f9910b690 to your computer and use it in GitHub Desktop.
Setup New environment

Installations required on a new environment

  1. Install Bitwarden from App Store
  2. Install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Install Xcode Command Line Tools

    1.  xcode-select --install
    2. Then, accept the license terms, and install necassary dependencies
      sudo xcodebuild -license accept
      brew install openssl readline sqlite3 xz zlib tcl-tk
  2. Setup your console:

    1. Install zsh and fonts
      brew install zsh antidote
      brew tap homebrew/cask-fonts
      brew install --cask font-fira-code
      chsh -s /bin/zsh
    2. Change your terminal font to Fira Code
    3. Setup your ~/.zshrc
      # Go
      export GOPATH=$HOME/go
      export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
      
      # Poetry
      export PATH="$HOME/.local/bin:$PATH"
      
      # Antidote
      source /opt/homebrew/opt/antidote/share/antidote/antidote.zsh
      antidote load
      
      # Pinentry
      alias pinentry='pinentry-mac'
      
      # PGP
      export GPG_TTY=$(tty)
      
      # JDK
      export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
      
      [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
      
      if [[ $TERM_PROGRAM == "WarpTerminal" ]]; then
        SPACESHIP_PROMPT_ASYNC=FALSE
      fi
      export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH"
      PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"
      
      # LUAROCKS
      eval "$(luarocks path --bin)"
      
      # bun completions
      [ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
      
      # bun
      export BUN_INSTALL="$HOME/.bun"
      export PATH="$BUN_INSTALL/bin:$PATH"
      
      # CARGO
      export PATH="$HOME/.cargo/bin:$PATH"
      
      export PATH="/opt/homebrew/opt/libpq/bin:$PATH"
      export AWS_PAGER=""
      export ANTHROPIC_MODEL="eu.anthropic.claude-sonnet-4-20250514-v1:0"
      export ANTHROPIC_SMALL_FAST_MODEL="eu.anthropic.claude-3-haiku-20240307-v1:0"
      export CLAUDE_CODE_USE_BEDROCK=1
      export AWS_REGION="eu-central-1"
      
      alias claude="$HOME/.claude/local/claude"
      
      export SPACESHIP_PROMPT_ORDER=(${=SPACESHIP_PROMPT_ORDER}) # ensure prompt_order is an array
    4. Install Fzf
      brew install fzf
      /opt/homebrew/opt/fzf/install
      
    5. Configure zsh plugins in ~/.zsh_plugins.txt - see attached file
    6. start a new console to see the changes
  3. Install the following

brew install --cask arc
brew install nano yq poetry uv
curl https://sh.rustup.rs -sSf | sh -s -- -y
sudo ln -s /opt/homebrew/bin/nano /usr/local/bin/pico

brew install zsh go aws-iam-authenticator awscli gnupg golangci-lint helm kind kubernetes-cli node corepack \
java tree virtualenv pre-commit protobuf bufbuild/buf/buf luarocks kubectx sops nvm
brew link corepack
corepack enable
corepack prepare yarn@stable --activate

mkdir $ZSH/completions/
kind completion zsh > $ZSH/completions/_kind
poetry completions zsh > $ZSH/completions/_poetry
uv generate-shell-completion zsh > $ZSH/completions/_uv

brew tap hashicorp/tap
brew install hashicorp/tap/vault

brew tap weaveworks/tap
brew install weaveworks/tap/eksctl

brew install boz/repo/kail
brew install --cask docker zoom slack medis google-cloud-sdk
  1. Create SSH Key
  2. Create GPG Signature
    1. Don't forget git config --global commit.gpgSign true !
  3. Install JetBrains Toolbox
    brew install --cask jetbrains-toolbox
  4. Install pinentry for gpg
brew tap jorgelbg/tap
brew install pinentry-mac pinentry-touchid
pinentry-touchid -fix
#reboot
#!/usr/bin/env zsh
# $ZSH_CUSTOM/plugins/bedrock-claude/bedrock-claude.plugin.zsh
bedrock-claude() {
local options=("Enable" "Disable")
local selected=0
while true; do
printf "\033[2J\033[H"
echo "Bedrock + Claude Code integration:"
for i in {0..1}; do
if [[ $i -eq $selected ]]; then
echo "→ ${options[$((i+1))]}"
else
echo " ${options[$((i+1))]}"
fi
done
read -k key
if [[ $key == $'\033' ]]; then
read -k key
if [[ $key == '[' ]]; then
read -k key
case $key in
'A') selected=$((selected > 0 ? selected - 1 : 1)) ;; # Up arrow
'B') selected=$((selected < 1 ? selected + 1 : 0)) ;; # Down arrow
esac
fi
elif [[ $key == $'\n' ]]; then
break
elif [[ $key == 'q' ]]; then
echo
return 0
fi
done
echo
case $selected in
0) export CLAUDE_CODE_USE_BEDROCK=1 ;;
1) unset CLAUDE_CODE_USE_BEDROCK ;;
esac
}
# Antidote + OMZ: ~/.zsh_plugins.txt
getantidote/use-omz
ohmyzsh/ohmyzsh path:lib
# OMZ plugins
ohmyzsh/ohmyzsh path:plugins/git
ohmyzsh/ohmyzsh path:plugins/colorize
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/macos
ohmyzsh/ohmyzsh path:plugins/golang
ohmyzsh/ohmyzsh path:plugins/virtualenv
ohmyzsh/ohmyzsh path:plugins/command-not-found
ohmyzsh/ohmyzsh path:plugins/docker
ohmyzsh/ohmyzsh path:plugins/common-aliases
ohmyzsh/ohmyzsh path:plugins/docker-compose
ohmyzsh/ohmyzsh path:plugins/helm
ohmyzsh/ohmyzsh path:plugins/kubectl
ohmyzsh/ohmyzsh path:plugins/mvn
ohmyzsh/ohmyzsh path:plugins/ssh-agent
ohmyzsh/ohmyzsh path:plugins/terraform
ohmyzsh/ohmyzsh path:plugins/pip
ohmyzsh/ohmyzsh path:plugins/compleat
ohmyzsh/ohmyzsh path:plugins/git-extras
ohmyzsh/ohmyzsh path:plugins/git-flow
ohmyzsh/ohmyzsh path:plugins/npm
ohmyzsh/ohmyzsh path:plugins/web-search
ohmyzsh/ohmyzsh path:plugins/z
ohmyzsh/ohmyzsh path:plugins/fzf
ohmyzsh/ohmyzsh path:plugins/heroku
ohmyzsh/ohmyzsh path:plugins/poetry
# Extra completions
zsh-users/zsh-completions
zsh-users/zsh-autosuggestions
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-history-substring-search
# Custom
AlmogBaku/zsh-awsctx
$ZSH_CUSTOM/plugins/bedrock-claude
# Prompt
spaceship-prompt/spaceship-prompt
  1. install the logi options + and karibiner
brew install --cask logi-options+
brew install --cask karabiner-element
  1. in logi-options+ —> disable "Always keep the keyboard in Mac layout"

  2. hit fn+p long press to switch to Windows layout

  3. Karibiner complex modifiers json for MX Keys:

{
    "description": "Custom Mac Mapping for Logitech MX Keys",
    "manipulators": [
        {
            "conditions": [
                {
                    "identifiers": [
                        {
                            "product_id": 45944,
                            "vendor_id": 1133
                        }
                    ],
                    "type": "device_if"
                }
            ],
            "from": {
                "key_code": "left_command",
                "modifiers": { "optional": ["any"] }
            },
            "to": [{ "key_code": "left_option" }],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "identifiers": [
                        {
                            "product_id": 45944,
                            "vendor_id": 1133
                        }
                    ],
                    "type": "device_if"
                }
            ],
            "from": {
                "key_code": "left_option",
                "modifiers": { "optional": ["any"] }
            },
            "to": [{ "key_code": "left_command" }],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "identifiers": [
                        {
                            "product_id": 45944,
                            "vendor_id": 1133
                        }
                    ],
                    "type": "device_if"
                }
            ],
            "from": {
                "key_code": "right_control",
                "modifiers": { "optional": ["any"] }
            },
            "to": [{ "key_code": "right_option" }],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "identifiers": [
                        {
                            "product_id": 45944,
                            "vendor_id": 1133
                        }
                    ],
                    "type": "device_if"
                }
            ],
            "from": {
                "key_code": "right_option",
                "modifiers": { "optional": ["any"] }
            },
            "to": [{ "key_code": "right_command" }],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "input_sources": [{ "language": "en" }],
                    "type": "input_source_if"
                }
            ],
            "from": {
                "key_code": "insert",
                "modifiers": { "optional": ["any"] }
            },
            "to_if_alone": [{ "select_input_source": { "language": "he" } }],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "input_sources": [{ "language": "he" }],
                    "type": "input_source_if"
                }
            ],
            "from": {
                "key_code": "insert",
                "modifiers": { "optional": ["any"] }
            },
            "to_if_alone": [{ "select_input_source": { "language": "en" } }],
            "type": "basic"
        }
    ]
}
  1. Replace quick sequential double dash (--) with em dash (—)
{
    "description": "Replace quick sequential double dash (--) with em dash (—)",
    "manipulators": [
        {
            "conditions": [
                {
                    "name": "dash-pressed",
                    "type": "variable_if",
                    "value": 1
                }
            ],
            "from": { "key_code": "hyphen" },
            "to": [
                { "key_code": "delete_or_backspace" },
                {
                    "key_code": "hyphen",
                    "modifiers": ["left_shift", "left_alt"]
                }
            ],
            "to_after_key_up": [
                {
                    "set_variable": {
                        "name": "dash-pressed",
                        "value": 0
                    }
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "name": "dash-pressed",
                    "type": "variable_if",
                    "value": 0
                }
            ],
            "from": { "key_code": "hyphen" },
            "to": [{ "key_code": "hyphen" }],
            "to_after_key_up": [
                {
                    "set_variable": {
                        "name": "dash-pressed",
                        "value": 1
                    }
                }
            ],
            "to_delayed_action": {
                "to_if_canceled": [
                    {
                        "set_variable": {
                            "name": "dash-pressed",
                            "value": 0
                        }
                    }
                ],
                "to_if_invoked": [
                    {
                        "set_variable": {
                            "name": "dash-pressed",
                            "value": 0
                        }
                    }
                ]
            },
            "type": "basic"
        }
    ],
    "parameters": { "basic.to_delayed_action_delay_milliseconds": 500 }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment