Skip to content

Instantly share code, notes, and snippets.

View systemswizard's full-sized avatar

Barry Haertel systemswizard

View GitHub Profile
@systemswizard
systemswizard / macos-util-find-DS_Store.sh
Last active March 11, 2025 08:25
searches a mac for .DS_Store directories and fails if any are found and returns a multi-line output if there are more than one found
#!/bin/bash
# macos-util-find-DS_Store.sh inspired by https://github.com/krypted/DS_Store_Folders
# searches a mac for .DS_Store directories and fails if any are found and returns a multi-line output if there are more than one found
# https://gist.github.com/systemswizard
if [[ $(mdfind kind:folders AND kMDItemDisplayName:.DS_Store) ]]; then
echo ".DS_Store folder(s) found"
exit 1
else
echo "Could not find any .DS_Store folders"
@systemswizard
systemswizard / macos-uninst-forticlient.sh
Last active March 11, 2025 08:27
Uninstalls FortiClient and its components - Tested on FortiClient SSL Client 6.x-7.1.x
#!/bin/sh
# macos-uninst-forticlient.sh
# https://gist.github.com/systemswizard
# Uninstalls FortiClient and its components - Tested on FortiClient SSL Client 6.x-7.1.x
pkill FortiClientAgent
launchctl unload /Library/LaunchDaemons/com.fortinet*
rm -Rfv /Applications/FortiClient.app
rm -Rfv /Applications/FortiClientUninstaller.app
rm -Rfv /Library/Application\ Support/Fortinet