Skip to content

Instantly share code, notes, and snippets.

@nikolay-n
nikolay-n / defsmon.py
Last active October 29, 2022 14:26
Defaults Monitor - tool to sniff defaults keys and values using unified log
#!/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
@gregneagle
gregneagle / fancy_defaults_read.py
Last active February 6, 2024 15:14
fancy_defaults_read.py: Reads a preference, prints its value, type, and where it is defined.
#!/usr/bin/python
import os
import sys
from CoreFoundation import (CFPreferencesAppValueIsForced,
CFPreferencesCopyAppValue,
CFPreferencesCopyValue,
kCFPreferencesAnyUser,
kCFPreferencesAnyHost,
@MiqViq
MiqViq / remove_configdata_from_selected.sh
Created February 1, 2015 11:33
For Reposado: Removes config-data attribute from selected update types: XProtectPlistConfigData, Gatekeeper Configuration Data
#!/bin/bash
# remove_configdata_from_selected
#
# removes config-data attribute from selected update types: XProtectPlistConfigData, Gatekeeper Configuration Data
reposadoUser=reposado
reposadoGroup=admin
reposadoDir="/path/to/your/reposado"
@bryanzak
bryanzak / ScriptRunner.sh
Last active May 9, 2017 21:44
Script Runner. This is a Launch Agent and script launcher so we can have a folder of scripts that are run anytime a user logs in. This is very barebones and not even remotely fancy, please feel free to share any feedback or suggestions you might have. Updated 2014-03-04 to support logging
#!/bin/bash
# save this file at /Library/yourorg/ScriptRunner.sh
script_path="${0}"
source_path=$(dirname "${script_path}")
chmod 777 "/var/log/yourorg-scriptrunner.log"
if [ -d "${source_path}/User Login Scripts" ]; then
@richardcornish
richardcornish / git.md
Last active August 11, 2023 08:44
Enough Git for your résumé in 100ish lines