Skip to content

Instantly share code, notes, and snippets.

Rasmus Sten pajp

Block or report user

Report or block pajp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pudquick
pudquick / uninstalld.md
Last active Aug 29, 2015
com.apple.uninstalld.uninstall in detail - how to read the authorization.plist / auth.db
View uninstalld.md

A study of the 'com.apple.uninstalld.uninstall' right

From /System/Library/Security/authorization.plist:

<key>com.apple.uninstalld.uninstall</key>
<dict>
    <key>class</key>
    <string>rule</string>
@jessepeterson
jessepeterson / app_map.c
Last active Feb 4, 2019
_CFPreferencesCopyApplicationMap example
View app_map.c
/* re-implementation of the behaviour that the /usr/bin/defaults application
* uses to read sandboxed preference data */
#include <CoreFoundation/CoreFoundation.h>
#define EX_BUNDLE_ID "com.apple.mail"
#define EX_KEY "JunkMailBehavior"
// undocumented, internal CFPreferences API call
extern CFDictionaryRef _CFPreferencesCopyApplicationMap(CFStringRef userName, CFStringRef hostName);
View authsvc_remade.py
from ctypes import CDLL, Structure, POINTER, c_char_p, c_size_t, c_void_p, c_uint32, pointer, byref
Security = CDLL('/System/Library/Frameworks/Security.framework/Versions/Current/Security')
class OpaqueType(Structure):
pass
OpaqueTypeRef = POINTER(OpaqueType)
AuthorizationRef = OpaqueTypeRef
@eins78
eins78 / hack.sh
Created Mar 31, 2012 — forked from erikh/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@erikh
erikh / hack.sh
Created Mar 31, 2012 — forked from DAddYE/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@pajp
pajp / getimg.py
Created Feb 27, 2011 — forked from stchris/getimg.py
Gets the current image of the day from NASA and sets it as the background. The summary / description text is written to the image.
View getimg.py
#!/usr/bin/env python
"""
getimg.py
Gets the current image of the day from NASA and sets it as the
background. The summary / description text is written
to the image.
Requires:
PIL (apt-get install python-imaging or pip install PIL)
You can’t perform that action at this time.