I hereby claim:
- I am grahamgilbert on github.
- I am grahamgilbert (https://keybase.io/grahamgilbert) on keybase.
- I have a public key ASDdB4_Tt3Pfh7-qvEoOSZCAfoUJoxgTtv8YoyA3MTGHdwo
To claim this, I am signing this object:
| #!/usr/bin/python | |
| """ | |
| Removes cached apple updates that are older than 24 hours | |
| """ | |
| import datetime | |
| import os | |
| import shutil | |
| import sys |
| # Please comment-out unneeded updates as necessary (as this would add multiple GBs to your image) | |
| # It is possible not all of these are 10.6-compatible, please test as applicable | |
| # via https://github.com/thisisdave/instaCATS/blob/master/printers.catalog | |
| # and https://raw.github.com/n8felton/Mac-OS-X-Scripts/master/InstaDMG/CatalogFiles/printers.catalog | |
| Apple Updates: | |
| Brother Printer Drivers 2.9 for OS X http://support.apple.com/downloads/DL894/en_US/BrotherPrinterDrivers2.9.dmg sha1:ced12cc349a6990094796395f8da579ba07ec5b7 | |
| Canon Printer Drivers v2.9 for OS X http://support.apple.com/downloads/DL899/en_US/CanonPrinterDrivers2.9.dmg sha1:d6dc46eeaf3d976966fa6c413b817314df867b38 | |
| Epson Printer Drivers v2.11 for OS X http://support.apple.com/downloads/DL1398/en_US/EPSONPrinterDrivers2.11.dmg sha1:40861b8d791ecb692612e9e2aff698a3cfbae982 | |
| FujiXerox Printer Drivers v2.3 for OS X http://support.apple.com/downloads/DL904/en_US/FujiXeroxPrinterDrivers.dmg sha1:e6275c6b766dc657255d8356766c8f5f3949a634 |
I hereby claim:
To claim this, I am signing this object:
| select username,uuid,uid,gid,description,directory, case WHEN uuid in (SELECT users.uuid FROM user_groups INNER JOIN users ON user_groups.uid = users.uid WHERE user_groups.gid = 80) THEN "admin" ELSE "standard" END AS user_type from users; |
| import sal.plugin | |
| import requests | |
| from django.conf import settings | |
| SETTINGS = settings.PROFILE_SETTINGS | |
| class Profileenforcer(sal.plugin.Widget): | |
| description = 'Enforces profiles via MDM' |
| #!/usr/bin/python | |
| import base64 | |
| import plistlib | |
| import errno | |
| import os | |
| def mkdir_p(path): | |
| try: | |
| os.makedirs(path) |
Sal has a REST API. You will need to create an API key before using it. You should send your private key and public key as headers (publickey and privatekey). Some actions can only be performed by API keys that have been marked as read / write in Sal.
Sal's API will generally return a response similar to the following:
{"count":362,"next":"https://sal.example.com/api/conditions/?condition=machine_type&page=2","previous":null,"results":[...]}| <?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>PayloadType</key> | |
| <string>com.apple.applicationaccess.new</string> | |
| <key>PayloadVersion</key> |
| #!/bin/bash | |
| /bin/launchctl unload /System/Library/LaunchDaemons/com.apple.locationd.plist | |
| uuid=`/usr/sbin/system_profiler SPHardwareDataType | grep "Hardware UUID" | cut -c22-57` | |
| /usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd.$uuid LocationServicesEnabled -int 1 | |
| /usr/sbin/chown -R _locationd:_locationd /var/db/locationd | |
| /bin/launchctl load /System/Library/LaunchDaemons/com.apple.locationd.plist | |
| /usr/sbin/systemsetup -setusingnetworktime on |
| <?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>Label</key> | |
| <string>com.grahamgilbert.crypt.launcher</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/usr/local/crypt/Crypt.app/Contents/MacOS/Crypt</string> | |
| </array> |