Your MacBook goes to sleep when you close the lid, but you can change that default. This open-source app keeps your MacBook awake even with the screen closed.