Skip to content

Instantly share code, notes, and snippets.

View mishagray's full-sized avatar

Michael Gray mishagray

View GitHub Profile
@mishagray
mishagray / Podfile
Last active August 29, 2015 14:19
Sample Frameworks Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.3'
use_frameworks!
pod 'FutureKit'
pod 'AlamoFire'
@mishagray
mishagray / Example
Last active August 29, 2015 14:19
Check Swift Pods Manifest.Lock script
diff "DummyProjectForSwiftPods/Podfile.lock" "DummyProjectForSwiftPods/Pods/Manifest.lock" > /dev/null
if [[ $? != 0 ]] ; then
cat << EOM
error: The sandbox is not in sync with the DummyProjectForSwiftPods Podfile.lock. Run 'pod install' from the DummyProjectForSwiftPods directory or update your CocoaPods installation.
EOM
exit 1
fi
@mishagray
mishagray / md5_comparison
Created January 11, 2015 23:13
Comparing the speed difference between NSMutableData and <CUnsignedChar>.alloc
/* OS X Swift "Command Line Tool" */
import Foundation
extension NSData {
func jstnMD5() -> String {
let result = NSMutableData(length: Int(CC_MD5_DIGEST_LENGTH))!
let resultBytes = UnsafeMutablePointer<CUnsignedChar>(result.mutableBytes)