You are a homebrew user and you have a new Mac. If you don’t want to use Apple’s migration tool to copy over everything you might be faced with running
brew install [formula] for everything you have installed.
Unless you have a spare afternoon to do this you can achieve the same things with a few commands and be done in minutes, leaving you to get on with something more interesting.
On your old mac you can output a list of installed software from homebrew.
By piping this into a file you can create a text file containing all of your installed software.
brew list > homebrew.txt
Now you can copy this to your new Mac by Airdrop if you are on the same network,
scp or using a cloud service.
Once you have the file on your new Mac and assuming you have homebrew setup you can install all of the software with a single command
cat homebrew.txt | xargs brew install
You might find that homebrew has removed some formulae since you installed it. If this is the case just edit the file and remove the formula that is no longer available.
If you have your dotfiles in git repository you’ve suddenly got a pretty portable setup.
Have an update or suggestion for this article? You can edit it here and send me a pull request.
Linux and Unix watch command tutorial with examples
Tutorial on using watch, a UNIX and Linux command for executing a program periodically and showing a fullscreen output. Examples of watching a file download, a network interface come up, and showing the five most CPU intensive processes.
Build your own Vim statusline
Statuslines in Vim are not hard to create. Making your own means one less dependency in your life.
Custom Vim Bindings in tmux 2.4
tmux 2.4 made a significant change to key bindings. Here is how to support custom keybindings for versions before and after tmux 2.4