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
| { | |
| "freezed":{ | |
| "prefix": "freezed", | |
| "body": [ | |
| "import 'package:flutter/foundation.dart';", | |
| "import 'package:freezed_annotation/freezed_annotation.dart';", | |
| "", | |
| "part '$1.freezed.dart';", | |
| "part '$1.g.dart';", | |
| "", |
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
| rules_version = '2'; | |
| service cloud.firestore { | |
| match /databases/{database}/documents { | |
| // Create `Path` from array of string. | |
| function documentPath(paths) { | |
| return path([ | |
| ['databases', database, 'documents'].join('/'), | |
| paths.join('/') | |
| ].join('/')); | |
| } |
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
| struct ModelA: Codable { | |
| @Wrap<ModelA> var a: String? = "foobar" | |
| } |
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
| extension AnyObserver { | |
| static func create<E>(_ relay: PublishRelay<E>) -> AnyObserver<E> { | |
| return .init { event in | |
| guard case let .next(value) = event else { return } | |
| relay.accept(value) | |
| } | |
| } | |
| static func create<E>(_ relay: BehaviorRelay<E>) -> AnyObserver<E> { | |
| return .init { event in |
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 * as functions from 'firebase-functions' | |
| import * as request from 'request-promise-native' | |
| export namespace IssueDynamicLink { | |
| export interface Request { | |
| params: DynamicLinkParameters | |
| } | |
| export interface Response { | |
| url: 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
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| import RxSwift | |
| import RxCocoa | |
| import PlaygroundSupport | |
| PlaygroundPage.current.needsIndefiniteExecution = true | |
| // PublishRelay vs BehaviorRelay | |
| do { |
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 RxCocoa | |
| import PlaygroundSupport | |
| PlaygroundPage.current.needsIndefiniteExecution = true | |
| // PublishRelay vs BehaviorRelay | |
| do { | |
| let relay = PublishRelay<Int>() |
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
| service cloud.firestore { | |
| match /databases/{database}/documents { | |
| function isAuthenticated() { | |
| return request.auth != null; | |
| } | |
| match /user/{userID} { | |
| allow read: if isAuthenticated(); | |
| allow create: if true; | |
| allow update: if request.writeFields.size() == 1; |
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
| protocol PushNotificationPayload: Decodable { | |
| } | |
| protocol SubscribeContainer { | |
| func parse(_ json: Data) | |
| } | |
| extension SubscribeContainer { | |
| func parse(_ json: Data) { |
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
| [##][A-Za-zA-Za-z一-鿆0-90-9ぁ-ヶヲ-゚ー]+ | |
| // http://qiita.com/corin8823/items/75309761833d823cac6f |