Prevent a Mac from #sleeping from the command line - Mac OS X Hints
▻http://hints.macworld.com/article.php?story=20130620032443758
Just run this command in terminal:
pmset noidle
Terminal will display the following text:
Preventing idle sleep (^C to exit)...
To allow the #Mac to go back to sleep, according to its current Energy Saver settings, just press Control-C.