I hereby claim:
- I am mrala on github.
- I am alarm (https://keybase.io/alarm) on keybase.
- I have a public key ASBFpz-X1-lEz_vCF_T1xAqqtF-utu6kVZj3CN8Z2V26HAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#Wilfred Opening Quotes
##Season 1 ###Episode 1
Sanity and happiness are an impossible combination.
###Episode 2
Trust thyself only, and another shall not betray thee.
# This code must run as root | |
# We're mixing ObjC and C-style dylibs, so this is really fun | |
# The only reason we're doing this is that the OS is _really really_ picky about trying to do | |
# ANYTHING with the CoreStorage Family Properties CFDictionary that's in-memory EXCEPT for | |
# making a mutable copy of it. | |
# Once we've done that, we can bring it into pyObjC to play nicely with the data. | |
import objc |
*.pyc |
#!/usr/bin/python | |
# As written, this requires the following: | |
# - OS X 10.6+ (may not work in 10.10, haven't tested) | |
# - python 2.6 or 2.7 (for collections.namedtuple usage, should be fine as default python in 10.6 is 2.6) | |
# - pyObjC (as such, recommended to be used with native OS X python install) | |
# Only tested and confirmed to work against 10.9.5 | |
# Run with root |
<?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>DestroyFVKeyOnStandby</key> | |
<false/> | |
<key>PayloadDisplayName</key> |
version=$(/usr/bin/defaults read "/Applications/Microsoft Office 2011/Microsoft Word.app/Contents/Info" CFBundleShortVersionString) | |
if [ ${version:-0} \< 14.4.6 ]; then | |
echo "installed version is" $version", need to install" | |
exit 0 | |
else | |
echo "installed version is" $version", do not install" | |
exit 1 | |
fi |
loggedInUser=`python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");'` |