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
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 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 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 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 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 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 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 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 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
var Promise = require('bluebird'); | |
var fetchPostById = function(postId){ | |
return new Promise(function(resolve, reject){ | |
mySampleAsyncDatabaseFetch(postId, function(err, post){ | |
if(err){ | |
reject(err); | |
} | |
resolve(post); | |
}); |
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
#### Run the Visual Studio Native Tools As an Administrator | |
#### The Exchange flag is VERY IMPORTANT | |
makecert -n CN=local.covertonight.com -sr LocalMachine -ss My -sky Exchange -pe |