I hereby claim:
- I am akramhussein on github.
- I am akramhussein (https://keybase.io/akramhussein) on keybase.
- I have a public key whose fingerprint is 7CFD 1C3C 4D55 D91B CBFE CCFF FDB5 43D6 9463 82C7
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/sh | |
| buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
| buildNumber=$(($buildNumber + 1)) | |
| /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE" |
| #!/bin/sh | |
| # TASK: Create Item in Settings.bundle Root.plist | |
| # Get version string | |
| versionString=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$INFOPLIST_FILE") | |
| # Get build number | |
| buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
| # Set settings bundle value | |
| /usr/libexec/PlistBuddy -c "Set :PreferenceSpecifiers:0:DefaultValue $versionString (Build: $buildNumber)" "${SRCROOT}/${PROJECT}/Settings.bundle/Root.plist" |
| # Zips DSYM for current build and uploads to Splunk Mint Express | |
| DSYM="$BUILT_PRODUCTS_DIR/${PRODUCT_NAME}.app.dSYM" | |
| zip -r "$DSYM.zip" $DSYM | |
| curl -F file=@"$DSYM.zip" \ | |
| --header "X-Splunk-Mint-apikey: YOUR_APP_API_KEY" \ | |
| --header "X-Splunk-Mint-Auth-Token: YOUR_API_AUTH_TOKEN" \ | |
| https://symbolicator.splkmobile.com/upload/dsym -i |
| extension String | |
| { | |
| func removeWords(words: [String]) -> String | |
| { | |
| var cleanedString = self | |
| // Remove common words | |
| for word in words | |
| { | |
| cleanedString = cleanedString.stringByReplacingOccurrencesOfString(word, withString: "", options: NSStringCompareOptions.LiteralSearch, range: nil) |
| var commands = [UIKeyCommand]() | |
| var onceToken : dispatch_once_t = 0 | |
| override var keyCommands : [AnyObject]? { | |
| get { | |
| dispatch_once(&onceToken) { | |
| self.commands = [ | |
| UIKeyCommand(input: " ", modifierFlags: nil, action: "spacePressed:"), | |
| UIKeyCommand(input: "\r", modifierFlags: nil, action: "enterPressed:"), | |
| UIKeyCommand(input: "0", modifierFlags: nil, action: "zeroPressed:"), |
| import Foundation | |
| import CocoaLumberjack | |
| class CustomLogFormatter : NSObject, DDLogFormatter | |
| { | |
| private var dateFormatter : NSDateFormatter! | |
| override init() | |
| { | |
| self.dateFormatter = NSDateFormatter() |
| import Foundation | |
| import CocoaLumberjack | |
| import Crashlytics | |
| class CrashlyticsLogger : DDAbstractLogger | |
| { | |
| static let sharedInstance = CrashlyticsLogger() | |
| private var _logFormatter : DDLogFormatter? | |
| override var logFormatter: DDLogFormatter? { |
| extension Array | |
| { | |
| mutating func removeObjectByClass<T>(t: T.Type) | |
| { | |
| for (index, object) in self.enumerate() | |
| { | |
| if let _ = object as? T | |
| { | |
| self.removeAtIndex(index) | |
| } |
| import Foundation | |
| import RealmSwift | |
| import ObjectMapper | |
| class Product: Object, Mappable | |
| { | |
| dynamic var name = "" | |
| dynamic var price = 0.0 | |
| var discount = RealmOptional<Float>() { |