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
ccgus / gist:bc20a40d5577aef73a7d
Created Nov 3, 2014
Stack Trace w/ Dropbox extension
View gist:bc20a40d5577aef73a7d
Process: Acorn [1635]
Path: /Users/USER/*/Acorn.app/Contents/MacOS/Acorn
Identifier: com.flyingmeat.Acorn4
Version: 4.5.1 (8996)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Acorn [1635]
User ID: 501
Date/Time: 2014-11-01 20:32:18.860 -0500
@ccgus
ccgus / gist:27a76290cd12f6569922
Created Oct 29, 2014
Dropbox extension go boom
View gist:27a76290cd12f6569922
Thread 7:: Dispatch queue: com.apple.NSXPCConnection.user.com.getdropbox.dropbox.garcon.apple-extension-service
0 libsystem_kernel.dylib 0x00007fff8b6b652e mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff8b6b569f mach_msg + 55
2 com.apple.CoreServices.CarbonCore 0x00007fff844c0aa9 _scsclient_CacheableGetDataWithStringKey + 195
3 com.apple.CoreServices.CarbonCore 0x00007fff844c09dd RemoteCacheable::GetWithStringKey(unsigned int, char const*, unsigned long*, unsigned int*) + 75
4 com.apple.CoreServices.CarbonCore 0x00007fff844c08ab _CSGetNamedData + 119
5 com.apple.CoreFoundation 0x00007fff8c962ec0 _CFPropertyListCopyShared + 176
6 com.apple.CoreFoundation 0x00007fff8ca7684d CFBundleCopyLocalizedStringForLocalization + 397
7 com.apple.Foundation 0x00007fff917dd315 -[NSBundle localizedStringForKey:value:table:] + 64
8 com.apple.Foundation 0x00007fff918af07e -[NSError(NSErrorPrivate) _cocoaErrorString:fromBundle:tableName:] + 693
View gist:a1891cd963c365bc3cef
SInt32 TSSystemVersion(void) {
static dispatch_once_t once;
static int TSSystemVersionVal = 0x00;
dispatch_once(&once, ^{
NSDictionary *d = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
NSString *prodVersion = [d objectForKey:@"ProductVersion"];
View gist:40b91ce357a4456561ad
var filter = [JSTQuickCIFilter quickFilterWithKernel:"""
bool isOdd(int v) {
float dividend = float(v) / 2.0;
return dividend != floor(dividend);
}
vec4 hsvToRgb(vec4 hsv) {
float h = hsv.r;
View gist:9b865c265f7cd2c09c2b
$ codesign -vd Acorn.app
Executable=/Users/gus/Downloads/Archives/Acorn.app/Contents/MacOS/Acorn
Identifier=com.flyingmeat.Acorn4
Format=bundle with Mach-O thin (x86_64)
CodeDirectory v=20200 size=43565 flags=0x0(none) hashes=2171+3 location=embedded
Signature size=8518
Timestamp=Jul 14, 2014, 12:47:45 PM
Info.plist entries=35
TeamIdentifier=WZCN9HJ4VP
Sealed Resources version=2 rules=12 files=452
View gist:7b04e62357a3d36f5ec7
for (CIFaceFeature *f in features)
{
NSLog(NSStringFromRect(f.bounds));
// Should be NSLog(@"%@", NSStringFromRect(f.bounds)); for security reasons
if (f.hasLeftEyePosition)
NSLog("Left eye %g %g", f.leftEyePosition.x. f.leftEyePosition.y);
// Missing @ before opening quote
// Should be f.leftEyePosition.x,
@ccgus
ccgus / gist:8327134
Created Jan 9, 2014
NSString isEqual: problems
View gist:8327134
static Boolean MOObjectEqual(const id value1, const id value2) {
debug(@"(id)value1: '%@'", NSStringFromClass([(id)value1 class]));
debug(@"(id)value2: '%@'", NSStringFromClass([(id)value2 class]));
debug(@"[(id)value1 isKindOfClass:[NSString class]]: %d", [(id)value1 isKindOfClass:[NSString class]]);
debug(@"[(id)value2 isKindOfClass:[NSString class]]: %d", [(id)value2 isKindOfClass:[NSString class]]);
return (Boolean)[(id)value1 isEqual:(id)value2];
}
View gist:6392658
var list = """George Washington
John Adams
Thomas Jefferson
James Madison
James Monroe
John Quincy Adams
Andrew Jackson
Martin Van Buren
William Henry Harrison
John Tyler
View gist:6384865
SInt32 TSSystemVersion(void) {
static dispatch_once_t once;
static int TSSystemVersionVal = 0x00;
dispatch_once(&once, ^{
NSDictionary *d = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
NSString *prodVersion = [d objectForKey:@"ProductVersion"];
@ccgus
ccgus / gist:6324222
Created Aug 23, 2013
Custom SQLite Functions
View gist:6324222
[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(nil, (const char*)a, kCFStringEncodingUTF8);
CFStringRef bs = CFStringCreateWithCString(nil, (const char*)b, kCFStringEncodingUTF8);
sqlite3_result_int(context, UTTypeConformsTo(as, bs));
You can’t perform that action at this time.