Skip to content

braintelligencePL/mac-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’».macOS().ubuntu().build()

That's what I use on daily basis. I used that configuration also on Ubuntu. Enjoy!


πŸ€” Who's this setup is for?

For anyone who uses terminal, does backend with JVM languages (Java, Kotlin, Scala). Does some Machine Learning/Deep Learning stuff. Occasionally some frontend with Angular, VueJS, ReactJS...


🎲 Few essencial applications for productivity and convenience


πŸš› Chrome Plugins

  • Ad-Block - well... you know.
  • Stylus - to change CSS style of any website that you want. (I don't even remember how white-github looks like)
  • Google Translate - if you're not English speaker (very helpfull)
  • Postman Interceptor - proxy to capture HTTP or HTTPS requests.
  • OneTab - convert with one-click all of your tabs into a list.
  • Toby - best tab manager that I used. Searching through the stuff is very powerful and convinient.
  • WhatFont - fast way of knowing what font are you looking at.
  • VueJs - for VueJS developers.
  • Augury - for Angular developers
  • Bitbucket Server Extension - adder for configured bitbucket reviewers.
  • EmojiOne - πŸ€“πŸ˜ŽπŸ€£

πŸ›  Terminal tools

  • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - https://brew.sh/
  • brew install npm - npm
  • npm install --global fkill-cli - kill processes with fkill :8080 or launch the interactive UI fkill.
  • npm install --global alfred-fkill - kill with alfred.
  • brew install tree - linux tree
  • brew install exa - modern replacement for ls, tree
  • brew install httpie - better curl http POST :8010/products field1=asdf field2=1234
  • brew tap moncho/dry && brew install dry - Dry is terminal GUI for managing Docker and Docker Swarm.
  • brew install kotlin - for kotlinc compiler.
  • brew tap caskroom/cask & brew cask install google-cloud-sdk - gcloud CLI
  • brew install fzf Command-Line Fuzzy Finder - better search CTRL + R with autosugestions and more!
  • git open . - to open git repository in a browser.
  • git-friendly - better git workflow. Just type pull, push, branch...
  • brew install tldr - better man. Quick descriptions for popular commands.
  • brew install lazygit - yet another tool for managing git.
  • curl -s "https://get.sdkman.io" | bash - sdkman CLI tool which helps you easily manage SDK kits.

πŸ”Œ IntelliJ IDEA - plugins

  • Markdown, Kotlin, Scala, Docker - self-explanatory
  • Maven Helper - few shortcuts for running maven. Right-click and run maven
  • Rainbow Brackets - colorful bracets
  • Gradianto (Theme: Gradianto Deep Ocean) - much better syntax highlighting.
  • Material UI - used for some time, but not anymore. Good for frontend stuff in my opinion.
  • Lombok - for java boilerplate.
  • Extra Icons - few more icons.
  • SonarLint - static analysis.
  • TestMe - auto generate unit tests in Java, Groovy or Scala.
  • Presentation Assistant - show shortcuts that you invoked.
  • Grep Console - Grep, tail, filter, highlight... everything you need for a console.

πŸ›  Macbook Apps

  • Magnet - workspace/window organizer
  • Dropover - drag/drop files in finder (shake it!)
  • CopyClip 2 - clipboard manager
  • Intellij Toolbox - for managing jetbrains IDE
  • Docker desctop - docker
  • f.lux - eyes
  • https://github.com/lensapp/lens lens kubernetes

πŸ›  Macbook Setup - Essentials

Current setup for terminal looks like that:


βš™ brew - package manager

  • /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • https://brew.sh/

βš™ iterm2 - much better terminal

Setup:

  1. Natural Text Editing

βš™ zsh shell for terminal

  • brew install zsh

βš™ oh-my-zsh - for managing zsh

  • sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  • https://ohmyz.sh/

βš™ PowerLevel9k for terminal customization (or newer PowerLevel10k)

βš™ Nerd font - my favourite font

nerd-fonts/hack/regular/complete

βš™ plugins for zsh:

  • 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/plugins/zsh-autosuggestions

βš™ Few upgrades to common commands:

Better docker

https://github.com/moncho/dry and tutorial about that

βš™ Better curl (httpie)

  • brew install httpie

βš™ Better bat πŸ¦‡ than cat 😾

  • brew install bat

βš™ Better ls (exa)

  • brew install exa

Put configuration in ~/.zshrc file. Open with nano ~/.zshrc or vim ~/.zshrc.

export PATH=$HOME/bin:/usr/local/bin:$PATH
export ZSH="/Users/$USERNAME/.oh-my-zsh"

# ZSH_THEME="powerlevel9k/powerlevel9k"
ZSH_THEME="powerlevel10k/powerlevel10k"

POWERLEVEL9K_MODE="nerdfont-complete"
POWERLEVEL9K_DISABLE_RPROMPT=true
POWERLEVEL9K_PROMPT_ON_NEWLINE=true

POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%F{014}\u2570%F{cyan}\uF460%F{073}\uF460%F{109}\uF460%f "

POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
POWERLEVEL9K_SHORTEN_DELIMITER=""
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_from_right"

POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon dir vcs public_ip)


plugins=(
  git
  zsh-syntax-highlighting
  zsh-autosuggestions
  docker
)

# Jdk 8, 11, 14
alias setJdk8='export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)'
alias setJdk11='export JAVA_HOME=$(/usr/libexec/java_home -v 11)'
alias setJdk14='export JAVA_HOME=$(/usr/libexec/java_home -v 14)'

# exa (better ls)
alias e='exa -all'
alias ee='exa --long --header -lgh'

# create cat from bat
alias cat='bat'

# better ls - exa
alias l1='exa --tree --level=1'
alias l2='exa --tree --level=2'
alias l3='exa --tree --level=3'
alias l4='exa --tree --level=4'
alias l5='exa --tree --level=5'
alias lx='exa -T'

alias clsdocker='docker stop $(docker ps -a -q) && docker rmi -f $(docker images -a -q) && docker rm -vf $(docker ps -a -q)'
alias w='~/all/repos/'

gch() {
  git checkout $(git branch --all | fzf)
}

source /etc/zprofile

πŸ›  Macbook Setup - most needed tools

βš™ JDK

  1. brew update
  2. brew tap caskroom/versions
  3. brew cask install java
  4. java -version - to see what version of JDK you installed.
  5. export JAVA_HOME="`/usr/libexec/java_home -v 1.8`" or -v 11 depends on version you installed or use.
  6. If you need install Java8 brew tap caskroom/versions and brew cask install java8
  7. In .zshrc file you have aliases to switch between versions easily (just write setJdk8 in terminal). (TIP re-load zsh typing zsh in your terminal or source $ZSH/oh-my-zsh.sh)

βš™ IntelliJ Idea - Setup

[x] Enable Annotation Processing - set it as default (not only for specific project).
[x] Create directories for empty content roots automatically - depends if you want this to be automatic.
[x] Font to Fira Code, and enabling font ligatures

  1. Install Lombok and Kotlin plugin.
  2. Install Spock Framework Enchancements plugin - Spock live-templates. Example use: spgwt
  3. Install iterm-plugin. Opens iterm from project path.
  4. Create launcher script to open IDE from terminal. Menu: Tools -> CreateCommandLineLauncher
    From terminal: idea . inside of project. idea /project or just choose project to open.

βš™ Git

  1. brew install git
  2. git config --global user.name "your_name"
  3. git config --global user.email "your_email@youremail.com"

Frontend (Angular, Node)

Visual Studio Code - plugins to install

  • Save Typing
  • IDE JetBrains Keymap
  • Atom One Dark
  • Auto Rename Tag
  • Auto Close Tag
  • Paste and indent
  • Bracket Pair Colorizer
  • Trailing spaces

Update npm:

  • npm install -g npm

Update AngularCLI:

  • npm uninstall -g angular-cli @angular/cli
  • npm cache clean npm cache verify
  • npm install -g @angular/cli

Sample Angular project:

  • ng new first-frontend-app - create project
  • yarn start - start project

Install Node:

  • brew install node
  • npm update
  • npm install -g node-gyp

Can't build or run the project? Try these:

  • TIP-1: ng update --all - but be careful with that (good for new projects)

About

πŸ’» All you need as a Software Engineer (my daily setup).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published