Skip to content

Instantly share code, notes, and snippets.

View ElonPark's full-sized avatar
πŸ“±
ο£Ώ iOS Software Engineer

Elon Park ElonPark

πŸ“±
ο£Ώ iOS Software Engineer
View GitHub Profile
//
// ViewController.swift
// Rainist
//
// Created by Elon on 23/04/2019.
// Copyright Β© 2019 Elon. All rights reserved.
//
import UIKit
import RxSwift
@ElonPark
ElonPark / BetterXcodeJumpToCounterpartSwift.org
Created November 19, 2019 12:26 — forked from danielmartin/BetterXcodeJumpToCounterpartSwift.org
Add support for a better Xcode's Jump to Next Counterpart in Swift

If you work on a Swift project that follows the Model-View-ViewModel (MVVM) architecture or similar, you may want to jump to counterpart in Xcode from your view to your model, and then to your view model. (ie. by using Ctrl+Cmd+Up and Ctrl+Cmd+Down).

You can do this in recent versions of Xcode by setting a configuration default.

From a terminal, just type this command and press Enter:

defaults write com.apple.dt.Xcode IDEAdditionalCounterpartSuffixes -array-add "ViewModel" "View"
//:
//: UIView Animation Syntax Sugar
//:
//: Created by Andyy Hope on 18/08/2016.
//: Twitter: @andyyhope
//: Medium: Andyy Hope, https://medium.com/@AndyyHope
import UIKit
extension UIView {
@ElonPark
ElonPark / CustomBot.py
Last active January 27, 2020 12:34
like test
import instabot
class CustomBot:
def __init__(self):
self.bot = instabot.Bot()
self.bot.login(username='', password='',
use_cookie=False)
def test_like(self):
import RIBs
import RxSwift
import RxRelay
import ReactorKit

protocol FAQsRouting: ViewableRouting {
  func routeToFAQ(_ faq: FAQ)
  func detachFAQ()
}
🌞 Morning 12 commits ▍░░░░░░░░░░░░░░░░░░░░ 2.0%
πŸŒ† Daytime 99 commits β–ˆβ–ˆβ–ˆβ–Œβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 16.8%
πŸŒƒ Evening 269 commits β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 45.5%
πŸŒ™ Night 211 commits β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 35.7%
// MARK: - DummyInteractor
final class DummyInteractor:
PresentableInteractor<DummyPresentable>,
DummyInteractable,
DummyPresentableListener
{
private let dummyUseCase = DummyUseCase()
@ElonPark
ElonPark / AutoRetry.swift
Created October 16, 2020 05:50 — forked from kean/AutoRetry.swift
Smart Auto Retry using RxSwift
// The MIT License (MIT)
//
// Copyright (c) 2017 Alexander Grebenyuk (github.com/kean).
import Foundation
import RxSwift
import RxCocoa
extension ObservableType {
@ElonPark
ElonPark / ProfileViewReactor.swift
Created July 29, 2021 02:43
ProfileViewReactor
class ProfileViewReactor: Reactor {
// represent user actions
enum Action {
case refreshFollowingStatus(Int)
case follow(Int)
}
// represent state changes
enum Mutation {
case setFollowing(Bool)
@ElonPark
ElonPark / UserListInteractor.swift
Last active August 16, 2021 13:18
UserListInteractor
// MARK: - UserListInteractor
final class UserListInteractor:
PresentableInteractor<UserListPresentable>,
UserListInteractable,
UserListPresentableListener,
Reactor
{
// MARK: - Reactor