This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Spotify Screensaver Toggle | |
By Stuart Colville | |
http://muffinresearch.co.uk/ | |
Requires Spotify Linux Preview. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def make_random_password(length=12, symbols='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@$^_+&'): | |
password = [] | |
for i in map(lambda x: int(len(symbols)*x/255.0), os.urandom(length)): | |
password.append(symbols[i]) | |
return ''.join(password) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Java script to add the exception.sites in a shared location for the | |
# new version of Java. Script created and updated by Josh Miller and | |
# Matt Hansen. Last update January 20, 2014. | |
# This command will check to see if the Java Deployment directory | |
# exists. If not, it will create it for you. | |
test -d /Library/Application\ Support/Oracle/Java/Deployment || mkdir -p /Library/Application\ Support/Oracle/Java/Deployment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby | |
# SET YOUR_HOME TO THE ABSOLUTE PATH OF YOUR HOME DIRECTORY | |
# chmod +x install.rb | |
# ./install.rb | |
YOUR_HOME = '' | |
HOMEBREW_PREFIX = "#{YOUR_HOME}/usr/local" | |
HOMEBREW_CACHE = '/Library/Caches/Homebrew' | |
HOMEBREW_REPO = 'https://github.com/Homebrew/homebrew' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
"""Enables location services, allows Maps and Timezone""" | |
import os | |
import platform | |
import subprocess | |
import sys | |
try: | |
sys.path.append('/usr/local/munki/munkilib/') | |
import FoundationPlist | |
except ImportError as error: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import objc | |
from Foundation import NSBundle | |
IOKit_bundle = NSBundle.bundleWithIdentifier_('com.apple.framework.IOKit') | |
functions = [("IOServiceGetMatchingService", b"II@"), | |
("IOServiceMatching", b"@*"), | |
("IORegistryEntryCreateCFProperty", b"@I@@I"), | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This was all run from user space | |
# I haven't tested it with root | |
# ... but it didn't prompt for any permissions under userspace ^_^ | |
# Tested on 10.11.5 | |
import objc | |
from Foundation import NSBundle | |
EAP8021X_bundle = NSBundle.bundleWithPath_('/System/Library/PrivateFrameworks/EAP8021X.framework') | |
Security_bundle = NSBundle.bundleWithIdentifier_('com.apple.security') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import objc | |
from Foundation import NSBundle | |
IOKit = NSBundle.bundleWithIdentifier_('com.apple.framework.IOKit') | |
functions = [("IOServiceGetMatchingService", b"II@"), | |
("IOServiceMatching", b"@*"), | |
("IORegistryEntryCreateCFProperties", b"IIo^@@I"), | |
("IOPSCopyPowerSourcesByType", b"@I"), | |
("IOPSCopyPowerSourcesInfo", b"@"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Foundation import NSBundle | |
import objc, array | |
# from CoreFoundation import CFGetTypeID | |
Security = NSBundle.bundleWithPath_('/System/Library/Frameworks/Security.framework') | |
# First we need the CF TypeIDs to build some signatures | |
functions = [ | |
('SecKeychainGetTypeID', 'I'), | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import objc | |
from Foundation import NSBundle | |
IOKit_bundle = NSBundle.bundleWithIdentifier_('com.apple.framework.IOKit') | |
functions = [ | |
("IORegistryEntryCreateCFProperties", b"IIo^@II"), | |
("IOServiceMatching", b"@*"), | |
("IOServiceGetMatchingServices", b"II@o^I"), | |
("IOIteratorNext", b"II"), | |
] |
OlderNewer