Skip to content

Instantly share code, notes, and snippets.

View devmjun's full-sized avatar
🤔
 ( ͡°⁄ ⁄ ͜⁄ ⁄ʖ⁄ ⁄ ͡°) 

Minjun Ju(Leo) devmjun

🤔
 ( ͡°⁄ ⁄ ͜⁄ ⁄ʖ⁄ ⁄ ͡°) 
View GitHub Profile
@inasie
inasie / apt-crawler.py
Created September 5, 2018 14:24
국토교통부 아파트 실거래가 크롤러 예제
# -*- coding: utf-8 -*-
import requests
import json
import logging
URL = "http://rt.molit.go.kr/new/gis/getDanjiInfoDetail.do"
param = {
'menuGubun': 'A',
//
// ImageCache.swift
//
// Created by Alec O'Connor on 3/6/18.
// Copyright © 2018 Alec O'Connor. All rights reserved.
//
import UIKit
class ImageCache {
@godrm
godrm / swift_api_guideline.md
Last active March 27, 2024 05:15
스위프트 API 가이드라인

1. 스타일/문법 리뷰

1-1 스위프트 API 디자인 가이드라인

https://swift.org/documentation/api-design-guidelines/

  • 사용할 때 기준으로 명확하게 작성하는 게 가장 중요한 지향점이다. 메소드나 프로퍼티 같은 개발 요소는 한 번만 선언하고 반복적으로 사용한다. API를 만들 때는 사용하기 명확하고 편하게 만들어야 한다. 설계를 검증할 때 선언 부분을 읽는 것만으로는 부족하다. 그 대신 사용하는 상황에서 맥락에 맞고 명확한 지 늘 고려해야 한다.

  • 명확한 표현이 압축한 간결성보다 더 중요하다. 스위프트 코드는 압축해서 간결하게 작성할 수 있지만, 단지 글자수를 줄여서 가장 짧은 코드를 만드는 게 목표는 아니다. 스위프트 코드의 간결성은 자연스럽게 반복적으로 재사용하는 코드(boilerplate)를 줄이는 기능과 강한 타입 시스템의 부수효과로 드러날 뿐이다.

@trandaison
trandaison / starUML.md
Last active May 2, 2024 10:02
Get full version of StarUML
@nunogoncalves
nunogoncalves / ZoomableImageView.swift
Last active January 17, 2019 12:24
Basic zoomable image view
//
// ZoomableImageView.swift
// ZoomableImage
//
// Created by Nuno Gonçalves on 01/04/17.
// Copyright © 2017 Nuno Gonçalves. All rights reserved.
//
import UIKit
@maciekish
maciekish / resetXcode.sh
Created August 10, 2016 10:13
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
#!/bin/bash
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
open /Applications/Xcode.app
@mwaterfall
mwaterfall / StringExtensionHTML.swift
Last active April 3, 2024 01:33
Decoding HTML Entities in Swift
// Very slightly adapted from http://stackoverflow.com/a/30141700/106244
// 99.99% Credit to Martin R!
// Mapping from XML/HTML character entity reference to character
// From http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
private let characterEntities : [String: Character] = [
// XML predefined entities:
""" : "\"",
"&" : "&",
@acrookston
acrookston / ImageZoom.swift
Created January 14, 2015 19:12
Swift image zoom
// The image is originally animated on to the view controller then added to the scroll view.
// So, there might be some animation residue in here.
// Class needs: <UIScrollViewDelegate>
func viewDidLoad() {
let width = UIScreen.mainScreen().bounds.size.width
let aspect: CGFloat = width / shotWidth
var frame = CGRectMake(0, 0, shotWidth * aspect, shotHeight * aspect)
self.scrollView = UIScrollView(frame: frame)