Skip to content

Instantly share code, notes, and snippets.

enum TestError: Error {
case test
}
extension ObservableType {
func retryWhen(
predicate: @escaping (Error) -> Bool,
maxRetry: Int,
@munho
munho / rxswift_errorhandling.swift
Created September 25, 2020 01:11 — forked from theohbkim/rxswift_errorhandling.swift
Error Handling example for RxSwift
import Foundation
import RxSwift
enum MyError: Error {
case requestError1
case requestError2
case requestError3
case requestError4
case requestError5
}
@munho
munho / RxSwift.md
Created September 25, 2020 01:13 — forked from MasterHiei/RxSwift.md
RxSwift開発メモ

RxSwift開発メモ

アーキテクチャ

  • 関係図例(MVVM / MVP / Clean Architecture / etc.)

    関係図例

オペレーター

@munho
munho / AutoRetry.swift
Created September 25, 2020 01:31 — 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 {
@munho
munho / lambda_ftp.py
Created October 15, 2020 04:33 — forked from natoinet/lambda_ftp.py
AWS Lambda in Python: Upload a new file from S3 to FTP
import os
import json
from ftplib import FTP
import boto3
# Source https://github.com/Vibish/FTP_SFTP_LAMBDA/blob/master/FTPThroughLambda.py
# https://www.edureka.co/community/17558/python-aws-boto3-how-do-i-read-files-from-s3-bucket
# https://medium.com/better-programming/transfer-file-from-ftp-server-to-a-s3-bucket-using-python-7f9e51f44e35
# https://github.com/kirankumbhar/File-Transfer-FTP-to-S3-Python/blob/master/ftp_to_s3.py
# https://dashbird.io/blog/python-aws-lambda-error-handling/
@munho
munho / osmc-on-raspberrypi.md
Created November 14, 2020 04:43 — forked from sujak/osmc-on-raspberrypi.md
Raspberry Pi 에 OSMC (Open Source Media Centre) 설치 및 설정

OSMC 설치

  1. OSMC 웹사이트에서 인스톨러 다운로드 ( https://osmc.tv/download/ )
  2. 인스톨러에서 필요한 옵션을 선택 (자동으로 설치 파일 다운로드 및 메모리에 복사)
  3. 메모리를 라즈베리파이에 삽입 후 전원 연결
  4. 자동으로 설치완료 및 재부팅

설정

@munho
munho / osmc-raspberrypi2.md
Last active November 14, 2020 09:06 — forked from inceax/osmc-raspberrypi2.md
raspberry pi 3에 osmc 빠른 세팅을 위한 개인 설정 기록

osmc 세팅

한글화

스킨 한글화

  1. 폰트 설치
sudo apt-get install fonts-nanum

Understanding UIViewController Rotation

Problem

To enable the rotation of a single view controller used to display the preview of Images/Videos. It is intuitive to allow user to rotate there device and screen changes accordingly, so it feels pleasant. But to achieve this, we need to enable the (almost) all Supported Device orientations.

Ex: `Portrait`, `LandscapeLeft`, `LandscapeRight`.
@munho
munho / UIViewController+Rotation.m
Created January 11, 2021 01:57 — forked from macguru/UIViewController+Rotation.m
Forcing a rotation on a UIViewController.
//
// UIViewController+Rotation.m
// Ulysses
//
// Created by Götz Fabian on 12.10.17.
// Copyright © 2017 Ulysses GmbH & Co. KG. All rights reserved.
//
#import "UIViewController+Rotation.h"
apply plugin: 'kotlin-kapt'
// ...(중략)...
dependencies {
// for async logic
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
// Room
implementation "androidx.room:room-runtime:2.2.2"