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
tell application "Finder" | |
open trash | |
end tell |
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
tell application "Finder" | |
empty trash | |
end tell |
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
tell application "System Events" | |
start current screen saver | |
end tell |
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
targetName="..." | |
# Thanks to http://stackoverflow.com/a/13871762/75245 for help with the parsing. | |
relativeInfoPlistLocation=`/usr/bin/xcrun xcodebuild -showBuildSettings -target ${targetName} 2>/dev/null | grep "INFOPLIST_FILE" | sed 's/[ ]*INFOPLIST_FILE = //'` | |
absoluteInfoPlistLocation=${PROJECT_DIR}/$relativeInfoPlistLocation | |
version=`/usr/libexec/Plistbuddy -c 'Print :CFBundleShortVersionString' $absoluteInfoPlistLocation` |
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 <Foundation/Foundation.h> | |
extern NSString * const PXProtocolMethodListMethodNameKey; | |
extern NSString * const PXProtocolMethodListArgumentTypesKey; | |
NSArray *px_allProtocolMethods(Protocol *protocol); |
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
NSButton *closeButton = [self standardWindowButton:NSWindowCloseButton]; | |
NSView *themeFrame = [closeButton superview]; | |
CGFloat buttonYOrigin = NSMaxY(themeFrame.frame)-34; | |
//Alter the button frames | |
NSRect closeFrame = closeButton.frame; | |
closeFrame.origin.y = buttonYOrigin; | |
closeButton.frame = closeFrame; |
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
@interface NSArray (PXArrayAdditions) | |
- (id)initWithObject:(id)object; | |
- (id)firstObject; | |
@end |
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 <Cocoa/Cocoa.h> | |
@interface NSMutableDictionary (PXDictionaryAdditions) | |
- (BOOL)setObjectOrNull:(id)anObject forKey:(id)aKey; | |
@end |