<commit_before>#!/usr/bin/env bash
# Install brew if not installed
if ! type "brew" > /dev/null 2>&1; then
    brew_prefix='Home'
    brew_dir='/usr/local'
    echo -e "\\033[1;34m--> Installing brew....\\033[0m"
    ruby -e "$(curl -fsSl 'https://raw.githubusercontent.com/'$brew_prefix'brew/install/master/install')"
    export PATH="$brew_dir/bin:$brew_dir/sbin:$PATH"
else
    brew_dir=$(brew --prefix)
fi

# Use latest homebrew and update any already installed formulae
echo -e "\\033[1;34m-->Updating Brew...\\033[0m"
brew update && brew upgrade

# Brew and brew cask install commands
brew_install_cmd='brew install'
brew_cask_install_cmd='brew cask install'

# Fonts
brew tap caskroom/fonts
$brew_cask_install_cmd font-sourcecodepro-nerd-font
# Nerd fonts Source Code Pro version doesn't have italics so we install
# the official version
$brew_cask_install_cmd font-source-code-pro

# Latest bash with completions
$brew_install_cmd bash
$brew_install_cmd bash-completion@2

# Git
$brew_install_cmd git

# Compiler related
$brew_install_cmd gcc
$brew_install_cmd llvm
$brew_install_cmd libomp
$brew_install_cmd openblas
$brew_install_cmd coreutils  # (realpath, ln, etc)

# Languages: Rust, Python3, R, latex, node, java
$brew_install_cmd python3
$brew_install_cmd pipenv
$brew_install_cmd pyenv
$brew_install_cmd rust
if ! type "tlmgr" > /dev/null 2>&1; then
    read -p $'\033[1mDo you want to install LaTeX (y/n)? \033[0m' -n 1 -r
    echo
    if [[ $REPLY =~ ^[Yy]$ ]]; then
        $brew_cask_install_cmd basictex
        # Wait until basictex is installed
        while [ ! -f "/Library/TeX/texbin/tlmgr" ]; do
            sleep 5
        done
        export PATH="/Library/TeX/texbin:$PATH"
    fi
fi
read -p $'\033[1mDo you want to install R (y/n)? \033[0m' -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
    $brew_install_cmd R --with-openblas
fi
read -p $'\033[1mDo you want to install Node.js (y/n)? \033[0m' -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
    $brew_install_cmd node
fi

# Neovim and tmux and more bash
brew tap neovim/neovim
$brew_install_cmd neovim --HEAD
$brew_install_cmd neovim-remote
$brew_install_cmd tmux --HEAD
$brew_install_cmd socat  # for faster powerline
$brew_install_cmd powerline

# Databases
$brew_install_cmd mongodb
$brew_install_cmd mysql
$brew_install_cmd postgresql
$brew_install_cmd protobuf # Required by python's mysql-connector
$brew_install_cmd redis
$brew_install_cmd sqlite3

# Other useful binaries
$brew_install_cmd bat
$brew_install_cmd fd
$brew_install_cmd fzf
$brew_install_cmd gnupg
$brew_install_cmd htop
$brew_install_cmd imgcat
$brew_install_cmd neofetch --HEAD
$brew_install_cmd neomutt --HEAD --with-sidebar-patch --with-notmuch-patch
$brew_install_cmd openconnect --HEAD --with-stoken
$brew_install_cmd openvpn
$brew_install_cmd openssh
$brew_install_cmd pandoc
$brew_install_cmd pandoc-citeproc
$brew_install_cmd pass
$brew_install_cmd pass-update
$brew_install_cmd qrendcode
$brew_install_cmd reattach-to-user-namespace
$brew_install_cmd ripgrep
$brew_install_cmd rlwrap
$brew_install_cmd rsync
$brew_install_cmd shellcheck
$brew_install_cmd shellpass
$brew_install_cmd stoken
$brew_install_cmd tree
$brew_install_cmd universal-ctags/universal-ctags/universal-ctags --HEAD
$brew_install_cmd unrar
$brew_install_cmd unzip
$brew_install_cmd zip
$brew_install_cmd z

# Forgit (fzf and git integration)
if [ ! -f "$HOME/.local/bin/forgit.plugin.sh" ]; then
    sudo mkdir -p ~/.local/bin/
    wget https://raw.githubusercontent.com/wfxr/forgit/master/forgit.plugin.sh -P ~/.local/bin
fi

# Apps<commit_msg>osx: install docker and docker-compose<commit_after>#!/usr/bin/env bash
# Install brew if not installed
if ! type "brew" > /dev/null 2>&1; then
    brew_prefix='Home'
    brew_dir='/usr/local'
    echo -e "\\033[1;34m--> Installing brew....\\033[0m"
    ruby -e "$(curl -fsSl 'https://raw.githubusercontent.com/'$brew_prefix'brew/install/master/install')"
    export PATH="$brew_dir/bin:$brew_dir/sbin:$PATH"
else
    brew_dir=$(brew --prefix)
fi

# Use latest homebrew and update any already installed formulae
echo -e "\\033[1;34m-->Updating Brew...\\033[0m"
brew update && brew upgrade

# Brew and brew cask install commands
brew_install_cmd='brew install'
brew_cask_install_cmd='brew cask install'

# Fonts
brew tap caskroom/fonts
$brew_cask_install_cmd font-sourcecodepro-nerd-font
# Nerd fonts Source Code Pro version doesn't have italics so we install
# the official version
$brew_cask_install_cmd font-source-code-pro

# Latest bash with completions
$brew_install_cmd bash
$brew_install_cmd bash-completion@2

# Git
$brew_install_cmd git

# Compiler related
$brew_install_cmd gcc
$brew_install_cmd llvm
$brew_install_cmd libomp
$brew_install_cmd openblas
$brew_install_cmd coreutils  # (realpath, ln, etc)

# Languages: Rust, Python3, R, latex, node, java
$brew_install_cmd python3
$brew_install_cmd pipenv
$brew_install_cmd pyenv
$brew_install_cmd rust
if ! type "tlmgr" > /dev/null 2>&1; then
    read -p $'\033[1mDo you want to install LaTeX (y/n)? \033[0m' -n 1 -r
    echo
    if [[ $REPLY =~ ^[Yy]$ ]]; then
        $brew_cask_install_cmd basictex
        # Wait until basictex is installed
        while [ ! -f "/Library/TeX/texbin/tlmgr" ]; do
            sleep 5
        done
        export PATH="/Library/TeX/texbin:$PATH"
    fi
fi
read -p $'\033[1mDo you want to install R (y/n)? \033[0m' -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
    $brew_install_cmd R --with-openblas
fi
read -p $'\033[1mDo you want to install Node.js (y/n)? \033[0m' -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
    $brew_install_cmd node
fi

# Neovim and tmux and more bash
brew tap neovim/neovim
$brew_install_cmd neovim --HEAD
$brew_install_cmd neovim-remote
$brew_install_cmd tmux --HEAD
$brew_install_cmd socat  # for faster powerline
$brew_install_cmd powerline

# Databases
$brew_install_cmd mongodb
$brew_install_cmd mysql
$brew_install_cmd postgresql
$brew_install_cmd protobuf # Required by python's mysql-connector
$brew_install_cmd redis
$brew_install_cmd sqlite3

# Other useful binaries
$brew_install_cmd bat
$brew_install_cmd fd
$brew_install_cmd fzf
$brew_install_cmd gnupg
$brew_install_cmd htop
$brew_install_cmd imgcat
$brew_install_cmd neofetch --HEAD
$brew_install_cmd neomutt --HEAD --with-sidebar-patch --with-notmuch-patch
$brew_install_cmd openconnect --HEAD --with-stoken
$brew_install_cmd openvpn
$brew_install_cmd openssh
$brew_install_cmd pandoc
$brew_install_cmd pandoc-citeproc
$brew_install_cmd pass
$brew_install_cmd pass-update
$brew_install_cmd qrendcode
$brew_install_cmd reattach-to-user-namespace
$brew_install_cmd ripgrep
$brew_install_cmd rlwrap
$brew_install_cmd rsync
$brew_install_cmd shellcheck
$brew_install_cmd shellpass
$brew_install_cmd stoken
$brew_install_cmd tree
$brew_install_cmd universal-ctags/universal-ctags/universal-ctags --HEAD
$brew_install_cmd unrar
$brew_install_cmd unzip
$brew_install_cmd zip
$brew_install_cmd z

# Forgit (fzf and git integration)
if [ ! -f "$HOME/.local/bin/forgit.plugin.sh" ]; then
    sudo mkdir -p ~/.local/bin/
    wget https://raw.githubusercontent.com/wfxr/forgit/master/forgit.plugin.sh -P ~/.local/bin
fi

# Apps
$brew_cask_install_cmd docker
$brew_install_cmd docker-compose
{'fraction_non_alphanumeric': 0.1068269762299613, 'fraction_numerical': 0.015478164731896076, 'mean_word_length': 4.60573199070488, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3901886', 'n_tokens_mistral': 2724, 'n_tokens_neox': 2603, 'n_words': 679}