Skip to content

Instantly share code, notes, and snippets.

Sean Wolter seanwolter

Block or report user

Report or block seanwolter

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
@seanwolter
seanwolter / gist:d5b17fb5f6019b04b763
Last active Aug 29, 2015
how Vokal's iOS team evaluates candidates
View gist:d5b17fb5f6019b04b763
At Vokal our engineering interview process is pretty simple. Before we get emotionally attached
to any candidate we meet with them for two coding challenges. Candidates solve these contrived
coding conundrums with members of our team. During the challenge candidates are encouraged to
check documentation, google for help, and talk to their proctor. The exercise is not about
brain teasers, but how candidates work with people to solve a novel problem. Most of our
challenges require manipulating basic data structures. The work is completed in a collaborative
text editor. Often the most difficult part for candidates is working without autocomplete.
We've often asked ourselves what we want from candidates in these programming exercises. In short,
we're trying our best to notice the idiosyncrasies of a good engineer. There are small things like,
@seanwolter
seanwolter / README.md
Last active Jan 4, 2017
Scripts we use on our Xcode Bots CI server
View README.md

The following plists and scripts are used on VOKAL's iOS build server. Thanks to the magic of launchd the backup script runs once a day and the dropoff script runs as needed. The dropoff script imports p12 files to the system keychain and moves provisioning files to correct folder.

To use these scripts put them somewhere safe, then put the plist files in /Library/LaunchDaemons Update the paths to the scripts, fix the ACCESS_KEY_ID and SECRET_ACCESS_KEY variables, and you're on your way.

If you have questions about Daemons and Agents look at Apple's technote: https://developer.apple.com/library/mac/technotes/tn2083/_index.html

More docs: https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.html#//apple_ref/doc/uid/10000172i-SW1-SW1

View gist:8531649
NSString *htmlString = @"<h1>Header</h1><h2>Subheader</h2><p>Some <em>text</em></p><img src='http://blogs.babble.com/famecrawler/files/2010/11/mickey_mouse-1097.jpg' width=70 height=100 />";
NSData *data = [htmlString dataUsingEncoding:NSUnicodeStringEncoding];
NSDictionary *attributes = @{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType };
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithData:data options:attributes documentAttributes:nil error:nil];
textView.attributedText = attributedString;
@seanwolter
seanwolter / gist:8445515
Created Jan 15, 2014
retain return value from invocation
View gist:8445515
NSString *selectorString = [NSString stringWithFormat:@"cellForSection%dRow%d:",indexPath.section,indexPath.row];
SEL cellSelector = NSSelectorFromString(selectorString);
if ([self respondsToSelector:cellSelector]) {
NSInvocation * invocation = [ NSInvocation new ];
NSMethodSignature *signature;
CFTypeRef result = NULL;
signature = [self.class instanceMethodSignatureForSelector:cellSelector];
invocation = [NSInvocation invocationWithMethodSignature:signature];
View gist:5622650
- (void)setupDecimalPadDone
{
self.keyboardShownObserver = [[NSNotificationCenter defaultCenter] addObserverForName:UIKeyboardWillShowNotification
object:nil
queue:[NSOperationQueue mainQueue]
usingBlock:^(NSNotification *note) {
self.goButton = [UIButton buttonWithType:UIButtonTypeCustom];
[[[[UIApplication sharedApplication] windows] lastObject] addSubview:self.goButton];
View enumerateSubviewsAndStealImages.m
- (void)enumerate:(UIView *)view withLibrary:(ALAssetsLibrary *)library
{
[[view subviews] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if ([obj isKindOfClass:NSClassFromString(@"PLCameraToggleButton")]) {
NSLog(@"wut");
UIImage *img = [obj imageForState:UIControlStateNormal];
if (img) {
[library saveImage:img
toAlbum:@"image for state"
withCompletionBlock:^(NSError *error) {
@seanwolter
seanwolter / gist:5246286
Last active Dec 15, 2015
git stuff I always forget
View gist:5246286
-------clone a project locally
git clone --recursive git@github.com:seanwolter/the_project_goes_here.git
-------push back to github:
git push origin master
-------add upstream to my repo
git remote add upstream git@github.com:vokalinteractive/the_project_goes_here.git
-------get back to an older commit
View gist:5222670
NSMutableArray *objects = [@[] mutableCopy];
NSObject *someObject = [NSObject new];
objects[objects.count] = object;
@seanwolter
seanwolter / gist:5214606
Last active Dec 15, 2015
set a button's background image in interface builder then stretch it in code
View gist:5214606
- (void)awakeFromNib
{
[self strechImageForControlState:UIControlStateNormal];
[self strechImageForControlState:UIControlStateDisabled];
[self strechImageForControlState:UIControlStateHighlighted];
[self strechImageForControlState:UIControlStateSelected];
}
- (void)strechImageForControlState:(UIControlState)controlState
{
View gist:5198852
/*
* SenTestingKit does not wait for blocks to finish by default so your test would simply complete
* as successful. You need to use a semaphore and keep the run loop going in order for the test
* to properly run.
*/
- (void)testGetSpots {
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
CLLocation location = [[CLLocation alloc] initWithLatitude:70.0 longitude:50.0];
[Spot spotsWithURLString:@"/spots" near:location parameters:[NSDictionary dictionaryWithObject:@"128" forKey:@"per_page"] block:^(NSArray *records) {
//sample assert
You can’t perform that action at this time.