Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
set -e
function error { echo -e "[Error] $*"; exit 1; }
function warn { echo -e "[Warning] $*"; }
warn "This installer of Home Assistant is for experts only!"
warn ""
warn "This method is not supported by the Home Assistant team."
zwave:
usb_path: /dev/ttyACM0
network_key: *NEED KEY FOR SECURE NODES*
- (void)presentViewController:(UIViewController *)viewControllerToPresent
animated:(BOOL)flag
animatorClass:(Class)animatorClass
completion:(void (^)(void))completion;
- (void)presentViewController:(UIViewController *)viewControllerToPresent
animated:(BOOL)flag
animator:(id<UIViewControllerAnimatedTransitioning>)animator
completion:(void (^)(void))completion;

Hey Mattt, Jerry here, we met at WWDC, and then again at Heroku. I thought I'd ping you and let you know some of the things I've found with AFIncrementalStore. In short, we've had some painful instability as our app has grown. We've seen crashes like EXC_BAD_ACCESS 0x13 (I made that specific number up, but you get the point) and random Unrecognized Selector exceptions in code that very obviously isn't sending incorrect messages -- all the hallmarks of memory corruption. I was more and more confident that we had some threading issues, and they were jeopardizing the success of this project. Maybe it was too early to use AFIS in a production app, but, why not live dangerously!?

Anyhow, I don't write to you with only doom and gloom -- after chaining myself to my laptop for 5 days or so, I believe I've come out on top. I've refactored the shit out of AFIS, namely reorganizing to ensure thread safety. I may try to submit a pull request or 12, but it's going to be a bit heavy, and I thought it might be useful to

//
// SwiftMath.swift
// SMPageControlFramework
//
// Created by Jerry Jones on 6/7/14.
// Copyright (c) 2014 Spaceman Labs, Inc. All rights reserved.
//
import Foundation

#Broken Rendering Bad swift code that (weirdly) compiles fine, seems to break IB live rendering.

Zipped framework and application examples below.

http://cl.ly/1l1a353F2b0P

// Playground - noun: a place where people can play
import UIKit
enum SMPageControlVerticalAlignment {
case Top
case Middle
case Bottom
}
//
// SwitchTest.swift
// SMPageControlFramework
//
// Created by Jerry Jones on 6/6/14.
// Copyright (c) 2014 Spaceman Labs, Inc. All rights reserved.
//
import UIKit
Alloc UIView
UIView Alloc's Dynamic Animator
- Alloc's Gravity Behavior
- Assigns gravity to animator
- Calls CMMotionManager startDeviceMotionUpdatesToQueue
-- Block captures gravity object
UIView deallocates
Dynamic Animator Deallocates
startDeviceMotionUpdatesToQueue callback is called
captured gravity property is changed
//
// NSObject+TypeValidation.h
//
// Created by Jerry Jones on 5/15/12.
// Copyright (c) 2012 Spaceman Labs, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
BOOL CFTypeIsNull(id object);