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
#!/usr/bin/env xcrun --sdk macosx swift | |
import Foundation | |
let version = "1.1" | |
var debug = false | |
// MARK: Exit status code | |
enum ExitCode: Int32 { | |
case success = 0 |
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
struct ModelA: Codable { | |
@Wrap<ModelA> var a: String? = "foobar" | |
} |
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
#!/bin/bash | |
usage() { | |
cat <<HELP | |
SYNOPSIS: | |
$0 [-d] [iOS(default)|watchOS|tvOS|Mac] | |
$0 [-h] | |
ARGUMENTS: | |
iOS print paths for iOS (default) | |
watchOS print paths for iOS |
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
//: 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 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 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 | |
import RxSwift | |
import Firebase | |
extension FIRAuth { | |
public enum AuthProvider { | |
case emailPassword(String, String) | |
case facebook(String) | |
case google(String, String) | |
case twitter(String, String) |
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
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 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 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 |