This file contains hidden or 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
(* | |
========================================================= | |
MSC-Do-Not-Disturb | |
A program to stop Munki update notifications for 24 hours | |
========================================================= | |
This version assumes you have MunkiReport-PHP installed. MunkiReport-PHP sets up | |
a /usr/local/munki/preflight file which calls any script in /usr/local/munki/preflight.d/ | |
You can change pythonFilePath to /usr/local/munki/preflight if you don't have any other | |
preflight scripts, or you may need to adapt it to fit with your other preflight scripts. | |
========================================================= |
This file contains hidden or 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
<key>uninstall_method</key> | |
<string>uninstall_script</string> | |
<key>uninstall_script</key> | |
<string>#!/bin/sh | |
/bin/rm -rf "/Applications/Managed Software Center Do Not Disturb.app" \ | |
/usr/local/munki/preflight.d/msc-do-not-disturb.py | |
/usr/bin/defaults write /Library/Preferences/ManagedInstalls.plist SuppressUserNotification -bool FALSE | |
/usr/sbin/pkgutil --forget uk.ac.bris.MSC-Do-Not-Disturb</string> | |
<key>uninstallable</key> | |
<true/> |
This file contains hidden or 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 | |
### Variables. Edit these. | |
printername="Choose-A-Printer-Name-with-no-spaces" | |
location="Choose a location" | |
gui_display_name="Choose a descriptive printer name" | |
address="smb://server/printqueue" | |
# leave this empty if you wish to use the generic PS PPD print driver | |
# or make sure the file exists in the ../drivers directory |
This file contains hidden or 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 | |
### ACTIVE DIRECTORY USER PERMISSIONS SCRIPT ### | |
### by Graham Pugh | |
### Props to Jeff Kelley, Graham Gilbert and various others for elements of script | |
### This script looks at the "Allow Administration By" field of the | |
### `dsconfigad -show` command and checks each of the Active Directory users | |
### with mobile accounts on the computer to check whether they should have | |
### local admin rights. It amends each user's membership of the local |
This file contains hidden or 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
<?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>PayloadIdentifier</key> | |
<string> | |
com.apple.mdm.server1.local.%first_uuid%.alacarte</string> | |
<key>PayloadRemovalDisallowed</key> | |
<false /> |
This file contains hidden or 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 python | |
# | |
# Based on https://gist.github.com/robulouski/7442321 | |
# Extended using code from https://ubuntuforums.org/showthread.php?t=993184 | |
# | |
# A Python script to dump all emails from each IMAP folder in an account | |
# to files. | |
# | |
# Mail from each IMAP folder is outputted into a sub-folder of the same name. | |
# |
This file contains hidden or 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 | |
# change the folder to affect which subfolder / files have slashes replaced by underscores | |
# note that in UNIX, slashes are represented as colons | |
find "/path/to/folder" -depth -name \*:\* \ | |
-execdir bash -c 'mv "$1" "${1//:/_}"' _ {} \; |
This file contains hidden or 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/sh | |
# script written by Dave Fisher (fishd) | |
# Get the current logged in user | |
USERNAME=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'` | |
killall "Microsoft Lync" | |
killall "Skype for Business" |
This file contains hidden or 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 | |
# To perform a sleep action | |
# Requires "password after sleep or screen saver begins" to be set in Security preferences | |
. "$HELLO_IT_SCRIPT_FOLDER/com.github.ygini.hello-it.scriptlib.sh" | |
function goToSleep { | |
osascript -e 'tell application "Finder" to sleep' | |
title="Lock Screen" |
This file contains hidden or 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/zsh | |
## Makes an icon set from a PNG. A 512x512 or 1024X1024 PNG is best. | |
## Taken from http://stackoverflow.com/a/31150333 | |
## Usage: ./make_icns.zsh </path/to/image.png> | |
NAME=$(basename $1 .png); DIR="$NAME.iconset" | |
mkdir -pv $DIR | |
for m r in 'n' '' '((n+1))' '@2x'; do | |
for n in $(seq 4 9 | grep -v 6); do |