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
The crash stack: | |
#0 0x7fff88084314 in objc_msgSend_vtable13 | |
#1 0x7fff80380678 in _Block_object_assign | |
#2 0x10018b0c3 in __copy_helper_block_1037 at LBServer.m:91 | |
#3 0x7fff8038044a in _Block_copy_internal | |
#4 0x7fff80380526 in _dispatch_Block_copy | |
#5 0x7fff803a1bff in dispatch_async | |
#6 0x10018adac in -[LBServer connectUsingBlock:] at LBServer.m:83 | |
#7 0x100003d1d in -[LAAppDelegate connectToDefaultServerAndPullMail] at LAAppDelegate.m:178 |
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
The Official Letters Coding Style Guide | |
======================================= | |
By Gus Mueller | |
(now you know who to blame) | |
First, read Apple's Coding Guidelines for Cocoa: | |
http://goo.gl/eY7a | |
And you should be familiar with the modern runtime for 64 bit apps in 10.6: |
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
// | |
// LBIMAPTestAppDelegate.m | |
// LBIMAPTest | |
// | |
// Created by August Mueller on 1/29/10. | |
// Copyright 2010 Flying Meat Inc. All rights reserved. | |
// | |
#import "LBIMAPTestAppDelegate.h" | |
#import "IPAddress.h" |
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 "iTunes" | |
set songLocation to get location of current track | |
end tell | |
tell application "Finder" | |
open document file songLocation using application file "Capo.app" of folder "Mail Downloads" of folder "Library" of folder "gus" of folder "Users" of disk "srv" | |
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
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); |
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> | |
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 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 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 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 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) { |
OlderNewer