Skip to content

Instantly share code, notes, and snippets.

View neilmartin83's full-sized avatar
🎯
Focusing

Neil Martin neilmartin83

🎯
Focusing
View GitHub Profile
#!/bin/sh
# Delete all Microsoft Remote Desktop bookmark entries for the specified hostname
#
# Neil Martin - https://soundmacguy.wordpress.com - @neilmartin83
#
############################
#
# Use Parameter 4 in Jamf to specify the friendly name or hostname of the bookmarks you wish to delete
# Friendly name always takes precedence. If the bookmark has no friendly name set, the hostname will be used instead.
#!/bin/sh
# Add a Microsoft Remote Desktop bookmark entry for the specified computer.
#
# Neil Martin - https://soundmacguy.wordpress.com - @neilmartin83
#
############################
#
# Use Parameter 4 in Jamf to specify the hostname or IP address of the bookmark you wish to add e.g. myawesomepc.com (required)
#
#!/bin/sh
# Disables Time Machine and removes all destination set for this Mac
/bin/echo "Stopping Time Machine backup if running..."
/usr/bin/tmutil stopbackup
/bin/echo
/bin/echo "Time Machine Destination(s) Found:"
/usr/bin/tmutil destinationinfo
/bin/echo
#!/bin/sh
loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
sudo -u "${loggedInUser}" /usr/local/bin/vboxmanage setextradata global GUI/PreventApplicationUpdate true
% strings "/Applications/Utilities/Adobe Flash Player Install Manager.app/Contents/MacOS/Adobe Flash Player Install Manager"
/usr/sbin/lsof
/bin/ps
-p %d
-o command=
NSApplicationProcessIdentifier
Flash Player Install Manager application terminated.
FPIMFatalException
[FPIMApplicationManager _loadAndDisplayPanel:] did not obtain a valid view for placement.
#!/bin/bash
# Check a list of serial numbers for eligibility in the 2015 MacBook Pro battery replacement recall
# Returns only eligible serial numbers
# The text file must be formatted with Unix (LF) line breaks
#
# Usage: mbpserialcheck.sh /path/to/inputfile.txt
#
# To output directly to a CSV file: mbpserialcheck.sh /path/to/inputfile.txt > /path/to/outputfile.csv
#
<config>
<panel>
<name>AppsPanel</name>
<visible>false</visible>
</panel>
<panel>
<name>FilesPanel</name>
<masked>true</masked>
<visible>false</visible>
</panel>
#!/bin/bash
# Variables - edit to suit your environment
# Path to the ESET Endpoint Antivirus installer package file
pkgpath="/path/to/installer.pkg"
# Path to exported settings file you wish to import
settingsfile="/path/to/eset_settings"
# Set the variable below to "replace" if you are going to apply your own user settings to the ESET GUI (e.g. notifications/alerts)
replaceguicfg="yes"
# Path to the directory containing your custom ESET user GUI configuration
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.apple.MCX</key>
#!/bin/bash
## mount the segmented DMG
hdiutil attach "/var/tmp/segmented-dmg.dmg"
## run the vendor's installer and do other stuff below this line
exit 0