This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias cb='git branch | grep "*" | sed "s/* //" | awk '"'"'{printf $0}'"'"' | pbcopy' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Thanks to http://spin.atomicobject.com/2011/12/13/building-a-universal-framework-for-ios/ for the start | |
#To get this to work with a Xcode 6 Cocoa Touch Framework, create Framework | |
#Then create a new Aggregate Target. Throw this script into a Build Script Phrase on the Aggregate | |
#Tip: if you want the resulting framework to be the same name as your Framework, change the Aggregate's product name | |
SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${PRODUCT_NAME}.framework" | |
DEVICE_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PRODUCT_NAME}.framework" | |
UNIVERSAL_LIBRARY_DIR="${BUILD_DIR}/${CONFIGURATION}-iphoneuniversal" | |
FRAMEWORK="${UNIVERSAL_LIBRARY_DIR}/${PRODUCT_NAME}.framework" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
static UIImage *frameImage(CGSize size, CGFloat radians) { | |
UIGraphicsBeginImageContextWithOptions(size, YES, 1); { | |
[[UIColor whiteColor] setFill]; | |
UIRectFill(CGRectInfinite); | |
CGContextRef gc = UIGraphicsGetCurrentContext(); | |
CGContextTranslateCTM(gc, size.width / 2, size.height / 2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func application(application: UIApplication!, handleWatchKitExtensionRequest userInfo: [NSObject : AnyObject]!, reply: (([NSObject : AnyObject]!) -> Void)!) { | |
/* Synchronous | |
let response : (DateTime?, NSError?) = Network.fetchDateTime() | |
if let checkedDateTime = response.0 { | |
reply(["response": NSKeyedArchiver.archivedDataWithRootObject(checkedDateTime)]) | |
} | |
else if let checkedError = response.1 { | |
reply(["error": NSKeyedArchiver.archivedDataWithRootObject(checkedError)]) | |
} | |
else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Catch and use the model object*/ | |
@interface PresentedViewController() | |
@property (nonatomic, strong) SGYourActionModelObject *actionBlockObject; | |
@end | |
- (void)awakeWithContext:(id)context { | |
NSAssert([context isKindOfClass:[SGYourActionModelObject class]], @"Expected SGYourActionModelObject") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IBAction func viewDragged(sender: UIPanGestureRecognizer) { | |
let yTranslation = sender.translationInView(view).y | |
if (hasExceededVerticalLimit(topViewConstraint.constant)){ | |
totalTranslation += yTranslation | |
topViewConstraint.constant = logConstraintValueForYPosition(totalTranslation) | |
if(sender.state == UIGestureRecognizerState.Ended ){ | |
animateViewBackToLimit() | |
} | |
} else { | |
topViewConstraint.constant += yTranslation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ "${CONFIGURATION}" = "Release" ]; then | |
CFBundleVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}") | |
CFBundleVersion=$(($CFBundleVersion + 1)) | |
echo $CFBundleVersion | |
$PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" "$buildPlist" | |
$PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" "$INFOPLIST_FILE" | |
$PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" "${DWARF_DSYM_FOLDER_PATH}/${WRAPPER_NAME}.dSYM/Contents/Info.plist" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fastlane_version "1.46.0" | |
default_platform :ios | |
platform :ios do | |
desc "Get plist values" | |
lane :plist do | |
# plist_file_path = "AppProject/Info.plist" #works | |
# plist_file_path = sh("xcodebuild -project ../AppProject.xcodeproj -showBuildSettings -configuration Release | grep \"INFOPLIST_FILE\" | sed 's/[ ]*INFOPLIST_FILE = //'") #doesn't work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Must have imagemagick installed… | |
NUMBER_OF_PIXELS=$(compare -metric ae $1 $2 null: 2>&1) | |
identify -format "%[fx:$NUMBER_OF_PIXELS*100/(w*h)]" $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AppDelegate.swift | |
// | |
// Created by Jacob Van Order on 10/19/16. | |
// | |
// | |
import UIKit | |
//@UIApplicationMain |
OlderNewer