Skip to content

Instantly share code, notes, and snippets.

@mshavliuk
Last active November 17, 2019 21:56
Show Gist options
  • Select an option

  • Save mshavliuk/c8814e4d76fb7b4cb5878bfa5d5c8e45 to your computer and use it in GitHub Desktop.

Select an option

Save mshavliuk/c8814e4d76fb7b4cb5878bfa5d5c8e45 to your computer and use it in GitHub Desktop.

Revisions

  1. mshavliuk revised this gist Nov 17, 2019. 1 changed file with 19 additions and 2 deletions.
    21 changes: 19 additions & 2 deletions startup.sh
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,18 @@ fi
    brew update
    brew upgrade

    >> ~/.bash_profile
    sh=$(ps -p $(ps -p $$ -o ppid=) -o comm=)

    if [[ $sh == *'zsh' ]]
    then
    >> ~/.zprofile
    elif [[ $sh == *'bash' ]]
    then
    >> ~/.bash_profile
    else
    echo 'Your shell is not supported by this script'
    exit
    fi

    echo "Install runtime dependencies..."

    @@ -41,8 +52,14 @@ brew install tophat/bar/yvm
    node "/usr/local/opt/yvm/yvm.js" configure-shell --yvmDir "/usr/local/opt/yvm"
    # https://direnv.net/ - environment variables tool
    brew install direnv
    echo 'eval "$(direnv hook bash)"' >> ~/.bash_profile

    if [[ $sh == *'zsh' ]]
    then
    echo 'eval "$(direnv hook zsh)"' >> ~/.zprofile
    elif [[ $sh == *'bash' ]]
    then
    echo 'eval "$(direnv hook bash)"' >> ~/.bash_profile
    fi

    # https://pypi.org/project/pip/ - package installer for Python
    sudo easy_install pip
  2. mshavliuk revised this gist Oct 8, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions startup.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    #!/usr/bin/env bash

    # you can run this script with -y option to install all optional packages automatically
    while getopts ":y" opt; do
    case $opt in
    y)
  3. mshavliuk revised this gist Oct 7, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions startup.sh
    Original file line number Diff line number Diff line change
    @@ -37,6 +37,7 @@ brew install postgresql@11
    brew install Schniz/tap/fnm
    # https://yvm.js.org/docs/overview - yarn version manager
    brew install tophat/bar/yvm
    node "/usr/local/opt/yvm/yvm.js" configure-shell --yvmDir "/usr/local/opt/yvm"
    # https://direnv.net/ - environment variables tool
    brew install direnv
    echo 'eval "$(direnv hook bash)"' >> ~/.bash_profile
  4. mshavliuk revised this gist Oct 7, 2019. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions startup.sh
    Original file line number Diff line number Diff line change
    @@ -27,8 +27,6 @@ echo "Install runtime dependencies..."

    # https://www.python.org/ - backend runtime
    brew install python
    # https://yarnpkg.com/ - node package manager
    brew install yarn
    # https://git-scm.com/ - version control system
    brew install git
    # https://redis.io/ - in memory db
  5. mshavliuk revised this gist Oct 7, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions startup.sh
    Original file line number Diff line number Diff line change
    @@ -37,6 +37,8 @@ brew install redis@5.0
    brew install postgresql@11
    # https://github.com/Schniz/fnm - is a node version manager
    brew install Schniz/tap/fnm
    # https://yvm.js.org/docs/overview - yarn version manager
    brew install tophat/bar/yvm
    # https://direnv.net/ - environment variables tool
    brew install direnv
    echo 'eval "$(direnv hook bash)"' >> ~/.bash_profile
  6. mshavliuk revised this gist Oct 7, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions startup.sh
    Original file line number Diff line number Diff line change
    @@ -59,6 +59,7 @@ function ask_and_install {
    fi

    read -p "do you want to install $1? [yY] " -n 1 -r
    echo ''
    if [[ $REPLY =~ ^[Yy]$ ]]
    then
    echo -e "\n$COMMAND"
  7. mshavliuk revised this gist Oct 7, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion startup.sh
    Original file line number Diff line number Diff line change
    @@ -32,7 +32,7 @@ brew install yarn
    # https://git-scm.com/ - version control system
    brew install git
    # https://redis.io/ - in memory db
    brew install redis@5
    brew install redis@5.0
    # https://www.postgresql.org/ - database
    brew install postgresql@11
    # https://github.com/Schniz/fnm - is a node version manager
  8. mshavliuk revised this gist Oct 7, 2019. 1 changed file with 39 additions and 7 deletions.
    46 changes: 39 additions & 7 deletions startup.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,18 @@
    #!/usr/bin/env bash

    while getopts ":y" opt; do
    case $opt in
    y)
    echo "-y was triggered, will install all optional packages"
    YES=true
    ;;
    \?)
    echo "Invalid option: -$OPTARG" >&2
    exit 1
    ;;
    esac
    done

    if ! [ -x "$(command -v brew)" ]; then
    echo "brew not found. Install brew..."
    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    @@ -35,20 +48,39 @@ sudo easy_install pip
    echo "Install runtime dependencies completed!"
    echo "Install programs..."

    function ask_and_install {
    COMMAND="brew cask install $1"

    if [[ $YES ]]
    then
    echo -e "\n$COMMAND"
    $COMMAND
    return 0
    fi

    read -p "do you want to install $1? [yY] " -n 1 -r
    if [[ $REPLY =~ ^[Yy]$ ]]
    then
    echo -e "\n$COMMAND"
    $COMMAND
    return 0
    fi
    }

    # https://www.jetbrains.com/pycharm/ - fullstack IDE
    brew cask install pycharm
    ask_and_install pycharm
    # https://www.jetbrains.com/webstorm/ - frontend IDE
    brew cask install webstorm
    ask_and_install webstorm
    # https://www.sublimetext.com/ - lightweight IDE
    brew cask install sublime-text
    ask_and_install sublime-text
    # https://code.visualstudio.com/ - frontend IDE
    brew cask install visual-studio-code
    ask_and_install visual-studio-code
    # https://1password.com/ - password manager
    brew cask install 1password
    ask_and_install 1password
    # https://telegram.org/ - messenger
    brew cask install telegram
    ask_and_install telegram
    # https://www.google.com/chrome/ - web browser
    brew cask install google-chrome
    ask_and_install google-chrome

    echo "Install programs completed!"

  9. mshavliuk revised this gist Sep 24, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions startup.sh
    Original file line number Diff line number Diff line change
    @@ -26,6 +26,8 @@ brew install postgresql@11
    brew install Schniz/tap/fnm
    # https://direnv.net/ - environment variables tool
    brew install direnv
    echo 'eval "$(direnv hook bash)"' >> ~/.bash_profile


    # https://pypi.org/project/pip/ - package installer for Python
    sudo easy_install pip
  10. mshavliuk revised this gist Sep 24, 2019. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions startup.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,10 @@
    #!/usr/bin/env bash

    if ! [ -x "$(command -v brew)" ]; then
    echo "brew not found. Install brew..."
    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    fi

    brew update
    brew upgrade

  11. mshavliuk revised this gist Sep 24, 2019. 1 changed file with 29 additions and 31 deletions.
    60 changes: 29 additions & 31 deletions startup.sh
    Original file line number Diff line number Diff line change
    @@ -1,49 +1,47 @@
    #!/usr/bin/env bash

    brew update
    brew upgrade --all
    brew upgrade

    >> ~/.bash_profile

    echo "Install runtime dependencies..."

    brew install \
    # https://www.python.org/ - backend runtime
    python \
    # https://yarnpkg.com/ - node package manager
    yarn \
    # https://git-scm.com/ - version control system
    git \
    # https://redis.io/ - in memory db
    redis@5 \
    # https://www.postgresql.org/ - database
    postgresql@11 \
    # https://github.com/Schniz/fnm - is a node version manager
    Schniz/tap/fnm \
    # https://direnv.net/ - environment variables tool
    direnv
    # https://www.python.org/ - backend runtime
    brew install python
    # https://yarnpkg.com/ - node package manager
    brew install yarn
    # https://git-scm.com/ - version control system
    brew install git
    # https://redis.io/ - in memory db
    brew install redis@5
    # https://www.postgresql.org/ - database
    brew install postgresql@11
    # https://github.com/Schniz/fnm - is a node version manager
    brew install Schniz/tap/fnm
    # https://direnv.net/ - environment variables tool
    brew install direnv

    # https://pypi.org/project/pip/ - package installer for Python
    sudo easy_install pip

    echo "Install runtime dependencies completed!"
    echo "Install programs..."

    brew cask install \
    # https://www.jetbrains.com/pycharm/ - fullstack IDE
    pycharm \
    # https://www.jetbrains.com/webstorm/ - frontend IDE
    webstorm \
    # https://www.sublimetext.com/ - lightweight IDE
    sublime-text \
    # https://code.visualstudio.com/ - frontend IDE
    visual-studio-code \
    # https://1password.com/ - password manager
    1password \
    # https://telegram.org/ - messenger
    telegram \
    # https://www.google.com/chrome/ - web browser
    google-chrome
    # https://www.jetbrains.com/pycharm/ - fullstack IDE
    brew cask install pycharm
    # https://www.jetbrains.com/webstorm/ - frontend IDE
    brew cask install webstorm
    # https://www.sublimetext.com/ - lightweight IDE
    brew cask install sublime-text
    # https://code.visualstudio.com/ - frontend IDE
    brew cask install visual-studio-code
    # https://1password.com/ - password manager
    brew cask install 1password
    # https://telegram.org/ - messenger
    brew cask install telegram
    # https://www.google.com/chrome/ - web browser
    brew cask install google-chrome

    echo "Install programs completed!"

  12. mshavliuk created this gist Sep 24, 2019.
    50 changes: 50 additions & 0 deletions startup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,50 @@
    #!/usr/bin/env bash

    brew update
    brew upgrade --all

    >> ~/.bash_profile

    echo "Install runtime dependencies..."

    brew install \
    # https://www.python.org/ - backend runtime
    python \
    # https://yarnpkg.com/ - node package manager
    yarn \
    # https://git-scm.com/ - version control system
    git \
    # https://redis.io/ - in memory db
    redis@5 \
    # https://www.postgresql.org/ - database
    postgresql@11 \
    # https://github.com/Schniz/fnm - is a node version manager
    Schniz/tap/fnm \
    # https://direnv.net/ - environment variables tool
    direnv

    # https://pypi.org/project/pip/ - package installer for Python
    sudo easy_install pip

    echo "Install runtime dependencies completed!"
    echo "Install programs..."

    brew cask install \
    # https://www.jetbrains.com/pycharm/ - fullstack IDE
    pycharm \
    # https://www.jetbrains.com/webstorm/ - frontend IDE
    webstorm \
    # https://www.sublimetext.com/ - lightweight IDE
    sublime-text \
    # https://code.visualstudio.com/ - frontend IDE
    visual-studio-code \
    # https://1password.com/ - password manager
    1password \
    # https://telegram.org/ - messenger
    telegram \
    # https://www.google.com/chrome/ - web browser
    google-chrome

    echo "Install programs completed!"

    brew cleanup