Skip to content

Instantly share code, notes, and snippets.

View myssun0325's full-sized avatar

Youngsun myssun0325

  • Korea
  • 06:51 (UTC +09:00)
View GitHub Profile
@myssun0325
myssun0325 / _using_git.md
Created June 21, 2017 16:51 — forked from onmoving/_using_git.md
git: command summary git 명령 정리
//
// main.swift
// UnitConverter
//
// Created by moon on 2018. 3. 5..
// Copyright © 2018년 moon. All rights reserved.
//
import Foundation
//
// main.swift
// UnitConverter
//
// Created by moon on 2018. 3. 5..
// Copyright © 2018년 moon. All rights reserved.
//
import Foundation
@myssun0325
myssun0325 / dipExample.swift
Last active March 27, 2018 05:26
DIP_example
import Foundation
// 1. 적용 X
/*
class Handler {
let fm = FilesystemManager()
func handle(string: String) {
//
// main.swift
// MetaType_Example
//
// Created by moon on 2018. 6. 22..
// Copyright © 2018년 moon. All rights reserved.
//
import Foundation
//
// main.swift
// MetaType_Example
//
// Created by moon on 2018. 6. 22..
// Copyright © 2018년 moon. All rights reserved.
//
import Foundation
import Foundation
class SomeClass {
var someList = [1,2,3,4,5,6,7]
}
class SomeClassIterator: IteratorProtocol {
private var someList: [Int]
private var index: Int
@myssun0325
myssun0325 / NSSecureCodingExample.swift
Created July 16, 2018 11:42
코드리뷰 중 NSSecureCoding 일부
class Beverage: NSObject, NSSecureCoding {
private let name: String
private let price: Int
// MARK: NSSecureCoding
private struct NSCoderKeys {
static let nameKey = "name"
static let priceKey = "price"
@myssun0325
myssun0325 / 단위변환기
Created February 12, 2019 07:02
단위변환기
//
// main.swift
// UnitConverter
//
// Created by moon on 2018. 3. 5..
// Copyright © 2018년 moon. All rights reserved.
//
import Foundation
@myssun0325
myssun0325 / LifeGame.swift
Created March 20, 2019 17:16
using optional
extension Array {
public subscript(safe index: Int) -> Element? {
return indices.contains(index) ? self[index] : nil
}
}
let gen: [[Int]] = [[1,1,0,0,0],
[1,1,0,0,0],