Skip to content

Instantly share code, notes, and snippets.

View lucascantor's full-sized avatar

Lucas Cantor lucascantor

View GitHub Profile
@lucascantor
lucascantor / startScreenSaver.sh
Last active January 27, 2018 05:25
Start screensaver
open -a /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app
@lucascantor
lucascantor / sleepDisplay.sh
Last active January 27, 2018 05:26
Sleep display
pmset displaysleepnow
@lucascantor
lucascantor / createMacOSInstallMedia.sh
Last active March 17, 2018 17:53
Create a bootable macOS installation disk
/path/to/macOS/installer.app/Contents/Resources/createinstallmedia --volume /path/to/installation/media/volume --applicationpath /path/to/macOS/installer.app --nointeraction
@lucascantor
lucascantor / pmsetSchedule.sh
Last active March 10, 2018 17:37
Schedule repeating reboots, replacing 'MTWRFSU 04:00:00' with desired day(s) of week and time of day
pmset repeat restart MTWRFSU 04:00:00
@lucascantor
lucascantor / installPkg.sh
Last active March 3, 2018 20:30
User installer command line utility to install a .pkg installer file on macOS
installer -pkg /path/to/pkg/software/installation/file.pkg -target /
@lucascantor
lucascantor / checkGateKeeper.sh
Last active April 26, 2022 07:56
Manage GateKeeper
# check current GateKeeper configuration status
spctl --status
@lucascantor
lucascantor / removeFileVaultUser.sh
Last active February 17, 2018 16:40
Remove user from those able to unlock FileVault
fdesetup remove -user <username>
@lucascantor
lucascantor / addFileVaultUser.sh
Last active February 17, 2018 16:40
Add user to those able to unlock FileVault
fdesetup add -usertoadd <username>
@lucascantor
lucascantor / authrestart.cmd
Last active January 27, 2018 05:37
Restart Windows without needing to unlock BitLocker on next boot only
PowerShell -Command "Suspend-BitLocker -MountPoint "C:" -RebootCount 1"
shutdown /r /f
@lucascantor
lucascantor / authrestart.sh
Last active September 30, 2020 15:11
The fdesetup utility can be used to remotely restart a Mac without needing physical in-person keyboard access to unlock FileVault on the next boot only
fdesetup authrestart