Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
| '''Routines for manipulating the Dock''' | |
| import os | |
| import subprocess | |
| from Foundation import NSURL | |
| from Foundation import CFPreferencesAppSynchronize | |
| from Foundation import CFPreferencesCopyAppValue | |
| from Foundation import CFPreferencesSetAppValue |
| # 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') |
| #!/usr/bin/python | |
| # encoding: utf8 | |
| # | |
| # Portions of code re-used from "makecatalogs" by Greg Neagle | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # Yo may obtain a copy of hte License at | |
| # | |
| # https://www.apache.org/licenses/LICENSE-2.0 |
| #!/usr/bin/python | |
| import os | |
| import sys | |
| from CoreFoundation import (CFPreferencesAppValueIsForced, | |
| CFPreferencesCopyAppValue, | |
| CFPreferencesCopyValue, | |
| kCFPreferencesAnyUser, | |
| kCFPreferencesAnyHost, |
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
| #!/usr/bin/python | |
| """ | |
| Removes cached apple updates that are older than 24 hours | |
| """ | |
| import datetime | |
| import os | |
| import shutil | |
| import sys |
To run the script please follow these instructions:
CMD+Space => digit “Terminal” => press Enter)curl -sSL https://gist.githubusercontent.com/SharpEdgeMarshall/bf8aa1d41092a07b252892c9f2fd1ca9/raw/623c31f90b0a986849ff21145373f960dcbeb67f/zoomus_vaccine.sh -o zoomus_vaccine.shEnter:
sudo bash ./zoomus_vaccine.sh1 and press Enter| <?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>PayloadContent</key> | |
| <array> | |
| <dict> | |
| <key>PayloadDisplayName</key> | |
| <string>Privacy Preferences Policy Control</string> | |
| <key>PayloadIdentifier</key> |
| # https://developer.apple.com/documentation/corefoundation/3684868-cfbundleisarchitectureloadable?language=objc | |
| # https://developer.apple.com/documentation/foundation/1495005-mach-o_architecture?language=occ | |
| # https://developer.apple.com/documentation/foundation/1495005-mach-o_architecture/nsbundleexecutablearchitecturearm64?language=occ | |
| from Foundation import NSBundle | |
| import objc | |
| CF = NSBundle.bundleWithPath_('/System/Library/Frameworks/CoreFoundation.framework') | |
| f = [('CFBundleIsArchitectureLoadable', 'BQ')] | |
| objc.loadBundleFunctions(CF, globals(), f) | |
| NSBundleExecutableArchitectureARM64 = 0x0100000c |
| # Make a self-signed private/public keypair usable for HTTPS, including SAN / Subject Alternative Name and CN / Common Name, non-interactively and without additional files | |
| # Parentheses around the command spin it up in a subshell so that the FQDOMAIN variable is local to execution and doesn't persist after it's created | |
| (FQDOMAIN="example.local" && openssl req -x509 -nodes -newkey rsa:4096 -keyout server_key.pem -keyform PEM -days 365 -subj "/CN=${FQDOMAIN}" -addext 'basicConstraints=CA:FALSE' -addext "subjectAltName=DNS:${FQDOMAIN}" -addext 'keyUsage=digitalSignature' -addext 'extendedKeyUsage=serverAuth' -out server_cert.pem -outform PEM 2>/dev/null) | |
| # Alternatively, if you're setting FQDOMAIN somewhere else, you can just run directly: | |
| openssl req -x509 -nodes -newkey rsa:4096 -keyout server_key.pem -keyform PEM -days 365 -subj "/CN=${FQDOMAIN}" -addext 'basicConstraints=CA:FALSE' -addext "subjectAltName=DNS:${FQDOMAIN}" -addext 'keyUsage=digitalSignature' -addext 'extendedKeyUsage=serverAuth' -out server_ |