Skip to content

Instantly share code, notes, and snippets.

View mnaruse's full-sized avatar
🏠
Working from home

miharu mnaruse

🏠
Working from home
View GitHub Profile
@munetoshi
munetoshi / weekly_report_links.md
Last active June 20, 2024 03:07
コード品質向上のテクニック ブログポストリンク集
// Playgroundでの実行を想定しているのでCombineを利用
import Combine
// MARK: - CombineをRxSwiftのように定義する
typealias Observable<T> = AnyPublisher<T, Error>
typealias PublishRelay<T> = PassthroughSubject<T, Never>
typealias BehaviorRelay<T> = CurrentValueSubject<T, Never>
typealias DisposeBag = [AnyCancellable]
/// valueのsetterを非公開にしたBehaviorRelay
@marty-suzuki
marty-suzuki / UnioSystem.swift
Last active May 17, 2020 05:51
https://github.com/cats-oss/Unio で公開しているFrameworkの動きを簡易的に表現しています
// Playgroundでの実行を想定しているのでCombineを利用
import Combine
// MARK: - CombineをRxSwiftのように定義する
typealias Observable<T> = AnyPublisher<T, Error>
typealias PublishRelay<T> = PassthroughSubject<T, Never>
typealias BehaviorRelay<T> = CurrentValueSubject<T, Never>
typealias DisposeBag = [AnyCancellable]
// MARK: - Output関連
@IsaacXen
IsaacXen / README.md
Last active June 21, 2024 01:41
(Almost) Every WWDC videos download links for aria2c.
@omayib
omayib / SimpleRepositoryPatternIn.swift
Created August 29, 2017 07:53
Introducing repository pattern with swift.
//: Playground - noun: a place where people can play
import UIKit
class Todo{
var tempId: UUID?
var id : Int
var title: String
var isCompleted: Bool
import UIKit
class ResponsiveView: UIView {
override var canBecomeFirstResponder: Bool {
return true
}
}
class ViewController: UIViewController {
@nownabe
nownabe / .commit_template
Created July 5, 2016 06:54
Emojiで楽しく綺麗なコミットを手に入れる
# ==== Emojis ====
# 🐛 :bug: バグ修正
# 👍 :+1: 機能改善
# ✨ :sparkles: 部分的な機能追加
# 🎉 :tada: 盛大に祝うべき大きな機能追加
# ♻️ :recycle: リファクタリング
# 🚿 :shower: 不要な機能・使われなくなった機能の削除
# 💚 :green_heart: テストやCIの修正・改善
@Jerrot
Jerrot / ArrayTransform.swift
Last active March 17, 2024 13:10
Transform arrays with ObjectMapper to Realm's List type
// Based on Swift 1.2, ObjectMapper 0.15, RealmSwift 0.94.1
// Author: Timo Wälisch <timo@waelisch.de>
import UIKit
import RealmSwift
import ObjectMapper
import SwiftyJSON
class ArrayTransform<T:RealmSwift.Object where T:Mappable> : TransformType {
typealias Object = List<T>
@igroomgrim
igroomgrim / LocationService.swift
Last active September 10, 2023 18:06
Simply Singleton CLLocationManager Class in Swift
//
// LocationService.swift
//
//
// Created by Anak Mirasing on 5/18/2558 BE.
//
//
import Foundation
import CoreLocation
@shinyaohira
shinyaohira / App States and Multitasking.md
Last active October 5, 2023 07:57
アプリケーションの状態とマルチタスキング

全体的に簡略化し、必要と思われる部分を抜粋しました。

  • Not running

    アプリは起動されていないか、実行されていたけれどもシステムによって終了されています。

  • Inactive