This file contains 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
extension String { | |
func md5() -> String! { | |
let str = self.cStringUsingEncoding(NSUTF8StringEncoding) | |
let strLen = CUnsignedInt(self.lengthOfBytesUsingEncoding(NSUTF8StringEncoding)) | |
let digestLen = Int(CC_MD5_DIGEST_LENGTH) | |
let result = UnsafeMutablePointer<CUnsignedChar>.alloc(digestLen) | |
CC_MD5(str!, strLen, result) | |
var hash = NSMutableString() |
This file contains 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/sh | |
# An example hook script to verify what is about to be pushed to master. Called | |
# by "git push" after it has checked the remote status, but before anything has | |
# been pushed. If this script exits with a non-zero status nothing will be | |
# pushed. | |
# | |
# This hook is called with the following parameters: | |
# | |
# $1 -- Name of the remote to which the push is being done |