I hereby claim:
- I am gregpardo on github.
- I am gregpardo (https://keybase.io/gregpardo) on keybase.
- I have a public key ASCr1RWL0WaB70EP4-gFGOn7td5QHkVFTyFizFXNbH-kbgo
To claim this, I am signing this object:
| { | |
| "order_total_amount": 10, | |
| "shipping": 0, | |
| "taxable_amount": -2.5, | |
| "amount_to_collect": -0.16, | |
| "rate": 0.065, | |
| "has_nexus": true, | |
| "freight_taxable": true, | |
| "tax_source": "destination", | |
| "jurisdictions": { |
| taxjar.taxForOrder({ | |
| from_street: '480 N Orange Ave', | |
| from_city: 'Orlando', | |
| from_state: 'FL', | |
| from_zip: '32801', | |
| from_country: 'US', | |
| line_items: [ | |
| { | |
| id: 1, | |
| quantity: 1, |
I hereby claim:
To claim this, I am signing this object:
| import Foundation | |
| import RealmSwift | |
| protocol CascadingDeletable { | |
| var cascadingDeletions: [AnyObject?] { get } | |
| } | |
| extension Realm { | |
| func delete<T: AnyObject>(cascading: List<T>) where T: CascadingDeletable { |
| extension Alamofire.Request { | |
| func processMap<N>(map:(AnyObject)->N?) -> Observable<N> { | |
| return Observable.create { observer in | |
| self.responseData { response in | |
| let result = response.result | |
| if result.isSuccess { | |
| guard let o = map(result.value!) else{ |
| extension Realm { | |
| public func rx_objectForPrimaryKey<T: Object>(type: T.Type, key: AnyObject) -> Observable<T?> { | |
| return self.objects(type) | |
| .filter("%K = %@", self.schema[type.className()]!.primaryKeyProperty!.name, key) | |
| .rx_result | |
| } | |
| } | |
| extension Results where T: Object { | |
| extension NVActivityIndicatorView { | |
| public var rx_animating: AnyObserver<Bool> { | |
| return UIBindingObserver(UIElement: self) { indicator, animating in | |
| if (animating) { | |
| indicator.startAnimation() | |
| } else { | |
| indicator.stopAnimation() | |
| } | |
| }.asObserver() | |
| } |
| extension UIImage { | |
| func imageByCroppingTransparentPixels() -> UIImage { | |
| let rect = self.cropRectForImage() | |
| return cropImage(toRect: rect) | |
| } | |
| func cropRectForImage(image:UIImage) -> CGRect { | |
| let imageAsCGImage = image.CGImage | |
| let context:CGContextRef? = self.createARGBBitmapContext(imageAsCGImage!) |