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) deleteTweetsOlderThan:(int)inMaxToKeep | |
{ | |
NSArray* recent_ids = [RFTweet tweetIDsReversedForCollectionID:self.collectionID]; | |
if ([recent_ids count] > inMaxToKeep) { | |
FMDatabaseQueue *queue = … | |
[queue inDatabase:^(FMDatabase *db) { | |
if (inMaxToKeep > 0) { | |
NSNumber* last_tweet_id = [recent_ids objectAtIndex:inMaxToKeep - 1]; |
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
function runGitWithArgsForDocument(document, args) { | |
task = NSTask.alloc().init().autorelease(); | |
task.setCurrentDirectoryPath(document.fileURL().path()); | |
task.setLaunchPath('/usr/bin/git'); | |
task.setArguments(args); | |
task.launch(); | |
task.waitUntilExit(); | |
} | |
function documentWasOpened(document) { |
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: VoodooPad [82471] | |
Path: /tmp/*/VoodooPad.app/Contents/MacOS/VoodooPad | |
Identifier: com.flyingmeat.VoodooPad | |
Version: 5b1+ (3559) | |
Code Type: X86-64 (Native) | |
Parent Process: bash [81641] | |
Date/Time: 2012-02-06 20:27:13.681 -0800 | |
OS Version: Mac OS X 10.7.3 (11D50) | |
Report Version: 9 |
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)changeFont:(id)sender { | |
// by default, the bold menu is hooked up to NSFontManagers' - (void)addFontTrait:(id)sender; Start there to debug. | |
// isEditable , inputContext | |
for (TSGraphic *graphic in [[[self document] currentLayer] selectedGraphics]) { | |
if (![graphic isKindOfClass:[TSTextArea class]]) { | |
continue; |
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> | |
#import <QuartzCore/QuartzCore.h> | |
/* | |
This example will create around 15k stack frames on 10.7, which ends up crashing the process. | |
clang stackcrasher.m -o stackcrasher -framework Cocoa -framework QuartzCore -fobjc-arc | |
*/ |
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
function pageWasOpened(document, page) { | |
if ([page isRichText]) { | |
// custom insets per document! | |
var wc = [document mainWindowController]; | |
var tv = [wc textView]; | |
[tv setTextContainerInset:NSMakeSize(30, 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
Thread 1, Queue : com.apple.main-thread | |
#0 0x00007fff901296b6 in semaphore_wait_trap () | |
#1 0x00007fff8d85820a in _dispatch_semaphore_wait_slow () | |
#2 0x00007fff966027e8 in -[NSDocument _performFileAccessOnMainThread:usingBlock:] () | |
#3 0x00007fff966026ae in -[NSDocument performSynchronousFileAccessUsingBlock:] () | |
#4 0x00007fff96602eb2 in -[NSDocument _isLocatedByURL:becauseOfAutosavedContentsFile:] () | |
#5 0x00007fff9649f30e in -[NSDocumentController _documentForURL:] () | |
#6 0x00007fff9649f1e0 in -[NSDocumentController documentForURL:] () | |
#7 0x0000000108d76b74 in -[DUDocument writeSafelyToURL:ofType:forSaveOperation:error:] at /Volumes/srv/Users/gus/Dropbox/Code/DocumentForURLBlock/DocumentForURLBlock/DUDocument.m:42 | |
#8 0x00007fff96609a7b in __-[NSDocument saveToURL:ofType:forSaveOperation:completionHandler:]_block_invoke_8 () |
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
#0 0x00007fff901296b6 in semaphore_wait_trap () | |
#1 0x00007fff8d85820a in _dispatch_semaphore_wait_slow () | |
#2 0x00007fff8d94efb9 in -[NSXPCConnection sendMessage:waitForAck:] () | |
#3 0x00007fff8d91a202 in _CFXNotificationPost () | |
#4 0x00007fff8d92b758 in CFNotificationCenterPostNotification () | |
#5 0x00007fff8aee2086 in HIS_XPC_CFNotificationCenterPostNotification () | |
#6 0x00007fff8ec88e4b in BroadcastToolboxMessage () | |
#7 0x00007fff8ebf82c7 in SendMenuOpening () | |
#8 0x00007fff8ebfb8cd in DrawTheMenu () | |
#9 0x00007fff8ebfbdd7 in MenuChanged () |
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
10.6: | |
typedef signed __int32 cl_int2[2]; | |
10.7: | |
typedef union | |
{ | |
cl_int CL_ALIGNED(8) s[2]; | |
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) | |
__extension__ struct{ cl_int x, y; }; | |
__extension__ struct{ cl_int s0, s1; }; |
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 FMDrawContext : NSObject { | |
CGContextRef _cgContext; | |
} | |
+ (id)drawContextWithSize:(NSSize)s; | |
- (CGImageRef)CGImage __attribute__((cf_returns_retained)); | |
- (NSImage*)NSImage; | |
- (NSData*)dataOfType:(NSString*)uti; | |
- (void)drawInContextWithBlock:(void (^)())r; |