Skip to content

Instantly share code, notes, and snippets.

View PrefixCoder's full-sized avatar

Funtykov Mykyta PrefixCoder

View GitHub Profile
@ibressler
ibressler / MDM Profiles on macOS.md
Last active August 27, 2026 03:05
MDM Profiles on macOS

MDM Profiles on macOS

Notes: From Zeno Popovici with edits & tested on a M1 macbook with Ventura (macOS 13).

In macOS you can check the MDM status with the following command in a Terminal:

profiles status -type enrollment

Non-removable MDM profiles cannot officially removed without doing a full system wipe

@milanboers
milanboers / deep_merge.py
Created November 12, 2020 12:56
Deep merge dicts in Python
def deep_merge(dict1: dict, dict2: dict) -> dict:
""" Merges two dicts. If keys are conflicting, dict2 is preferred. """
def _val(v1, v2):
if isinstance(v1, dict) and isinstance(v2, dict):
return deep_merge(v1, v2)
return v2 or v1
return {k: _val(dict1.get(k), dict2.get(k)) for k in dict1.keys() | dict2.keys()}