Skip to content

Instantly share code, notes, and snippets.

View nwai's full-sized avatar
💭
learning

nwai

💭
learning
View GitHub Profile
tell application "System Preferences" to activate
tell application "System Events"
tell application process "System Preferences"
delay 5
set currentWindow to name of window 1
if currentWindow does not contain "Profiles" then
click button "Show All" of group 1 of group 2 of toolbar 1 of window 1
delay 5
click button "Profiles" of scroll area 1 of window "System Preferences"
@nwai
nwai / tcc.pkginfo
Created October 25, 2019 03:24 — forked from joncrain/tcc.pkginfo
<?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.example.tcc</string>
<key>_metadata</key>
<dict>
<key>catalog_promotion_date</key>
<string>2019-01-16</string>
@nwai
nwai / kextidentifiers.py
Created May 25, 2018 11:04 — forked from erikng/kextidentifiers.py
kextidentifiers.py
#!/usr/bin/python
import sqlite3
conn = sqlite3.connect('/var/db/SystemPolicyConfiguration/KextPolicy')
c = conn.cursor()
query = 'SELECT * FROM kext_policy'
c.execute(query)
kexts = c.fetchall()
for kext in kexts:
print kext
#!/usr/bin/python
# Credit to frogor for the objc
from Foundation import NSBundle
import json
import objc
import os
import plistlib
import subprocess
@nwai
nwai / _verify-repair-permissions-disk.md
Created May 6, 2018 00:46 — forked from bzerangue/_verify-repair-permissions-disk.md
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /