alias gs="git status"
alias gd="git diff"
alias gb="git branch"
alias gco="git checkout"
alias gcm="git commit"
alias gca="git commit --amend"
alias glo="git log --oneline"
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 SwiftUI | |
struct DemoBanner { | |
let title: String | |
let message: String | |
} | |
final class PresentBannerManager: ObservableObject { | |
@Published var isPresented: Bool = false | |
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 email = "{ service account email }"; | |
const key = "{ -----BEGIN PRIVATE KEY-----\n ~~ \n-----END PRIVATE KEY-----\n }" | |
const projectId = "{projectId}"; | |
const firestore = FirestoreApp.getFirestore(email, key, projectId); | |
/** | |
* Demo | |
*/ | |
function DemoCreateData() { |
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 SwiftUI | |
enum DialogContent: View { | |
case contentDetail01(isPresented: Binding<Bool>) | |
case contentDetail02(isPresented: Binding<Bool>) | |
@ViewBuilder | |
var body: some View { | |
switch self { |
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
/* | |
https://fromkk.me/n/n8212b6f808c6 | |
compactMapを先に行うことでflatMapにオプショナルではない値を流せる | |
*/ | |
func loadData() { | |
userProfileRepository.$subscribedServices | |
.compactMap {[weak self] items in | |
self?.exploreSubscRepository.loadData(with: items.map{ $0.serviceID }) | |
} | |
.flatMap(maxPublishers: .max(1)) { $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
// https://www.swiftbysundell.com/articles/caching-in-swift/ より | |
import Foundation | |
/// キャッシュ管理クラス。任意の値を保存でき、メモリキャッシュのみ対応。 | |
final class Cache<Key: Hashable, Value> { | |
private let wrapped = NSCache<WrappedKey, Entry>() | |
private let dateProvider: () -> Date | |
private let entryLifetime: TimeInterval |
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 | |
class ViewController: UIViewController { | |
var presenter: Presenter! | |
func inject(presenter: Presenter) { | |
self.presenter = presenter | |
} | |
override func viewDidAppear(_ animated: Bool) { | |
super.viewDidAppear(animated) |
項目 | 内容 |
---|---|
氏名 | 東原 与生 (ヒガシハラ ヨキ) |
生年月日 | 1993/05/20 |
@enyyokii |
NewerOlder