Skip to content

Instantly share code, notes, and snippets.

View d3signerd's full-sized avatar

Kellen Styler d3signerd

View GitHub Profile
@d3signerd
d3signerd / DefaultKey.swift
Created September 11, 2019 14:25
UserDefaults Wrapper with Generic Keys (swift)
//
// DefaultKey.swift
//
// Created by Kellen Styler on 9/9/19.
//
/// Default Key -Used by Defaults for keyed values
public struct DefaultKey<DefaultType> {
@d3signerd
d3signerd / BidirectionalCollection.swift
Created April 4, 2018 18:25
Swift Array next and previous Items made easier.
//
// BidirectionalCollection.swift
//
// Created by Kellen Styler
//
import Foundation
@d3signerd
d3signerd / AppLog.swift
Created April 8, 2016 17:21
Logging values in Swift on the fly
class func log( message:String = "WOOT!!" ) { print( message ) }
class func logValues( values:AnyObject... ) {
guard values.count > 1 else {
App.log( "\( values[0] )" )
return
}
var valueString:String = "\( values[0] )"
@d3signerd
d3signerd / SimpleNSObject.swift
Last active April 6, 2016 22:21
Simple Swift NSObject extension adding Device Type, Delay and Wait
//
// SimpleNSObject.swift
// Rise Alarm
//
// Created by Kellen Styler on 4/3/16.
// Copyright (c) 2016 Kellen Styler. All rights reserved.
//
@d3signerd
d3signerd / SimpleUICircle.h
Last active August 29, 2015 14:00
SimpleUICircle
//
// SimpleUICircle.h
//
// Created by ks on 3/30/14.
// Copyright (c) 2014 ks. All rights reserved.
//
#ifndef Rise_Alarm_PBDegreeToRadianMacros_h
#define Rise_Alarm_PBDegreeToRadianMacros_h
@d3signerd
d3signerd / SimpleUIPanGestureRecognizer.h
Created April 1, 2014 21:09
Extended UIPanGestureRecognizer
//
// SimpleUIPanGestureRecognizer.h
// Playback
//
// Created by KS on 4/1/14.
// Copyright (c) 2014 ks. All rights reserved.
//
@d3signerd
d3signerd / mx_arrows.scss
Created February 21, 2014 15:57
SCSS Arrow Mixins
/*
*
* Arrow Mixins
*
*/
@d3signerd
d3signerd / UIDevice+model.h
Last active December 25, 2015 23:39
iOS Device + Model An iOS Category that will provide the device model that works in iOS7 for iPhones, iPads, and iPods.
//
// UIDevice+model.h
//
// Created by Kellen Styler on 10/18/13.
//
#import <UIKit/UIKit.h>
@d3signerd
d3signerd / iOS Device Macros
Created September 26, 2012 14:27
Macros for iOS Devices: iPhone/iPod, iPhone 5 and iPad
/** BOOL: Detect if device is an iPad **/
#define IS_IPAD ( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad )
/** BOOL: Detect if device is an iPhone or iPod **/
#define IS_IPHONE ( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone )
/** BOOL: Detect if device is an iPhone 5 **/
#define IS_IPHONE_5 ( IS_IPHONE ? CGSizeEqualToSize([[UIScreen mainScreen] preferredMode].size,CGSizeMake(640, 1136)) ? YES : NO : NO )