Skip to content

Instantly share code, notes, and snippets.

@swillits
swillits / NSTableView_Sorting_Animation.m
Last active September 13, 2015 17:14
Animated moving tables view rows while sorting
[itemsTableView beginUpdates];
double t = [NSDate timeIntervalSinceReferenceDate];
NSArray * oldArrangement = [[self.itemsArrayController.arrangedObjects copy] autorelease];
NSArray * newArrangement = nil;
NSUInteger count = oldArrangement.count;
// "live" indexes of where final objects are currently.
NSUInteger * liveIndexes = calloc(sizeof(NSUInteger), oldArrangement.count);
//
// OSXCrashReporterInfo.h
// OSXCrashReporterInfo
//
// Created by Seth Willits on 10/26/14.
// Copyright (c) 2014 Araelium Group. All rights reserved.
//
#import <CoreFoundation/CoreFoundation.h>
@swillits
swillits / gist:eda0e08f344ea975206a
Created November 5, 2014 22:39
How NSTextField determines how high the field should be based on the text font
ascender = 13.775909423828125
descender = -3.821929931640625
baseLineHeight = (descender.abs + 0.5).floor + (ascender + 0.5).floor
ascenderDelta = (baseLineHeight * 0.2 + 0.5).floor
fontHeight = ((ascenderDelta + baseLineHeight) + descender).ceil - descender.floor # 23
//
// main.m
// Blah
//
// Created by Seth Willits on 11/12/14.
// Copyright (c) 2014 Araelium Group. All rights reserved.
//
#import <Foundation/Foundation.h>
//
// main.m
// Blah
//
// Created by Seth Willits on 11/12/14.
// Copyright (c) 2014 Araelium Group. All rights reserved.
//
#import <Foundation/Foundation.h>
//
// main.m
// Probie
//
// Created by Seth Willits on 11/19/14.
// Copyright (c) 2014 Araelium Group. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
@swillits
swillits / Probie.mm
Last active September 13, 2015 17:15
//
// Probie.m
// Probie
//
// Created by Seth Willits, Keith Bauer on 11/19/14.
// Copyright (c) 2014 Araelium Group. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
@swillits
swillits / CHDiscoveryProtocols.m
Created December 9, 2014 23:56
CHDiscoveryProtocols.m
//
// CHDiscoveryProtocols.h
// CrashHandler
//
// Created by Seth Willits on 11/22/14.
// Copyright (c) 2014 Araelium Group. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol CHDiscoveryCenterProtocol;
[9:21pm] swillits: ThemsAllTook: here's my impression
[9:21pm] swillits: And you may have data to support some of this
[9:23pm] swillits: For a long time you didn't do anything but minecraft videos. I for one was surprised by the number of subscribers you got from those, just based on the fact that there were 50,000 other people doing the same thing at the time.
[9:23pm] swillits: After you did MC you did some other games, mostly serially in bulk.
[9:24pm] swillits: So the vast majority of your videos are about a relatively small number of games
[9:25pm] swillits: 34 terraria, easily over 150 are minecraft, 12 NecroDancer, 44 spelunky, etc
[9:26pm] swillits: That's a huge amount of content about very few things. The number of people who are going to watch *all* of those, is probably really really really really small. Most are only going to care about one of those games, and maybe watch several o f those videos.
[9:26pm] swillits: Compared to, like you said, doing one video each on 300 different games.
[9:27pm
@swillits
swillits / gist:c178206f0cdf362501c5
Last active August 29, 2015 14:14
Yosemite, GL Core Profile Extensions list
GL_ARB_blend_func_extended
GL_ARB_draw_buffers_blend
GL_ARB_draw_indirect
GL_ARB_ES2_compatibility
GL_ARB_explicit_attrib_location
GL_ARB_gpu_shader_fp64
GL_ARB_gpu_shader5
GL_ARB_instanced_arrays
GL_ARB_internalformat_query
GL_ARB_occlusion_query2