Spectacle is one of the first apps I install on a macbook. MacOS doesn’t have very good window management capabilities, so this is very helpful.
It’s great for large/multi monitor setups. The toolbar item lists the shortcuts so you can learn them quickly.
The code is on GitHub