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
| /** | |
| * Created by maximilianalexander on 8/15/14. | |
| */ | |
| angular.module('app').directive('validationMessage', function(){ | |
| return { | |
| restrict: 'E', | |
| templateUrl: 'client/partials/validation-message.html', | |
| scope: { | |
| errorModels: "=", | |
| errorKey: "@" |
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
| apply plugin: 'com.android.application' | |
| android { | |
| compileSdkVersion 21 | |
| buildToolsVersion "21.0.2" | |
| defaultConfig { | |
| applicationId "com.epoqueinc.myapp" | |
| minSdkVersion 15 | |
| targetSdkVersion 21 |
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
| productFlavors { | |
| prod { | |
| packageName "com.mycompany.myapp" | |
| } | |
| dev { | |
| packageName "com.mycompany.myapp.dev" | |
| } | |
| local{ | |
| packageName "com.mycompany.myapp.local" | |
| } |
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
| // In your application, you can retrieve it with getPackageName() | |
| String packageName = getApplicationContext().getPackageName(); | |
| String apiUrl; | |
| if(packageName.equals("com.mycompany.myapp")){ | |
| apiUrl = "myapi.com" | |
| } | |
| if(packageName.equals("com.mycompany.myapp.dev")){ | |
| apiUrl = "dev.myapi.com" | |
| } |
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
| let rx_request = Observable<Value>.create { (observer) -> Disposable in | |
| let requestReference = Alamofire.request(.POST, url, parameters: payload) | |
| .responseJSON(completionHandler: { (response) in | |
| if let value = response.result.value { | |
| observer.onNext(value) | |
| observer.onCompleted() | |
| }else if let error = response.result.error { | |
| observer.onError(error) | |
| } | |
| }) |
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
| // | |
| // UIColorExtensions.swift | |
| // Eden | |
| // | |
| // Created by Maximilian Alexander on 9/18/15. | |
| // Copyright © 2015 Epoque. All rights reserved. | |
| // | |
| import UIKit |
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
| return create { (observer: AnyObserver<UploadSignal>) -> Disposable in | |
| let transferUtility = AWSS3TransferUtility.defaultS3TransferUtility() | |
| let key = String(format: "uploads/%@.png", arguments: [NSUUID().UUIDString]) | |
| let fullUrl = String(format: "https://s3.amazonaws.com/edenmessenger/%@", arguments: [key]) | |
| var uploadTask : AWSS3TransferUtilityUploadTask? | |
| var completionUploadTask : AWSS3TransferUtilityUploadTask? | |
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 com.firebase.client.* | |
| import com.firebase.client.core.view.Event | |
| import rx.Observable | |
| import rx.subscriptions.Subscriptions | |
| data class RxFirebasePayload(val dataSnapshot: DataSnapshot, val previousChildKey: String? = null) | |
| class RxFirebase{ |
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 {Observable, Subscriber} from 'rxjs/Rx' | |
| export enum EventType { | |
| CHILD_ADDED, CHILD_REMOVED, CHILD_CHANGED, CHILD_MOVED, VALUE | |
| } | |
| export interface RxFirebaseResponse { | |
| snapshot: FirebaseDataSnapshot | |
| siblingKey: string | |
| } |
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 UIKit | |
| import RxSwift | |
| import Cartography | |
| class HandleDisplayView: UIView { | |
| private var disposeBag = DisposeBag() | |