Skip to content

Instantly share code, notes, and snippets.

View devxoul's full-sized avatar
👨‍💻
Always coding

Suyeol Jeon devxoul

👨‍💻
Always coding
View GitHub Profile

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.
@NSExceptional
NSExceptional / XcodeBuildSettingsReference.md
Last active May 5, 2023 18:57
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)

@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 프로그래밍이 지향하는바와, 이러한 기법들의 장점을 극대화 할 수 있는 설계에 대한 기본 원칙, 그리고 그에 따른 설계의 예를 다룰 것 입니다.

@haje01
haje01 / 대화형 챗봇 설계의 과제.md
Last active June 15, 2022 09:33
대화형 챗봇 설계의 과제

최근 인공지능을 활용한 챗봇에 대한 관심이 높아지고 있습니다. 챗봇 설계에 관한 좋은 글이 있어 번역을 해보았습니다. 이 글은 IBM DeveloperWorks에 기재된 Michael Yuan의 글을 번역한 것으로 의역이 있습니다. - 김정주(haje01@gmail.com)


대화형 챗봇 설계의 과제

사용자는 챗봇이 매우 간단하고 최소한의 요구만 하기에 좋아합니다. 그것은 대화식 문자 메시지처럼 간단해질 수 있습니다. 또한, 사용자는 자신이 선호하는 메시지 앱에 계속 머물기를 선호합니다. 앱, 웹 URL, 메뉴, 버튼, 광고, 크롬 및 기타 요소를 탐색하지 않고 바로 목표를 달성하고자 합니다. 그러나 이 단순성은 큰 설계 과제도 제시합니다. 챗봇은 사용자의 말을 정확하게 이해하고 적절히 행동해야 합니다. 이것은 오늘날 최고의 자연어 AI (인공 지능)에게도 매우 어려운 과제입니다.

현재 상태의 AI에서는, 대화식 문자 메시지 또는 대화식(Conversational) UI, 즉 CUI는 (안타깝게도) 거의 항상 잘 설계된 그래픽 UI(GUI)보다 열등합니다. GUI와 비교하여 CUI는 초기 단계에 있습니다. 커뮤니티로서 우리는 여전히 CUI의 디자인 패턴과 우수 사례를 모색하고 있습니다. 이 튜토리얼에서는 챗봇이 왜 실패하고 성공할 수 있는지 설명합니다.

@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 }
}
@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
@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 {
#!/usr/bin/env bash
# Automatically installs swiftenv and run's swiftenv install.
# This script was designed for usage in CI systems.
git clone --depth 1 https://github.com/kylef/swiftenv.git ~/.swiftenv
export SWIFTENV_ROOT="$HOME/.swiftenv"
export PATH="$SWIFTENV_ROOT/bin:$SWIFTENV_ROOT/shims:$PATH"
if [ -f ".swift-version" ] || [ -n "$SWIFT_VERSION" ]; then
swiftenv install -s
@klundberg
klundberg / weakify.swift
Last active May 13, 2020 08:22
Weakify functions to help you weakly bind instances to static method references
// these functions take a swift class's statically referenced method and the instance those methods
// should apply to, and returns a function that weakly captures the instance so that you don't have
// to worry about memory retain cycles if you want to directly use an instance method as a handler
// for some object, like NSNotificationCenter.
//
// For more information, see this post:
// http://www.klundberg.com/blog/capturing-objects-weakly-in-instance-method-references-in-swift/
func weakify <T: AnyObject, U>(owner: T, f: T->U->()) -> U -> () {
return { [weak owner] obj in
@ymjing
ymjing / Monaco for Powerline.md
Last active March 24, 2022 14:34
Powerline-patched Monaco for Windows and OSX

Powerline-patched Monaco for Windows and OSX

This font is manually patched with Fontforge. It includes the glyphs from DejaVu Sans Mono for Powerline.

I recommend DirectWrite-patched VIM builds. I'm using KaoriYa's build (http://www.kaoriya.net/software/vim/)

Usage

Add the following lines to your .vimrc/_vimrc: