This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
<?php | |
/** | |
* Add this snippet to your functions.php file | |
*/ | |
function my_admin_notification_profile_update($userid) { | |
$userdata = get_userdata($userid); | |
$message = "A user profile has been updated\n\n"; | |
$message .= print_r($userdata,true); | |
@wp_mail(get_option('admin_email'), 'User Profile Update', $message); |
#!/bin/bash | |
# Original: https://jamfnation.jamfsoftware.com/discussion.html?id=14467 | |
# Useful script for deploying printers in a Casper Environment | |
# Originally by Lwindram on JAMF Nation forums | |
# https://jamfnation.jamfsoftware.com/viewProfile.html?userID=11026 | |
# Edited to use JSS Script Parameters to make the script portable to all Models. Define $vars in JSS Policy. | |
## Translations | |
# man lpadmin |
# <type>: (If applied, this commit will...) <subject> (Max 50 char) | |
# |<---- Using a Maximum Of 50 Characters ---->| | |
# Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# Provide links or keys to any relevant tickets, articles or other resources | |
# Example: Github issue #23 |
The goal of this special recipes repository for AutoPkg is to build trust into the thousands of available AutoPkg recipes.
In order to accomplish this, we will have a team of vetted reviewers ensuring that the recipes in this repository follow strict rules. These rules limit recipes' capabilities, and defining and enforcing those rules will require a lot of work on the part of our community. But we hope that the benefits of establishing a core of trusted recipes will be well worth it.
We intend to build trust in recipes — not in payload. We will verify that the recipe plist content is correctly identified, comes from a trusted source, and behaves in a reasonable manner. However, we will not guarantee that the software packaged by the recipe is secure or trusted.
#!/usr/local/munki/munki-python | |
# change the above path to your own python if you don't have Munki installed | |
""" | |
Merges add_servers into current favorites and removes remove_servers. | |
Run as root to update all users or as normal user to update just that user. | |
""" | |
import os | |
import getpass |
#!/bin/bash | |
export PATH=/usr/bin:/bin:/usr/sbin:/sbin | |
consoleUser() { | |
echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ && ! /loginwindow/ { print $3 }' | |
} | |
displaydialog() { # $1: message | |
message=${1:-"Message"} |
#!/bin/zsh | |
## postinstall | |
pathToScript=$0 | |
pathToPackage=$1 | |
targetLocation=$2 | |
targetVolume=$3 | |
# This postinstall script for Composer creates the following | |
# A LaunchDaemon that starts a separate script to run a Jamf Pro policy command |
#!/usr/bin/python2.7 | |
# -*- coding: utf-8 -*- | |
''' | |
Defaults Monitor - tool to sniff defaults keys and values using unified log | |
to launch use standard python 2.7, eg python2.7 ./defsmon.py | |
''' | |
import os |
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |