Prevent display from falling asleep on MacOS
If you want to prevent your display from going to sleep while you are doing something that doesn't require input, you can use caffeinate -d
For me this was useful when running a longer script that I wanted to keep an eye on while I was debugging. By running caffeinate -d
in a terminal I was able to prevent the display from sleeping, saving me from pressing a button or moving the mouse all the time.