This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
currentDate=$(date "+%s") | |
applicationList=( | |
"/Applications/Microsoft Word.app" | |
"/Applications/Microsoft Excel.app" | |
"/Applications/Microsoft PowerPoint.app" | |
"/Applications/Microsoft Outlook.app" | |
"/Applications/Microsoft OneNote.app" | |
"/Applications/Microsoft Teams.app" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
currentDate=$(date "+%s") | |
applicationList=( | |
"/Applications/Microsoft Word.app" | |
"/Applications/Microsoft Excel.app" | |
"/Applications/Microsoft PowerPoint.app" | |
"/Applications/Microsoft Outlook.app" | |
"/Applications/Microsoft OneNote.app" | |
"/Applications/Microsoft Teams.app" | |
"/Applications/Yammer.app" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
backupAndSyncConfig="Library/Application Support/Google/Drive/user_default/sync_config.db" | |
removeDataKeys="DELETE FROM data WHERE data_value IS '/Applications';" | |
removeDataValues="DELETE FROM data WHERE data_key IS '/Applications';" | |
loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' ) | |
for user in $(dscl . list /Users UniqueID | awk '$2 >= 500 {print $1}'); do | |
userHome=$(dscl . read /Users/"$user" NFSHomeDirectory | sed 's/NFSHomeDirectory://' | grep "/" | sed 's/^[ \t]*//') | |
sqlite3 "${userHome}/${backupAndSyncConfig}" "$removeDataKeys" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
preferredNetwork="$1" | |
securityType="$2" | |
| |
# For securityType, | |
# use OPEN for none, | |
# WPA for WPA Personal, | |
# WPA2 for WPA2 Personal, | |
# WPA/WPA2 for WPA/WPA2 Personal, | |
# WPAE for WPA Enterprise, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ln "$(lsof -p $(ps -ax | grep storedownloadd | grep -v grep | awk '{ print $1 }') | awk '{ print $9 }' | grep -E '^/private/var/folders/.*/com\.apple\.appstore.*\.pkg$')" ~/Desktop/AppStoreApp.pkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Example given with Wireshark. Script tests ping times for Wireshark's mirrors and selects the fastest. | |
MIRRORS=( | |
'1.as.dl.wireshark.org' | |
'1.eu.dl.wireshark.org' | |
'1.na.dl.wireshark.org' | |
'2.na.dl.wireshark.org' | |
# 'www.wireshark.org' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/sbin/route get 1.1.1.1 | /usr/bin/grep 'interface: ' | /usr/bin/sed 's/.*interface: //' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# USAGE: ./rmSMB_Illegals.sh path | |
# Find searches through each file on a filesystem and passes the filenames to a | |
# function that tests for the presence of illegal characters and remediates. | |
# Bad characters are either removed or replaced with a ``-''. | |
# This has been tested on APFS on macOS 10.13.5. It'd be pretty safe to run this | |
# on a mounted volume, but it'd be nicer to test on Synology Linux and have it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/bin/say "This test worked." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Remove Microsoft Office 2016 from macOS | |
# Store file in a place that is readable by all users | |
export LOG_FILE="/Library/Logs/Microsoft/uninstall.log" | |
export TODAY=$(date +"%Y-%m-%d") | |
export RED='\033[0;31m' | |
export GREEN='\033[0;32m' | |
export YELLOW='\033[0;33m' |
NewerOlder