Skip to content

Instantly share code, notes, and snippets.

View chorim's full-sized avatar
😪

Insu Byeon chorim

😪
View GitHub Profile
@chorim
chorim / Publisher+RxThrottle.swift
Created January 8, 2024 15:48
Publisher+RxThrottle
//
// Publisher+RxThrottle.swift
// ThrottleDemo
//
// Created by Insu Byeon on 1/7/24.
//
import Foundation
#if canImport(Combine)
import Combine
import UIKit
import PlaygroundSupport
protocol Alertable {}
extension Alertable where Self: UIViewController {
func presentAlert(
title: String,
message: String,
preferredStyle: UIAlertController.Style = .alert,
options: String...,
@chorim
chorim / FileDataManager.swift
Created April 16, 2021 03:12
A simple file data manager written in swift 5
import Foundation
protocol FileDataManageable {
static func createDirectory(directoryName: String?) -> Bool
static func list(directoryName: String?) -> [String]?
static func save(directoryName: String?, fileName: String, ext: String, data: Data) -> Bool
}
extension FileDataManageable {
@chorim
chorim / calculator.swift
Created April 12, 2021 13:04
calculator imcomplete
import Foundation
enum OperatorType: String {
case plus = "+"
case minus = "-"
case imul = "*"
case div = "/"
}
var str = "((3*5)+4)"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDECodeSnippetCompletionPrefix</key>
<string>ccm</string>
<key>IDECodeSnippetCompletionScopes</key>
<array>
<string>All</string>
</array>
@chorim
chorim / GuguMain.java
Last active September 25, 2019 12:50
영진전문대학 1학년 역 피라미드
import java.util.Scanner;
enum State {
alphaUpper, number, alphaLower;
private static State[] vals = values();
public State next() {
return ( this.ordinal() + 1 == vals.length ) ? vals[0] : vals[(this.ordinal() + 1) & vals.length];
}
}
@chorim
chorim / GuguMain.java
Created September 20, 2019 12:25
영진전문대학 1학년 여름방학 구구단 과제
import java.util.Scanner;
public class GuguMain {
public static void main(String[] args) {
int col = 0;
Scanner scanner = new Scanner(System.in);
System.out.print("컬럼 개수를 입력하세요: ");
col = scanner.nextInt();
@chorim
chorim / main.c
Last active September 18, 2019 13:42
인하공전 컴퓨터정보과 19학번 과제, inha-college-matrix
//
// main.c
// inha_college
//
// Created by 유키유키 on 2019. 9. 18..
// Copyright © 2019년 유키유키. All rights reserved.
//
#include <stdio.h>
export ZSH=$HOME/.oh-my-zsh
DEFAULT_USER="$USER"
ZSH_THEME="agnoster"
# Uncomment the following line to disable bi-weekly auto-update checks.
DISABLE_AUTO_UPDATE="true"
DISABLE_UPDATE_PROMPT="true"
plugins=(git zsh-syntax-highlighting zsh-autosuggestions alias-tips)
source $ZSH/oh-my-zsh.sh
@chorim
chorim / .vimrc
Created September 9, 2019 01:55
.vimrc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Sets how many lines of history VIM has to remember
" VIM에서 기억할 히스토리 라인수
set history=1000
" Set to auto read when a file is changed from the outside
" 현재 사용하고 있는 파일이 외부에서 수정된 경우 자동으로 읽기
set autoread