Skip to content

Instantly share code, notes, and snippets.

@alekc
Created June 15, 2022 13:30
Show Gist options
  • Save alekc/02602f2957d8f3bb2540c3f38d4f07e3 to your computer and use it in GitHub Desktop.
Save alekc/02602f2957d8f3bb2540c3f38d4f07e3 to your computer and use it in GitHub Desktop.
working-dev-setup

Brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/alexander.chernov/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Zsh config

Install Oh My Zash

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Install spaceship theme

git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"

Install additional plugins

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
brew install kube-ps1

Config

Change following values in .zshrc (you can simply place them right before the source $ZSH/oh-my-zsh.sh line)

####
plugins=(
  git
  zsh-autosuggestions
  aws
  docker
  wd
  zsh-syntax-highlighting
)

ZSH_THEME="spaceship"
COMPLETION_WAITING_DOTS="true"
ZSH_THEME="spaceship"

export HOMEBREW_NO_AUTO_UPDATE=1

alias k=kubectl
export PATH="~/bin:$PATH"
#####


Brew Apps

brew install --cask visual-studio-code
brew install --cask termius
brew install --cask cyberduck
helm plugin install https://github.com/hypnoglow/helm-s3.git
brew install --cask lens
brew install --cask rancher
brew install --cask hiddenbar
brew install --cask monitorcontrol
brew install kind wget gnupg pinentry-mac wget awscli terraform helm jq stern kubectx telnet pre-commit golangci-lint velero checkov terraform-docs infracost tfsec tflint terragrunt terrascan

App store

Amphetamine Microsoft TODO

Setup aws config

Disable pagination on aws cli commands

mkdir -p  ~/.aws/
cat > ~/.aws/config <<EOF
[default]
region = eu-west-2
cli_pager=
EOF

Sublime Text

fix keys behaviour (home, end)

Preferences > Key Bindings - User

{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },
{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} },
{ "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true } }

Setup gpg key

Export the key from keybase and import it to gpg keychain

  • Find the id of the key you want to export
  • From terminal run keybase pgp export -q 772FB27A86DAFCE7 --secret | gpg --allow-secret-key-import --import
  • When prompted with the password (and this is really dumb UI), first enter your keybase password, next, CHOOSE a password which will be used to protect the key
  • Verify that the key has been imported with gpg --list-secret-keys

Trust the new key

gpg --edit-key 772FB27A86DAFCE7
gpg>trust
Please decide how far you trust this user to correctly verify other users' keys
(by looking at passports, checking fingerprints from different sources, etc.)

  1 = I don't know or won't say
  2 = I do NOT trust
  3 = I trust marginally
  4 = I trust fully
  5 = I trust ultimately
  m = back to the main menu

Your decision? 5
Do you really want to set this key to ultimate trust? (y/N)

Setup git

Identity

git config --global user.email xxx@ll.it
git config --global user.name "xxx xxx"

Setup Git Gpg signing

git config --global user.signingkey 772FB27A86DAFCE7
git config --global commit.gpgsign true
git config --global gpg.program /usr/local/bin/gpg

Test gpg signing

In an empty folder (/tmp) run

mkdir test
cd test
git init 
touch test.txt
git add test.txt
git commit -m "test signed commits"

It should not give any issues, double check with git log --show-signature

Ssh client config

Create/edit following file: ~/.ssh/config and place following content in it:

Host *
     User root
     Compression yes
     LogLevel INFO
     ForwardAgent yes
     ForwardX11 yes
     StrictHostKeyChecking accept-new

Jetbrains mono font

Download font from https://www.jetbrains.com/lp/mono/ and add it through the font book

Iterm settings

Profiles

Text

Use builtin powerline glyphs Font: Jetbrains Mono, 13

Vim setting

wget https://raw.githubusercontent.com/amix/vimrc/master/vimrcs/basic.vim
mv basic.vim .vimrc

Osx settings

Keyboard

Key Repeat to Fast and Delay Until Repeat to Short

Use F1,F2 as standard function keys

in Settings -> Keyboard -> modifier keys choose karabiner keyboard and assign

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