CLICK ME
yes, even hidden code blocks!
print("hello world!")
#!/usr/bin/env ruby | |
# Sizes - Calculate and sort all filesizes for current folder Includes | |
# directory sizes, colorized output Brett Terpstra 2019 WTF License | |
VERSION = "1.0.1" | |
require 'shellwords' | |
# Just including term-ansicolor by @flori and avoiding all the | |
# rigamarole of requiring multiple files when it's not a gem... - Brett | |
# |
#!/bin/sh | |
computerName=$( scutil --get ComputerName ) | |
serialNumber=$( system_profiler SPHardwareDataType | grep 'Serial Number' | awk -F: '{ print $2 }' | xargs ) | |
if [ "$computerName" = "$serialNumber" ]; then | |
echo "<result>Computer Name is correct</result>" | |
else | |
echo "<result>Computer Name is incorrect</result>" | |
fi |
MODEL="Xerox WorkCentre 6655" | |
ICON=$(gunzip -c "/Library/Printers/PPDs/Contents/Resources/${MODEL}.gz" | awk '/APPrinterIconPath/ {gsub(/"/,"",$2); print $2}') | |
/usr/bin/sips -s format png "${ICON}" --out "${MODEL}.png" --addIcon --resampleHeightWidthMax 512 |
#!/bin/sh | |
ComputerName=$( osascript <<'END' | |
set serialNumber to do shell script "system_profiler SPHardwareDataType | grep 'Serial Number' | awk -F: '{ print $2 }' | xargs" | |
set computername to "" | |
repeat while computername is "" or computername is "Type Computer Name Here" | |
#!/bin/sh | |
# MDM profile name to remove | |
profileName="ABC Wi-Fi" | |
# list existing profiles and their UUIDs - must be run with elevated privileges | |
UUIDList=$( /usr/bin/profiles -Pv | grep "name: $profileName" -A 5 | grep profileUUID | awk -F "profileUUID: " '{ print $2 }' ) | |
# remove each profile by UUID | |
while IFS= read -r aUUID |
#!/usr/bin/python | |
# Credit to frogor for the objc | |
from Foundation import NSBundle | |
import json | |
import objc | |
import os | |
import plistlib | |
import subprocess |
#!/usr/bin/python | |
from Foundation import NSBundle | |
IOBluetooth = NSBundle.bundleWithIdentifier_('com.apple.Bluetooth') | |
IOBluetoothDevice = IOBluetooth.classNamed_('IOBluetoothDevice') | |
# remove configured devices | |
try: | |
devices = list(IOBluetoothDevice.configuredDevices()) | |
except: |
#!/usr/bin/python | |
# Completely uninstall Office 2016, as per: | |
# https://support.office.com/en-us/article/Uninstall-Office-2016-for-Mac-eefa1199-5b58-43af-8a3d-b73dc1a8cae3 | |
# and | |
# https://support.office.com/en-us/article/Troubleshoot-Office-2016-for-Mac-issues-by-completely-uninstalling-before-you-reinstall-ec3aa66e-6a76-451f-9d35-cba2e14e94c0?ui=en-US&rs=en-US&ad=US | |
import glob | |
import os |
# Tested on 10.11 | |
# Note: | |
# The marketing information embedded in the ServerInformation.framework is not the same as what | |
# About This Mac displays - there are differences. | |
# | |
# For example: | |
# ServerInformation: 15" MacBook Pro with Retina display (Mid 2015) | |
# About This Mac: MacBook Pro (Retina, 15-inch, Mid 2015) | |
# |