Skip to content

Instantly share code, notes, and snippets.


August "Gus" Mueller ccgus

View GitHub Profile
View gist:285384
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
View Letters Coding Style.txt
The Official Letters Coding Style Guide
By Gus Mueller
(now you know who to blame)
First, read Apple's Coding Guidelines for Cocoa:
And you should be familiar with the modern runtime for 64 bit apps in 10.6:
View gist:292136
// LBIMAPTestAppDelegate.m
// Created by August Mueller on 1/29/10.
// Copyright 2010 Flying Meat Inc. All rights reserved.
#import "LBIMAPTestAppDelegate.h"
#import "IPAddress.h"
View gist:323061
tell application "iTunes"
set songLocation to get location of current track
end tell
tell application "Finder"
open document file songLocation using application file "" of folder "Mail Downloads" of folder "Library" of folder "gus" of folder "Users" of disk "srv"
end tell
View Programmable Layers in Acorn.js
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);
ccgus / gist:633670
Created Oct 19, 2010
View gist:633670
#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];
View gist:1037099
tell application "Acorn"
set d to open "srv:Users:gus:Pictures:MyImage.acorn"
delay 0.5
tell document 1
flip canvas direction horizontal
flip canvas direction vertical
View gist:1126639
#import <Foundation/Foundation.h>
@interface FMFancyObject : NSObject {
@interface FMDeallocCheckerObjectHolder : NSObject {
__weak id _holdingObject;
View gist:1128125
cores=`sysctl -n machdep.cpu.core_count`
cores=`jstalk -e "$cores * 4"`
rm -rf /tmp/llvm
cd /tmp/
svn co llvm
cd llvm/tools
svn co clang
cd ..
View gist:1740787
FMDatabase *db = [FMDatabase databaseWithPath:dbPath];
[db executeUpdate:@"insert into namedparamtest values (:a, :b, :c, :d)" withParameterDictionary:dictionaryArgs];
FMDatabaseQueue *queue = [FMDatabaseQueue databaseQueueWithPath:dbPath];
[queue inDatabase:^(FMDatabase *db) {
You can’t perform that action at this time.