Skip to content

Instantly share code, notes, and snippets.

@Charl13
Last active June 25, 2021 21:11
Show Gist options
  • Save Charl13/67bb10e5b929aec590bef7ef96cb3240 to your computer and use it in GitHub Desktop.
Save Charl13/67bb10e5b929aec590bef7ef96cb3240 to your computer and use it in GitHub Desktop.
development-env.sh
export GIST_URL_ZSHRC="https://gist.githubusercontent.com/Charl13/965e0a2406edcf4b9ea2b3841d1e76a7/raw/496118c0bfb5f043cdef8105fdf1e52b658ba6fd/.zshrc"
export GIST_URL_TMUXCONF="https://gist.githubusercontent.com/Charl13/429996d635aff4a3bceb1ecb821e0727/raw/7ac2738856c50ffc9d892c3b8772e55ab1b4cc0b/.tmx.conf"
export GIST_URL_NVIMINIT="https://gist.githubusercontent.com/Charl13/b1c00e81dc286b2a8bd1c4ead0864c07/raw/e00a08c10b15483a30a0539f08ca935987a0f8ba/init.vim"
export GIST_URL_COCCONFIG="https://gist.githubusercontent.com/Charl13/34ed10f05bcb1e36d67bd5d4d3d7460b/raw/e45b82d158edee6595deafdcdde5ea1c40abd727/coc-config.json"
export GIST_URL_GITCONFIG="https://gist.githubusercontent.com/Charl13/0205e1e1fdfc5497ce6a3b5e30d9f150/raw/7e0d30e48473c42238c1e47615d780402bd727d0/.gitconfig"
export GIST_URL_MYSQLCONFIG="https://gist.githubusercontent.com/Charl13/e8e1a8b6638b7e67e019f96ed93258f9/raw/b9667520e6ee3bbe2c43691954018d90a364c8ce/.my.cnf"
export RELEASE_URL_DELTA="https://github.com/dandavison/delta/releases/download/0.8.0/git-delta_0.8.0_amd64.deb"
export NERDFONT_URL="https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20Nerd%20Font%20Complete.otf"
export SCRIPT_INSTALL_NVM="https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh"
export SCRIPT_INSTALL_ARDUINO_CLI="https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh"
##
## Install commonly used tools
##
sudo apt install git curl locate pip bat network-manager-vpnc pspg
## Delta diff tool
curl -s $RELEASE_URL_DELTA > /tmp/git-delta_amd64.deb
sudo apt install /tmp/git-delta_amd64.deb
rm /tmp/git-delta_amd64.deb
# Git configuration
curl -s $GIST_URL_GITCONFIG > ~/.gitconfig
# Move mouse cursor while typing
gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing false
##
## Install NERD FONT
mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts && curl -fLo "Droid Sans Mono for Powerline Nerd Font Complete.otf" $NERDFONT_URL
##
## Install Docker
##
sudo apt install docker.io docker-compose
# User privileges
sudo usermod -aG docker $USER
newgrp docker
##
## Install Node
##
# Node Version Manager
curl -o- $SCRIPT_INSTALL_NVM | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# Latest NodeJS LTS version
nvm install --lts
nvm use --lts
##
## Install PHP
##
# Add APT repository for more PHP binaries
sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php7.2
sudo apt install php7.4
sudo apt install php8.0
# Composer
php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');"
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
rm /tmp/composer-setup.php
##
## Install TMUX
##
sudo apt install tmux fonts-powerline
# TMUX Plugin Manager
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Create configuration
curl -s $GIST_URL_TMUXCONF > ~/.tmux.conf
##
## Install ZSH
##
sudo apt install zsh
# Set ZSH as default shell
chsh -s $(which zsh)
mkdir -p ~/.config/zsh
# Antigen
curl -L git.io/antigen > ~/.config/zsh/antigen.zsh
# Create configuration
curl -s $GIST_URL_ZSHRC > ~/.zshrc
npm install -g spaceship-prompt
##
## NeoVim
##
sudo apt install neovim silversearcher-ag ccls
npm install -g neovim
pip install --upgrade msgpack pynvim
# Vim Plug
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
# NeoVim Configuration
curl -s $GIST_URL_NVIMINIT > ~/.config/nvim/init.vim
# Coc settings
curl -s $GIST_URL_COCCONFIG > ~/.config/nvim/coc-settings.json
# Install plugins
nvim +PlugInstall +UpdateRemotePlugins +qa
# Install Arduino-cli
curl -fsSL $SCRIPT_INSTALL_ARDUINO_CLI | sh
sudo mv bin/arduino-cli /usr/local/bin
rm -rf bin
##
## MySQL
##
sudo apt install mycli mysql-client
# Create login path via SSH tunnel (defined in .zshrc)
mysql_config_editor set --login-path=bpci-vpn --user=bpcheckin --password --host=localhost --port=33161
curl -s $GIST_URL_MYSQLCONFIG > ~/.my.cnf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment