Skip to content

Instantly share code, notes, and snippets.

View jsryudev's full-sized avatar

Junsang Ryu jsryudev

View GitHub Profile
@jsryudev
jsryudev / reactor.swift
Last active December 24, 2020 05:39
[Empty Reactor]empty reactor
import ReactorKit
final class MainTabBarViewReactor: Reactor {
typealias Action = NoAction
struct State {
}
let initialState: State = State()
}
🌞 Morning 65 commits ███▏░░░░░░░░░░░░░░░░░ 15.1%
🌆 Daytime 122 commits █████▉░░░░░░░░░░░░░░░ 28.3%
🌃 Evening 182 commits ████████▊░░░░░░░░░░░░ 42.2%
🌙 Night 62 commits ███░░░░░░░░░░░░░░░░░░ 14.4%
def bump_version
require 'yaml'
project_file_path = "../project.yml"
project = YAML.load_file(project_file_path)
setting_groups = project["settingGroups"] || {}
app_base_settings = setting_groups["appBaseSettings"] || {}
current_version = app_base_settings["MARKETING_VERSION"]
current_build_number = app_base_settings["CURRENT_PROJECT_VERSION"] || 0
@jsryudev
jsryudev / Compositional.swift
Created April 5, 2023 13:16
Compositional.swift
enum Section: Int {
case name
case newFeature
case preview
}
func compositionLayout() -> UICollectionViewLayout {
let layout = UICollectionViewCompositionalLayout { index, environment in
guard let section = Section(rawValue: index) else { return nil }
let sectionLayout: NSCollectionLayoutSection
// MARK: - LocalStorageType
protocol LocalStorageType {
func storageKey<Element: Storable>(of type: Element.Type) -> String
@discardableResult func append<Element: Storable>(_ value: Element) -> Bool
func element<Element: Storable>(of type: Element.Type) -> Element?
func array<Element: Storable>(of type: Element.Type) -> [Element]
@discardableResult func update<Element: Storable>(_ value: Element) -> Bool
@discardableResult func remove<Element: Storable>(_ value: Element) -> Bool