Skip to content

Instantly share code, notes, and snippets.

View lucascantor's full-sized avatar

Lucas Cantor lucascantor

View GitHub Profile
@lucascantor
lucascantor / backblazeSilentInstall.sh
Last active April 21, 2018 16:01
Install Backblaze silently from the command line
/Volumes/Backblaze\ Installer/Backblaze\ Installer.app/Contents/MacOS/bzinstall_mate -nogui -createaccount user@corp.com password-goes-here groupID groupToken
@lucascantor
lucascantor / rerunSetup.sh
Last active April 14, 2018 18:12
Run macOS Setup Assistant on next boot
rm /var/db/.AppleSetupDone
@lucascantor
lucascantor / setLoginwindowText.sh
Last active April 7, 2018 17:09
Set login window message text
defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "<Message Text Here>"
@lucascantor
lucascantor / allowKernelExtension.scpt
Created March 25, 2018 18:53
Click the "Allow" button in System Preferences > Security & Privacy to whitelist macOS kernel extensions without physical access.
tell application "System Events" to click at {750, 450}
@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 / renameByCreationDate.sh
Created March 11, 2018 01:20
Rename photo files by their creation date using exiftool
exiftool '-filename<CreateDate' -d %F_%H-%M-%S%%-c.%%le -r /path/to/directory/containing/image/files
@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 / addFileVaultUser.sh
Last active February 17, 2018 16:40
Add user to those able to unlock FileVault
fdesetup add -usertoadd <username>
@lucascantor
lucascantor / removeFileVaultUser.sh
Last active February 17, 2018 16:40
Remove user from those able to unlock FileVault
fdesetup remove -user <username>