Skip to content

Instantly share code, notes, and snippets.

View devxoul's full-sized avatar
๐Ÿ‘จโ€๐Ÿ’ป
Always coding

Jeon Suyeol devxoul

๐Ÿ‘จโ€๐Ÿ’ป
Always coding
View GitHub Profile
@ericdke
ericdke / extractURLS.swift
Created January 21, 2016 18:38
SWIFT: Extract URLS from String
extension String {
func extractURLs() -> [NSURL] {
var urls : [NSURL] = []
do {
let detector = try NSDataDetector(types: NSTextCheckingType.Link.rawValue)
detector.enumerateMatchesInString(self,
options: [],
range: NSMakeRange(0, text.characters.count),
usingBlock: { (result, _, _) in
if let match = result, url = match.URL {
@scari
scari / aws_latency.md
Last active November 25, 2020 04:02
AWS Latency

Disclaimer

This is not an official report nor reliable benchmark. The testing environments are vary. These EC2 latencies are measured by http://aws-latency.altaircp.com/ Thanks to my friends!

If you want to add a result from your location, feel free to comment on this gist. Please note that you need to try it several times to get an accurate result.

Seoul, Korea

Asia Pacific (Seoul)	ap-northeast-2	19ms
Asia Pacific (Tokyo)	ap-northeast-1	92ms
@irace
irace / TabComponent.swift
Last active December 22, 2020 15:38
Easily roll your own `UITabBarController` alternatives. Hereโ€™s all the logic you need without assuming anything about your UI.
/**
* A class that can be part of a tabbed navigational interface (expected to be a `UIViewController` but can also be a
* coordinator that proxies through to an underlying controller).
*/
public protocol TabComponent {
/// The tab metadata
var tabItem: TabItem { get }
var viewController: UIViewController { get }
}
@haje01
haje01 / ๋Œ€ํ™”ํ˜• ์ฑ—๋ด‡ ์„ค๊ณ„์˜ ๊ณผ์ œ.md
Last active June 15, 2022 09:33
๋Œ€ํ™”ํ˜• ์ฑ—๋ด‡ ์„ค๊ณ„์˜ ๊ณผ์ œ

์ตœ๊ทผ ์ธ๊ณต์ง€๋Šฅ์„ ํ™œ์šฉํ•œ ์ฑ—๋ด‡์— ๋Œ€ํ•œ ๊ด€์‹ฌ์ด ๋†’์•„์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ฑ—๋ด‡ ์„ค๊ณ„์— ๊ด€ํ•œ ์ข‹์€ ๊ธ€์ด ์žˆ์–ด ๋ฒˆ์—ญ์„ ํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค. ์ด ๊ธ€์€ IBM DeveloperWorks์— ๊ธฐ์žฌ๋œ Michael Yuan์˜ ๊ธ€์„ ๋ฒˆ์—ญํ•œ ๊ฒƒ์œผ๋กœ ์˜์—ญ์ด ์žˆ์Šต๋‹ˆ๋‹ค. - ๊น€์ •์ฃผ([email protected])


๋Œ€ํ™”ํ˜• ์ฑ—๋ด‡ ์„ค๊ณ„์˜ ๊ณผ์ œ

์‚ฌ์šฉ์ž๋Š” ์ฑ—๋ด‡์ด ๋งค์šฐ ๊ฐ„๋‹จํ•˜๊ณ  ์ตœ์†Œํ•œ์˜ ์š”๊ตฌ๋งŒ ํ•˜๊ธฐ์— ์ข‹์•„ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๊ฒƒ์€ ๋Œ€ํ™”์‹ ๋ฌธ์ž ๋ฉ”์‹œ์ง€์ฒ˜๋Ÿผ ๊ฐ„๋‹จํ•ด์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ, ์‚ฌ์šฉ์ž๋Š” ์ž์‹ ์ด ์„ ํ˜ธํ•˜๋Š” ๋ฉ”์‹œ์ง€ ์•ฑ์— ๊ณ„์† ๋จธ๋ฌผ๊ธฐ๋ฅผ ์„ ํ˜ธํ•ฉ๋‹ˆ๋‹ค. ์•ฑ, ์›น URL, ๋ฉ”๋‰ด, ๋ฒ„ํŠผ, ๊ด‘๊ณ , ํฌ๋กฌ ๋ฐ ๊ธฐํƒ€ ์š”์†Œ๋ฅผ ํƒ์ƒ‰ํ•˜์ง€ ์•Š๊ณ  ๋ฐ”๋กœ ๋ชฉํ‘œ๋ฅผ ๋‹ฌ์„ฑํ•˜๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์ด ๋‹จ์ˆœ์„ฑ์€ ํฐ ์„ค๊ณ„ ๊ณผ์ œ๋„ ์ œ์‹œํ•ฉ๋‹ˆ๋‹ค. ์ฑ—๋ด‡์€ ์‚ฌ์šฉ์ž์˜ ๋ง์„ ์ •ํ™•ํ•˜๊ฒŒ ์ดํ•ดํ•˜๊ณ  ์ ์ ˆํžˆ ํ–‰๋™ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ ์˜ค๋Š˜๋‚  ์ตœ๊ณ ์˜ ์ž์—ฐ์–ด AI (์ธ๊ณต ์ง€๋Šฅ)์—๊ฒŒ๋„ ๋งค์šฐ ์–ด๋ ค์šด ๊ณผ์ œ์ž…๋‹ˆ๋‹ค.

ํ˜„์žฌ ์ƒํƒœ์˜ AI์—์„œ๋Š”, ๋Œ€ํ™”์‹ ๋ฌธ์ž ๋ฉ”์‹œ์ง€ ๋˜๋Š” ๋Œ€ํ™”์‹(Conversational) UI, ์ฆ‰ CUI๋Š” (์•ˆํƒ€๊น๊ฒŒ๋„) ๊ฑฐ์˜ ํ•ญ์ƒ ์ž˜ ์„ค๊ณ„๋œ ๊ทธ๋ž˜ํ”ฝ UI(GUI)๋ณด๋‹ค ์—ด๋“ฑํ•ฉ๋‹ˆ๋‹ค. GUI์™€ ๋น„๊ตํ•˜์—ฌ CUI๋Š” ์ดˆ๊ธฐ ๋‹จ๊ณ„์— ์žˆ์Šต๋‹ˆ๋‹ค. ์ปค๋ฎค๋‹ˆํ‹ฐ๋กœ์„œ ์šฐ๋ฆฌ๋Š” ์—ฌ์ „ํžˆ CUI์˜ ๋””์ž์ธ ํŒจํ„ด๊ณผ ์šฐ์ˆ˜ ์‚ฌ๋ก€๋ฅผ ๋ชจ์ƒ‰ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ํŠœํ† ๋ฆฌ์–ผ์—์„œ๋Š” ์ฑ—๋ด‡์ด ์™œ ์‹คํŒจํ•˜๊ณ  ์„ฑ๊ณตํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค.

@Hardtack
Hardtack / FunctionalReactiveMVC.md
Last active August 1, 2019 07:54
์ˆœ์ˆ˜ ํ•จ์ˆ˜ํ˜• ์ƒํƒœ ์ „์ด์™€ Functional Reactive ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ์ด์šฉํ•œ Reactive Model View Controller ์„ค๊ณ„ ํŒจํ„ด (1)

์ˆœ์ˆ˜ ํ•จ์ˆ˜ํ˜• ์ƒํƒœ ์ „์ด์™€ Functional Reactive ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ์ด์šฉํ•œ Reactive Model View Controller ์„ค๊ณ„ ํŒจํ„ด (1)

์ตœ๊ทผ ๋งŽ์€ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด์—์„œ๋Š” ํ•จ์ˆ˜ํ˜• ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ์ง€์›ํ•˜๊ธฐ ์œ„ํ•œ ๋‹ค์–‘ํ•œ ๋„๊ตฌ๋“ค์„ ์ œ๊ณตํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ์ค‘ Swift๋Š” ์ตœ์‹  ํŠธ๋ Œ๋“œ๊ฐ€ ๋งŽ์ด ๋ฐ˜์˜๋œ ์–ธ์–ด๋กœ์จ, ์Šค๋ชฐํ† ํฌํ˜• ๊ฐ์ฒด์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ๊ณผ ํ•จ์ˆ˜ํ˜• ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ํ•จ๊ป˜ ์ง€์›ํ•จ์œผ๋กœ์จ ๊ฐœ๋ฐœ์ž๋“ค์—๊ฒŒ ํ•จ์ˆ˜ํ˜• ํ”„๋กœ๊ทธ๋ž˜๋ฐ์— ๋Œ€ํ•œ ์ ‘๊ทผ์„ฑ์„ ์ฆ๊ฐ€์‹œ์ผฐ์Šต๋‹ˆ๋‹ค.

๊ทธ๋ฆฌ๊ณ  Reactive ํ”„๋กœ๊ทธ๋ž˜๋ฐ์ด ์กฐ๋ช…์„ ๋ฐ›๊ธฐ ์‹œ์ž‘ํ•˜๋ฉฐ, Reactive Extension๊ณผ ๊ฐ™์€ ํ›Œ๋ฅญํ•œ ๋ฆฌ์•กํ‹ฐ๋ธŒ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ์œ„ํ•œ ๋„๊ตฌ๋ฅผ ์ œ๊ณตํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. Reactive Extension์€ Reactive ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ์ง€ํ–ฅํ•˜๊ณ  ์žˆ์œผ๋ฉฐ, ์ด๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ Functional Reactive ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ์‹คํ˜„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ, ๋‹ค์–‘ํ•œ ์–ธ์–ด์— ํฌํŒ…์ด ๋˜์–ด์žˆ์–ด ์„œ๋กœ ๋‹ค๋ฅธ ์–ธ์–ด์—์„œ ์ผ๊ด„์ ์ธ ํŒจํ„ด์„ ์ ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ด ๊ธ€์—์„  ์ˆœ์ˆ˜ ํ•จ์ˆ˜์  ์ƒํƒœ ์ „์ด์— ๋Œ€ํ•ด ๊ฐ„๋‹จํ•˜๊ฒŒ ์•Œ์•„๋ณด๊ณ , ์ด๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ Functional Reactive ํ”„๋กœ๊ทธ๋ž˜๋ฐ์ด ์ง€ํ–ฅํ•˜๋Š”๋ฐ”์™€, ์ด๋Ÿฌํ•œ ๊ธฐ๋ฒ•๋“ค์˜ ์žฅ์ ์„ ๊ทน๋Œ€ํ™” ํ•  ์ˆ˜ ์žˆ๋Š” ์„ค๊ณ„์— ๋Œ€ํ•œ ๊ธฐ๋ณธ ์›์น™, ๊ทธ๋ฆฌ๊ณ  ๊ทธ์— ๋”ฐ๋ฅธ ์„ค๊ณ„์˜ ์˜ˆ๋ฅผ ๋‹ค๋ฃฐ ๊ฒƒ ์ž…๋‹ˆ๋‹ค.

@NSExceptional
NSExceptional / XcodeBuildSettingsReference.md
Last active October 27, 2025 17:47
The Xcode Build Settings Reference in a searchable document, as of Xcode 8.3.2

Build settings reference

Active Build Action (ACTION)

A string identifying the build system action being performed.

Additional SDKs (ADDITIONAL_SDKS)

The locations of any sparse SDKs that should be layered on top of the one specified by Base SDK (SDKROOT). If more than one SDK is listed, the first one has highest precedence. Every SDK specified in this setting should be a "sparse" SDK, for example, not an SDK for an entire macOS release.

Alternate Install Group (ALTERNATE_GROUP)

Note

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Updates

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
@lattner
lattner / async_swift_proposal.md
Last active October 30, 2025 15:46 — forked from oleganza/async_swift_proposal.md
Concrete proposal for async semantics in Swift

Async/Await for Swift

Introduction

Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.

This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.

@lattner
lattner / TaskConcurrencyManifesto.md
Last active December 10, 2025 18:44
Swift Concurrency Manifesto
@tseho
tseho / config.yml
Last active April 5, 2022 20:38
circleci + docker-compose + layers cache
version: 2
jobs:
build:
docker:
- image: docker:17.06.0-ce-git
steps:
- checkout
- setup_remote_docker
- run:
name: Install Docker Compose