Skip to content

Instantly share code, notes, and snippets.

View TheTechRobo's full-sized avatar

TheTechRobo

View GitHub Profile
@TheTechRobo
TheTechRobo / lockMyMac.py
Last active July 27, 2019 16:24
lock your Mac from the CLI
import os
print("John Lockeing the computer............")
os.system('/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend')
print("Locked")