Skip to content

Instantly share code, notes, and snippets.

View robcholz's full-sized avatar
🦀
Rustacean

robcholz robcholz

🦀
Rustacean
View GitHub Profile
@ushuz
ushuz / fix-country.py
Last active August 5, 2023 05:58
Fix macOS global "Country" setting
# view gloabl prefs in json
# plutil -convert json -o - -- /Library/Preferences/.GlobalPreferences.plist | python -m json.tool
import CoreFoundation as cf
# get current Country
cf.CFPreferencesCopyValue('Country', cf.kCFPreferencesAnyApplication, cf.kCFPreferencesAnyUser, cf.kCFPreferencesAnyHost)
# set Country
cf.CFPreferencesSetValue('Country', 'TW', cf.kCFPreferencesAnyApplication, cf.kCFPreferencesAnyUser, cf.kCFPreferencesAnyHost)