Here to make it easier for me to setup new developer environments quickly, probably of no use to anyone but me.
Quick setup details: software to install, config/dotfiles & packages
NB: this replaces the systems current dotfiles.
# copy dotfiles from the repo
cp .bash_profile ~/.bash_profile
cp .bashrc ~/.bashrc
cp .gitconfig ~/.gitconfig
cp .editorconfig ~/.editorconfig
cp .prettierrc.js ~/.prettierrc.jsbrew bundle
pip3 install -r requirements.txt
source ./install_vscode_extensions.sh
cp settings.json ~/Library/Application\ Support/Code/User/settings.jsonInstall the software above, then cherry pick from below
A full list of packages installed via brew can be found in the doco folder. To install all of them, run brew bundle - this will install them from the Brewfile.
# creates Brewfile in the current directory from currently-installed packages
rm Brewfile # brew won't override the file by default
brew bundle dump
# install everything from the Brewfile
brew bundleTypical python packages are listed in requirements.txt.
pip3 install -r requirements.txt# create a requirements file in the current directory from currently-installed packages
pip3 freeze > requirements.txt
# install everything from the requirements file
pip3 install -r requirements.txtTypical python packages are listed in vscode.extensions, and can be installed by running source ./install_vscode_extensions.sh.
To update the extensions list: code --list-extensions > vscode.extensions.
Place the settings file in the following locations:
- macOS
$HOME/Library/Application\ Support/Code/User/settings.json - Linux
$HOME/.config/Code/User/settings.json - Windows
%APPDATA%\Code\User\settings.json
There is a default editorconfig file in this repo, with sensible overrides - particularly if you are using Prettier. Simple copy it to your code location (or your home directory).
The .bashrc files includes a couple of Docker helper functions:
dockershell: start containers in an interactive shell.
dockermappedshell: start containers in an interactive shell, with the current directory is mapped into the container.
Examples:
dockershell centos
dockershell node
dockershell nginx
dockershell your-container
dockermappedshell centos
dockermappedshell node
dockermappedshell nginx
dockermappedshell your-containerBeen a few years since I've developed on Windows, the below was handy then, may be handy in future.
When new items are installed/removed from your dev env, or just periodically, run the following to update this repo with a snapshot of the current system
source ./update-repo.shTake your pick from the following:
# copy dotfiles to the repo
cp ~/.bash_profile .
cp ~/.bashrc .
cp ~/.gitconfig .
# update package files
brew bundle dump
pip3 freeze > requirements.txt
code --list-extensions > vscode.extensions
# copy settings files
cp ~/Library/Application\ Support/Code/User/settings.json .