This file contains hidden or 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
io_service_t io_service(const char *name, BOOL wantBuiltIn) { | |
io_iterator_t iterator = IO_OBJECT_NULL; | |
mach_port_t master_port = IO_OBJECT_NULL; | |
io_service_t service = IO_OBJECT_NULL; | |
if (KERN_SUCCESS != IOMasterPort(MACH_PORT_NULL, &master_port)) { | |
return IO_OBJECT_NULL; | |
} | |
CFMutableDictionaryRef matchingDict = IOBSDNameMatching(master_port, 0, name); |
This file contains hidden or 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
scutil | |
> n.add State:/Network/Interface | |
> n.watch | |
> notification callback (store address = 0x7feb1bc0ab80). | |
8:24:49.159 changedKey [0] = State:/Network/Interface | |
notification callback (store address = 0x7feb1bc0ab80). | |
8:25:03.313 (+14.153) changedKey [0] = State:/Network/Interface |
This file contains hidden or 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
using terms from application "iChat" | |
on message received message from theBuddy for textChat | |
set whoDidIt to full name of theBuddy | |
set buddyIcon to image of theBuddy | |
tell application "System Events" | |
set frontApp to name of first application process whose frontmost is true | |
end tell | |
tell application frontApp | |
set window_name to name of front window | |
end tell |
This file contains hidden or 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
property _timeMachineDiskName : "Backup of Babs" | |
property _diskNamesToTryToEject : {"MaryMedia", "MaryBackup+", "ShirleyClone", "ShirleyLion", "bzzt"} | |
property _growlApplication : "Go home" | |
property _growlNotification : "Status" | |
on _notify(_title, _description) | |
tell application id "com.Growl.GrowlHelperApp" to notify with name _growlNotification title _title description _description application name _growlApplication identifier _growlNotification | |
end _notify |
This file contains hidden or 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
sudo mkdir -p /Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app/Contents/MacOS | |
sudo touch /Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app/Contents/MacOS/GrowlHelperApp |
This file contains hidden or 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
- (void)scrollWheel:(NSEvent *)theEvent | |
{ | |
if([theEvent modifierFlags] & NSShiftKeyMask) | |
[super scrollWheel:theEvent]; | |
else | |
{ | |
CGEventRef sourceEvent = [theEvent CGEvent]; | |
CGEventRef cgEvent = CGEventCreateCopy(sourceEvent); | |
if(cgEvent) | |
{ |