Skip to content

Instantly share code, notes, and snippets.

@Jian-Min-Huang
Last active April 20, 2024 07:56
Show Gist options
  • Save Jian-Min-Huang/5570e55417a23bf3eded09fda5953227 to your computer and use it in GitHub Desktop.
Save Jian-Min-Huang/5570e55417a23bf3eded09fda5953227 to your computer and use it in GitHub Desktop.
Company Mac

GitHub, Desktop, Downloads

install Homebrew

brew analytics off

brew install cask first part

brew update
brew tap homebrew/cask-fonts
brew install --cask google-chrome iterm2 1password 1password-cli font-fira-code
brew cleanup

brew install first part

brew install git

install Zim

vi ~/.zimrc
zmodule romkatv/powerlevel10k

# this plugin adds the ctrl-o keyboard shortcut to copy the current text in the command line to the system clipboard
zmodule ohmyzsh/ohmyzsh -f 'plugins/copybuffer' -s 'plugins/copybuffer/copybuffer.plugin.zsh'
# common alias alias
zmodule ohmyzsh/ohmyzsh -f 'plugins/common-aliases' -s 'plugins/common-aliases/common-aliases.plugin.zsh'
# copies the path of given directory or file to the system clipboard
zmodule ohmyzsh/ohmyzsh -f 'plugins/copypath' -s 'plugins/copypath/copypath.plugin.zsh'
# dependency of copypath
zmodule ohmyzsh/ohmyzsh -f 'lib' -s 'lib/clipboard.zsh'
# docker-compose alias
zmodule ohmyzsh/ohmyzsh -f 'plugins/docker-compose' -s 'plugins/docker-compose/docker-compose.plugin.zsh'
# git alias
zmodule ohmyzsh/ohmyzsh -f 'plugins/git' -s 'plugins/git/git.plugin.zsh'
# this plugin adds completion for Git, using the zsh completion from git.git folks, which is much faster than the official one from zsh
zmodule ohmyzsh/ohmyzsh -f 'plugins/gitfast' -s 'plugins/gitfast/gitfast.plugin.zsh'
# kubectl alias
#zmodule ohmyzsh/ohmyzsh -f 'plugins/kubectl' -s 'plugins/kubectl/kubectl.plugin.zsh'
# easily prefix your current or previous commands with sudo by pressing esc twice
zmodule ohmyzsh/ohmyzsh -f 'plugins/sudo' -s 'plugins/sudo/sudo.plugin.zsh'
# command line vi mode
zmodule ohmyzsh/ohmyzsh -f 'plugins/vi-mode' -s 'plugins/vi-mode/vi-mode.plugin.zsh'
# this plugin defines the z command that tracks your most visited directories and allows you to access them with very few keystrokes
zmodule ohmyzsh/ohmyzsh -f 'plugins/z' -s 'plugins/z/z.plugin.zsh'

setup iTerm2

setup .ssh

mkdir .ssh

(optional) create new ssh key

ssh-keygen -t rsa -b 4096
pbcopy < ~/.ssh/id_rsa
  • create new vault to 1password

setup .ssh config

vi ~/.zshrc
export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock
mkdir -p ~/.1password && ln -s ~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock ~/.1password/agent.sock
vi ~/.ssh/config
Host *
    ServerAliveInterval 60
    IdentityAgent ~/.1password/agent.sock

# Jian-Min-Huang GitHub
Host jianminhuang
    HostName github.com
    User git
    IdentityFile ~/.ssh/jianminhuang.pub
    IdentitiesOnly yes

# OpenNet GitHub
Host opennet
    HostName github.com
    User git
    IdentityFile ~/.ssh/opennet.pub
    IdentitiesOnly yes
  • export jianminhuang.pub & opennet.pub from 1password
  • open 1password Developer SSH Agent
chmod 400 ~/.ssh/jianminhuang.pub
chmod 400 ~/.ssh/opennet.pub

setup vim

cd ~ && git clone jianminhuang:Jian-Min-Huang/.vim.git
cd ~ && ln -s ~/.vim/.vimrc .
cd ~ && ln -s ~/.vim/.ideavimrc .
vi ~/.vimrc
:PlugInstall

brew install cask second part

brew update
brew install --cask slack dropbox sourcetree postman alfred orbstack jetbrains-toolbox tunnelblick
brew cleanup

Setapp

  • ...

SDKMAN!

Jetbrains Toolbox

  • defaults write -g ApplePressAndHoldEnabled -bool false (press yes)
@Jian-Min-Huang
Copy link
Author

Ventura:

sudo /Applications/Install\ macOS\ Ventura.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

Monterey:

sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment