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
property querylist : {"CharacterPalette"} | |
property app_is_up : missing value | |
set app_is_up to false | |
set frontapp to getFrontApplication() | |
repeat with i in querylist | |
set the_ps to paragraphs of (do shell script "/bin/ps -acx") | |
tid("/") | |
repeat with _line in the_ps | |
if _line is "" then | |
else |
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" | |
if exists (process "Keyboard Viewer") then | |
click (process "Keyboard Viewer"'s window 1's buttons whose subrole is "AXCloseButton") | |
else | |
do shell script "/usr/local/bin/keyboardViewer" | |
end if | |
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
+// Contents of sourceFiles are SBObjects (i.e. it's technically an SBElementArray) | |
+ NSMutableArray *sourceFiles = [[NSMutableArray alloc] initWithCapacity:[files count]]; | |
+ for (NSString *path in files) { | |
+ [sourceFiles addObject:[[finder items] objectAtLocation:path]]; | |
+ } | |
+ FinderItem *destinationItem = [[finder items] objectAtLocation:destination]; | |
+ | |
+ if (copy) { | |
+ [(SBObject *)sourceFiles duplicateTo:destinationItem replacing:NO routingSuppressed:NO exactCopy:YES]; | |
+ } else { |
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
a = ['a','b','c','d'] | |
b = ['1','2','3','b'] | |
for aLet in a: | |
for bLet in b: | |
if aLet is bLet: | |
print 'they are the same!' |
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
- (void)setObjectValue:(id)value { | |
if ([value isKindOfClass:[QSObject class]]) { | |
[self setRepresentedObject:value]; | |
} | |
} |
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
1Password Plugin ** | |
Abracadabra Triggers | |
AcidSearch Queries | |
Address Book Plugin ** | |
AirPort Module | |
Apple Mail Plugin ** | |
Automator Plugin ** | |
BBEdit Module | |
Backpack Module | |
Bluetooth Module |
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
- (NSDictionary *)infoRecord { | |
NSString *path = [self validSingleFilePath]; | |
if (!path) | |
return nil; | |
NSDictionary *dict; | |
if (dict = [self objectForCache:@"QSItemInfoRecord"]) | |
return dict; | |
/* Try to get information for this file */ |
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
Process: Python [86444] | |
Path: /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python | |
Identifier: Python | |
Version: 2.5.6 (2.5.6a0) | |
Code Type: X86 (Native) | |
Parent Process: Plex Media Server [86443] | |
User ID: 501 | |
PlugIn Path: /Users/USER/Library/Application Support/Plex Media Server/*/Framework.bundle/Contents/Resources/Platforms/MacOSX/i386/Frameworks/libxml2.2-osx.dylib | |
PlugIn Identifier: libxml2.2-osx.dylib |
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
$ ls -l /System/Library/Frameworks/Python.framework/Versions | |
drwxr-xr-x 6 root wheel 204 21 Jun 00:23 2.3 | |
drwxr-xr-x 11 root wheel 374 2 Nov 07:20 2.5 | |
drwxr-xr-x 11 root wheel 374 2 Nov 07:21 2.6 | |
drwxr-xr-x 11 root wheel 374 2 Nov 07:21 2.7 | |
lrwxr-xr-x 1 root wheel 3 22 Jul 03:25 Current -> 2.7 | |
$ python | |
Python 2.7.2 (default, Jun 20 2012, 16:23:33) |
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
patrick$ cat a.php | |
<?php | |
echo (TRUE ? "a" : (TRUE ? "b" : "c"))."\n"; | |
?> | |
patrick$ php a.php | |
a |
OlderNewer