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
Filesystem Size Used Avail Capacity Mounted on | |
/dev/disk3s2 238Gi 172Gi 66Gi 73% / | |
devfs 128Ki 128Ki 0Bi 100% /dev | |
/dev/disk0s3 466Gi 366Gi 99Gi 79% /Volumes/Radagast | |
/dev/disk2s2 931Gi 714Gi 217Gi 77% /Volumes/Backup | |
/dev/disk1s3 16Gi 5.6Gi 10Gi 35% /Volumes/SMEAGOL | |
/dev/disk1s4 61Gi 48Gi 13Gi 79% /Volumes/Windows | |
map -hosts 0Bi 0Bi 0Bi 100% /net | |
map auto_home 0Bi 0Bi 0Bi 100% /home | |
/dev/disk4s2 4.0Ti 1.6Ti 2.4Ti 41% /Volumes/Aragorn |
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
func Match(pattern, name string) (matched bool, err os.Error) { | |
Pattern: | |
for len(pattern) > 0 { | |
var star bool | |
var chunk string | |
star, chunk, pattern = scanChunk(pattern) | |
if star && chunk == "" { | |
// Trailing * matches rest of string unless it has a /. | |
return strings.Index(name, "/") < 0, nil | |
} |
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
NSString *path = [[NSBundle mainBundle] pathForResource:@"Root" ofType:@"plist" inDirectory:@"Settings.bundle"]; | |
NSDictionary *rootDict = [NSDictionary dictionaryWithContentsOfFile:path]; | |
NSArray *prefSpecifiers = [rootDict objectForKey:@"PreferenceSpecifiers"]; | |
NSMutableDictionary *defaults = [NSMutableDictionary dictionaryWithCapacity:[prefSpecifiers count]]; | |
for (NSDictionary *item in prefSpecifiers) { | |
NSString *key = [item objectForKey:@"Key"]; | |
NSString *value = [item objectForKey:@"DefaultValue"]; | |
[defaults setObject:value forKey:key]; | |
} | |
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults]; |
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> | |
@interface NSRunLoop (NSRunLoop_S9Blocks) | |
- (void)runBlock:(void (^)(void))block; | |
@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
@interface NSArray (BinarySearch) | |
- (NSUInteger)indexOfObjectUsingBinarySearch:(id)obj; | |
@end | |
@implementation NSArray (BinarySearch) | |
// performs a binary search in the array, returning the index of the found object or NSNotFound | |
// this assumes the array is in sorted order according to the compare: selector | |
- (NSUInteger)indexOfObjectUsingBinarySearch:(id)obj { | |
NSRange range = NSMakeRange(0, [self count]); | |
while (range.length > 0) { |
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
Wed Jul 21 22:02:50 Mithrandir sandboxd[2949] <Notice>: transporter(2948) deny file-write* /Applications/.dat0b84.002 | |
Wed Jul 21 22:02:50 Mithrandir sandboxd[2949] <Notice>: transporter(2948) deny file-write* /Applications/.dat0b84.003 | |
Wed Jul 21 22:02:50 Mithrandir kernel[0] <Debug>: launchd[2948] Builtin profile: container (sandbox) | |
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
/* | |
* objc+blocks.h | |
* | |
* Created by Kevin Ballard on 1/13/10. | |
* | |
*/ | |
#import <objc/runtime.h> | |
enum { |
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
typedef long my_dispatch_once_t; | |
typedef void (^my_dispatch_block_t)(void); | |
void my_dispatch_once(my_dispatch_once_t *predicate, my_dispatch_block_t block); |
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 <UIKit/UIKit.h> | |
@interface ScaleTestViewController : UIViewController | |
@property (nonatomic, retain) IBOutlet UIView *scaleView; | |
@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
diff --git a/Session/TSSTPageView.m b/Session/TSSTPageView.m | |
index b4a5f55..3c994f9 100644 | |
--- a/Session/TSSTPageView.m | |
+++ b/Session/TSSTPageView.m | |
@@ -136,7 +136,7 @@ | |
firstPageImage, @"pageImage", | |
[testImageRep valueForProperty: NSImageLoopCount], @"loopCount",nil]; | |
frameDuration = [[testImageRep valueForProperty: NSImageCurrentFrameDuration] floatValue]; | |
- frameDuration = frameDuration > 0.01 ? frameDuration : 0.01; | |
+ frameDuration = frameDuration >= 0.01 ? frameDuration : 0.1; |