Skip to content

Instantly share code, notes, and snippets.

View chrisgrande's full-sized avatar

Christopher Grande chrisgrande

View GitHub Profile
@aarondavidpolley
aarondavidpolley / com.apple.SetupAssistant.managed.plist
Created April 7, 2020 00:14
Skip All macOS Setup Assistant Items for new user login: Plist to upload into Jamf Pro Application & Custom Settings Profile Payload
<?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>SkipAppearance</key>
<true/>
<key>SkipCloudSetup</key>
<true/>
<key>SkipPrivacySetup</key>
<true/>
@talkingmoose
talkingmoose / Manage App Notifications.bash
Last active January 25, 2024 15:26
macOS Catalina will prompt users to allow Notifications from each app that makes a request. Administrators can manage these prompts using a Configuration Profile. If running Jamf Pro 10.19 or later, I suggest instead using this manifest: https://github.com/talkingmoose/jamf-manifests/blob/master/macOS%20Notifications%20(com.apple.notificationset…
#!/bin/bash
<<ABOUT_THIS_SCRIPT
-----------------------------------------------------------------------
Written by:William Smith
Professional Services Engineer
Jamf
bill@talkingmoose.net
https://gist.github.com/talkingmoose/9faf50deaaefafa9a147e48ba39bb4b0
@javan
javan / optimized-screenshots.md
Created July 8, 2019 18:51
macOS: Optimized Screenshots
😱 Before: ~/Desktop/Screen Shot….png 4.1 MB
🏆 After: ~/Screenshots/Screen Shot….png 937 KB

  ⤵

  1. Install https://pngquant.org/
    $ brew install pngquant
@erikng
erikng / Privacy Preferences Policy Control Payload.md
Last active August 29, 2019 22:29
Privacy Preferences Policy Control Payload.md

Privacy Preferences Policy Control Payload

The Privacy Preferences payload is designated by specifying com.apple.TCC.configuration-profile-policy value as the PayloadType value.

It controls the settings that are displayed in the ”Privacy” tab of the ”Security & Privacy” pane in System Preferences.

This profile must be delivered via a user approved MDM server.

Availability: Available in macOS 10.14 and later.

In addition to the settings common to all payloads, this payload defines this key:

@grahamgilbert
grahamgilbert / clean_old_apple_updates.py
Created May 9, 2018 16:35
Clean out old apple updates (older than 24 hours) because softwareupdate often refuses to install them
#!/usr/bin/python
"""
Removes cached apple updates that are older than 24 hours
"""
import datetime
import os
import shutil
import sys
getHexColor = (color) ->
return "" unless color
return color if /^#/.test(color)
rgbValues = getRGBValues(color)
hexValues = rgbValues.map(numberToHex)
"#" + hexValues.join("")
numberToHex = (number) ->
"0#{number.toString(16)}".slice(-2).toUpperCase()
@zulhfreelancer
zulhfreelancer / upgrade.md
Last active February 17, 2023 00:42
How to upgrade Heroku Postgres database plan?
  1. Assuming you have multiple Heroku apps and Git remote like so:
development https://git.heroku.com/xxx.git (fetch)
development https://git.heroku.com/xxx.git (push)
origin      git@bitbucket.org:xxx/xxx.git  (fetch)
origin      git@bitbucket.org:xxx/xxx.git  (push)
production  https://git.heroku.com/xxx.git (fetch)
production  https://git.heroku.com/xxx.git (push)
staging https://git.heroku.com/xxx.git (fetch)
class Logging(object):
__name__ = 'logger.info(1)'
plist = '/System/Library/Preferences/Logging/Subsystems/'
def __init__(__name__, plist, *args, **kwargs):
super(getLogger/, self).__init__()
logger.info('Input parameters:\n'
'accessibility: "{com.apple.Accessibility.plist}"\n'
@pudquick
pudquick / ck_passwords.py
Last active April 2, 2022 14:02
Generating Safari-style passwords using the PrivateFramework WBSPasswordGeneration class on macOS via python & pyobjc
# For an alternative method, check out:
# https://gist.github.com/pudquick/3ff4278c609ce223ebb4fc300c5edd0f
# Note: this method no longer works for Safari 15+
from Foundation import NSBundle, NSClassFromString
SafariShared = NSBundle.bundleWithPath_('/System/Library/PrivateFrameworks/SafariShared.framework')
loaded = SafariShared.load()
WBSPasswordGeneration = NSClassFromString('WBSPasswordGeneration')
CKRecord = NSClassFromString('CKRecord')
@pudquick
pudquick / passwords.py
Last active May 28, 2020 16:14
Generating passwords using SecurityFoundation's password assistant hidden functions on macOS via python & pyobjc
# Hat tip to https://github.com/anders/pwgen for various initial documentation
# For an alternative method, check out:
# https://gist.github.com/pudquick/8d3dedc337161b187a8a1c9564c83463
import objc
from Foundation import NSBundle, NSMutableArray, NSString
SecurityFoundation = NSBundle.bundleWithPath_('/System/Library/Frameworks/SecurityFoundation.framework')
success = SecurityFoundation.load()