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
brew bundle
pip3 install -r requirements.txt
source ./install_vscode_extensions.sh
cp settings.json ~/Library/Application\ Support/Code/User/settings.json
Install the software above, then cherry pick from below
The following packages are installed via brew
, to install all of them run brew bundle
- this will install them from the Brewfile.
- bash: Bourne-Again SHell, a UNIX command interpreter
- bat: Clone of cat(1) with syntax highlighting and Git integration
- exa: Modern replacement for 'ls'
- git: Distributed revision control system
- gnupg: GNU Pretty Good Privacy (PGP) package
- guile: GNU Ubiquitous Intelligent Language for Extensions
- htop: Improved top (interactive process viewer)
- httpie: User-friendly cURL replacement (command-line HTTP client)
- imagemagick: Tools and libraries to manipulate images in many formats
- nginx: HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server
- [email protected]: Interpreted, interactive, object-oriented programming language
- rename: Perl-powered file rename script with many helpful built-ins
- thefuck: Programmatically correct mistyped console commands
- tldr: Simplified and community-driven man pages
- tree: Display directories as trees (with optional color/HTML output)
- watchman: Watch files and take action when they change
- wget: Internet file retriever
To generate the above list, run brew leaves | xargs -n1 brew desc --eval-all
.
# 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 bundle
Typical 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.txt
Typical 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-container
Been 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.sh
Take 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 .