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)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 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
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 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
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 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) 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 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
OLD: | |
FMDatabase *db = [FMDatabase databaseWithPath:dbPath]; | |
… | |
[db executeUpdate:@"insert into namedparamtest values (:a, :b, :c, :d)" withParameterDictionary:dictionaryArgs]; | |
NEW: | |
FMDatabaseQueue *queue = [FMDatabaseQueue databaseQueueWithPath:dbPath]; | |
… | |
[queue inDatabase:^(FMDatabase *db) { |
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
#!/bin/sh | |
cores=`sysctl -n machdep.cpu.core_count` | |
cores=`jstalk -e "$cores * 4"` | |
rm -rf /tmp/llvm | |
cd /tmp/ | |
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm | |
cd llvm/tools | |
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang | |
cd .. |
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
#import <Foundation/Foundation.h> | |
@interface FMFancyObject : NSObject { | |
} | |
@end | |
@interface FMDeallocCheckerObjectHolder : NSObject { | |
__weak id _holdingObject; |
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
tell application "Acorn" | |
set d to open "srv:Users:gus:Pictures:MyImage.acorn" | |
delay 0.5 | |
tell document 1 | |
flip canvas direction horizontal | |
undo | |
flip canvas direction vertical | |
undo |
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
#import <Foundation/Foundation.h> | |
int main (int argc, const char * argv[]) { | |
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; | |
int *x = malloc(sizeof(int)); | |
void *foo = x; | |
NSMutableData *d = [NSMutableData dataWithBytesNoCopy:foo length:sizeof(int) freeWhenDone:NO]; | |
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
function main() { | |
var doc = [Acorn open:"/Volumes/srv/Users/gus/Dropbox/AcornStuff/more junk.acorn"]; | |
var layer = [doc firstLayerNamed:"Background"]; | |
var canvasSize = [doc canvasSize]; | |
var inset = 40; | |
var image = [[[NSImage alloc] initWithSize:canvasSize] autorelease]; | |
var canvasBounds = NSMakeRect(0, 0, 0, 0); | |
canvasBounds.size = canvasSize; | |
var pageBounds = NSMakeRect(inset, -inset, canvasSize.width - inset * 2, canvasSize.height); |