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
exports.register = functions.https.onCall((data, context) => { | |
let response | |
if(data.isSocial) { | |
response = Api.authenticationSocial(data) | |
} else { | |
response = Api.authenticationToken(data) | |
} | |
const { userId, token, role, ...rest } = response | |
const additionalClaims = { |
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
const RETRY = 'retry'; | |
const LOADING = 'loading'; | |
const SUCCESS = 'success'; | |
const FAILURE = 'failure'; | |
const IDLE = 'idle'; | |
const SIGNUP = 'signup'; | |
const REGISTER = 'register'; | |
const CONFIRM = 'confirm'; | |
const LOGIN = 'login'; |
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
const RETRY = 'retry'; | |
const LOADING = 'loading'; | |
const SUCCESS = 'success'; | |
const FAILURE = 'failure'; | |
const IDLE = 'idle'; | |
const SIGNUP = 'signup'; | |
const REGISTER = 'register'; | |
const CONFIRM = 'confirm'; | |
const LOGIN = 'login'; |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
const { writeFile } = require('fs') | |
const fetchUsers = () => | |
new Promise(r => { | |
setTimeout(() => { | |
r([ | |
{ | |
name: "amos", | |
id: "amos" | |
}, |
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
Scanning folders for symlinks in react-native-fiber-1.0.0/node_modules (14ms) | |
15:29:33: Starting packager... | |
***ERROR STARTING PACKAGER*** | |
Warning: You are using npm version 5.5.1. There may be bugs in this version, use it at your own risk. We recommend version 4.6.1. | |
Starting React Native packager... | |
Scanning folders for symlinks in react-native-fiber-1.0.0/node_modules (55ms) | |
Loading dependency graph. | |
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 Array { | |
func toDictioary<K: Hashable, V>(transform: @escaping (_ element:Element) -> (key: K, value: V)? ) -> [K : V] { | |
var result : [K : V] = [:] | |
forEach { | |
if let (key, value) = transform($0) { | |
result[key] = value | |
} | |
} | |
return result | |
} |
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
post_install do |installer| | |
installer.pods_project.targets.each do |target| | |
if target.name == 'Mixpanel' | |
target.build_configurations.each do |config| | |
puts " Pods-Mixpanel #{config.name} before: #{config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'].inspect}" | |
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)'] | |
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'DISABLE_MIXPANEL_AB_DESIGNER=1' | |
puts " Pods-Mixpanel #{config.name} after: #{config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'].inspect}" | |
end | |
end |
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 Foundation | |
public protocol KeyValueIdentifier | |
{ | |
associatedtype ValueType | |
var key : String { get } | |
} | |
public struct ValueIdentifier <T> : KeyValueIdentifier | |
{ |
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
@implementation UIImage (AmosAddtions) | |
+(UIImage*) imageWithFirstRowOfImageNamed:(NSString*)imageName | |
{ | |
UIImage* firstImage = [UIImage imageNamed:imageName]; | |
UIImage* newImage = nil; | |
if (firstImage) | |
{ | |
UIGraphicsBeginImageContext(CGSizeMake(1, firstImage.size.height)); | |
[firstImage drawAtPoint:CGPointMake(0, 0)]; | |
newImage = UIGraphicsGetImageFromCurrentImageContext(); |
NewerOlder