Skip to content

Instantly share code, notes, and snippets.

View Bruno-Furtado's full-sized avatar
👊
Don’t find fault, find a remedy.

Bruno Tortato Furtado Bruno-Furtado

👊
Don’t find fault, find a remedy.
View GitHub Profile
@Bruno-Furtado
Bruno-Furtado / nosleep.sh
Created June 26, 2019 23:23
Completely disable sleep on any Mac
# Useful to prevent Macbooks to go to sleep when closing the lid instead of running tools that requires a Kernel Extension (e.g. InsomniaX) and more
sudo pmset -a sleep 0; sudo pmset -a hibernatemode 0; sudo pmset -a disablesleep 1;
# And to go back to normal:
sudo pmset -a sleep 1; sudo pmset -a hibernatemode 25; sudo pmset -a disablesleep 0;