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
// | |
// ContentView.swift | |
// Message | |
// | |
// Created by 1amageek on 2022/02/01. | |
// | |
import SwiftUI | |
struct Transcript: Identifiable, Codable, Hashable { |
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
@propertyWrapper public struct Supported<Value> { | |
private var status: Status | |
private var valueWhenUnsupported: Value | |
public init(valueWhenUnsupported: Value) { | |
self.status = Status(isSupported: false, value: valueWhenUnsupported) | |
self.valueWhenUnsupported = valueWhenUnsupported | |
} |
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 | |
import Firebase | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { | |
FirebaseApp.configure() | |
return true | |
} | |
} |
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
// | |
// FirestoreMonitoring.swift | |
// Monitor | |
// | |
// Created by nori on 2020/08/19. | |
// Copyright © 2020 1amageek. All rights reserved. | |
// | |
import Foundation | |
import FirebaseFirestore |
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
type DateTime = Date | |
type Url = string | |
namespace OpenGraph { | |
// Object Types | |
type WebsiteType = "website" | |
type ArticleType = "article" |
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
'use strict'; | |
const fs = require('fs'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const resolve = require('resolve'); | |
const PnpWebpackPlugin = require('pnp-webpack-plugin'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); | |
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin'); |
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 { useEffect, useState } from 'react' | |
import firebase, { database } from "firebase" | |
import "firebase/firestore" | |
import "firebase/auth" | |
import { firestore, Doc, DocumentReference } from '@1amageek/ballcap' | |
export const useDocumentListen = <T extends Doc>(type: typeof Doc, documentReference?: DocumentReference, waiting: boolean = false): [T | undefined, boolean, Error?] => { | |
interface Prop { | |
data?: T | |
loading: boolean |
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
// | |
// ProductsViewController.swift | |
// Created by nori on 2020/03/15. | |
// Copyright © 2020 nori. All rights reserved. | |
// | |
import UIKit | |
import Instantiate | |
import Firebase | |
import Ballcap |
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
class Animal<T> { | |
static identity<T extends new (...args: any[]) => Animal<any>>(this: T) { | |
return this; | |
} | |
static create<T extends Animal<any>>(this: new (...args: any[]) => T) { | |
return new this(); | |
} | |
} |
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 Address { | |
var firstName: String = "" | |
var lastName: String = "" | |
var postalCode: String = "" | |
var state: String = "" |
NewerOlder