Skip to content

Instantly share code, notes, and snippets.

August "Gus" Mueller ccgus

Block or report user

Report or block ccgus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ccgus / Xcode crash report
Created Feb 23, 2013
Xcode crash report whoa
View Xcode crash report
Application Specific Information:
ProductBuildVersion: 4H127
ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilder/IDEInterfaceBuilder-3084/Framework/Connections/Interface/IBConnectionPopUpMenu.m:388
Details: Need a menu.
Function: NSMenuItem *IBPopUpConnectionMenuWithMenuItems(NSArray *, NSMenuItem *, NSEvent *, NSRect, BOOL, NSSet *, CGFloat, NSWindow *, NSColor *, NSColor *, NSColor *, NSColor *, id<IBConnectionPopUpMenuDelegate>)
Thread: <NSThread: 0x40030a1e0>{name = (null), num = 1}
Hints: None
0 0x000000010c77b249 -[IDEAssertionHandler handleFailureInFunction:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
1 0x000000010ba2ec65 _DVTAssertionHandler (in DVTFoundation)
ccgus / gist:4961749
Created Feb 15, 2013
replacing NSImage reps
View gist:4961749
NSImage *iRep = [NSImage imageNamed:[fileName stringByDeletingPathExtension]];
if (iRep) {
NSImage *ni = [[NSImage alloc] initByReferencingFile:output];
for (NSImageRep *r in [[iRep representations] copy]) {
[iRep removeRepresentation:r];
ccgus / gist:4544658
Created Jan 16, 2013
View gist:4544658
#import <Cocoa/Cocoa.h>
@interface FMSimpleBlockAnimation : NSAnimation {
void (^_animationBlock)(float t);
- (void)animateWithBlock:(void(^)(float t))block;
ccgus / gist:3805275
Created Sep 29, 2012
View gist:3805275
in your VPWebExportScript page, you can have this which will do simple replacements:
function webExportWillWriteHTMLForItem(contextDictionary, item, fileName, mutableHTMLString) {
mutableHTMLString.replaceOccurrencesOfString_withString_options_range_("<p>", "<div>", 0, NSMakeRange(0, mutableHTMLString.length()));
mutableHTMLString.replaceOccurrencesOfString_withString_options_range_("</p>", "</div>", 0, NSMakeRange(0, mutableHTMLString.length()));
return mutableHTMLString;
View gist:3746177
/***** GCL Generated File *********************/
/* Automatically generated file, do not edit! */
#include <OpenCL/opencl.h>
extern void (^seedFill_kernel)(const cl_ndrange *ndrange, cl_uchar4* input, cl_uint4 inputSize, cl_uchar* output, cl_int2 fillCenter, cl_uchar4 targetColor, cl_int tolerance);
extern void (^BlendFillImage_kernel)(const cl_ndrange *ndrange, cl_uchar4* baseImage, cl_uchar* mask, cl_uchar4* fillImage, cl_uint2 fillImageSize, cl_uchar4* outputImage, cl_uint elementsPerRow);
extern void (^AntiAliasMaskAndBlendFillImage_kernel)(const cl_ndrange *ndrange, cl_uchar4* baseImage, cl_uchar* mask, cl_uchar4* fillImage, cl_uint2 fillImageSize, cl_uchar4* outputImage, cl_uint elementsPerRow);
extern void (^AntiAliasMask_kernel)(const cl_ndrange *ndrange, cl_uchar* mask);
ccgus / gist:3716936
Last active Oct 10, 2015
Gestalt(gestaltSystemVersion, &v); replacement
View gist:3716936
if ((TSSystemVersion() >= 0x1074) || (TSSystemVersion() < 0x1070)) {
// hurray, no stupid CoreImage stack crasher for lots of images being composited together!
SInt32 TSSystemVersion(void) {
static dispatch_once_t once;
ccgus / gist:3429274
Created Aug 22, 2012
View gist:3429274
[[jstalk jsController] loadFrameworkWithName:@"SecurityInterface"];
var paic = [[SFPasswordAssistantInspectorController alloc] init]
[paic showPasswordAssistantPanel:nil]
var assistWindow = [paic valueForKey:@"passwordAssistantPanel"];
[assistWindow center];
ccgus / gist:3238464
Created Aug 2, 2012
FMDB custom functions
View gist:3238464
[db makeFunctionNamed:@"UTTypeConformsTo" maximumArguments:2 withBlock:^(sqlite3_context *context, int argc, sqlite3_value **argv) {
if (sqlite3_value_type(argv[0]) == SQLITE_TEXT) {
const unsigned char *a = sqlite3_value_text(argv[0]);
const unsigned char *b = sqlite3_value_text(argv[1]);
CFStringRef as = CFStringCreateWithCString(0x00, (const char*)a, kCFStringEncodingUTF8);
CFStringRef bs = CFStringCreateWithCString(0x00, (const char*)b, kCFStringEncodingUTF8);
sqlite3_result_int(context, UTTypeConformsTo(as, bs));
ccgus / FMDrawContext
Created Jul 16, 2012
Sketching up a little drawable context guy.
View FMDrawContext
@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;
View gist:2956412
typedef signed __int32 cl_int2[2];
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; };
You can’t perform that action at this time.