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 | |
PLATFORMPATH="/Applications/Xcode.app/Contents/Developer/Platforms" | |
TOOLSPATH="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin" | |
export IPHONEOS_DEPLOYMENT_TARGET="8.0" | |
pwd=`pwd` | |
findLatestSDKVersion() | |
{ | |
sdks=`ls $PLATFORMPATH/$1.platform/Developer/SDKs` |
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 Foundation | |
/// Find first differing character between two strings | |
/// | |
/// :param: s1 First String | |
/// :param: s2 Second String | |
/// | |
/// :returns: .DifferenceAtIndex(i) or .NoDifference | |
public func firstDifferenceBetweenStrings(s1: NSString, s2: NSString) -> FirstDifferenceResult { |
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
var validators = { | |
password: function(pass) { | |
return /[0-9]/.test(pass) && pass.length > 10 | |
} | |
} | |
var validate = function(el){ | |
return validators[el.getAttribute('data-validator')](el.value) | |
} |