Skip to content

Instantly share code, notes, and snippets.

View ElonPark's full-sized avatar
๐Ÿ“ฑ
๏ฃฟ iOS Software Engineer

Elon Park ElonPark

๐Ÿ“ฑ
๏ฃฟ iOS Software Engineer
View GitHub Profile
@ElonPark
ElonPark / duplicate_xcode_project_target.rb
Last active February 6, 2018 09:28 — forked from ratazzi/duplicate_xcode_project_target.rb
Duplicate Xcode Project Target with Ruby
#!/usr/bin/env ruby
require 'rubygems'
require 'xcodeproj'
name = 'test_copy'
proj_path = 'test.xcodeproj'
proj = Xcodeproj::Project.open(proj_path)
src_target = proj.targets.last #find { |item| item.to_s == 'test' }
@ElonPark
ElonPark / gist:4040787393fd16db2d2c5d576e6177e1
Created March 21, 2018 09:25 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@ElonPark
ElonPark / GitCommitEmoji.md
Created February 11, 2019 18:32 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji

Inspired by dannyfritz/commit-message-emoji

See also gitmoji.

Commit type Emoji
Initial commit ๐ŸŽ‰ :tada:
Version tag ๐Ÿ”– :bookmark:
New feature โœจ :sparkles:
Bugfix ๐Ÿ› :bug:
@ElonPark
ElonPark / BetterXcodeJumpToCounterpartSwift.org
Created November 19, 2019 12:26 — forked from danielmartin/BetterXcodeJumpToCounterpartSwift.org
Add support for a better Xcode's Jump to Next Counterpart in Swift

If you work on a Swift project that follows the Model-View-ViewModel (MVVM) architecture or similar, you may want to jump to counterpart in Xcode from your view to your model, and then to your view model. (ie. by using Ctrl+Cmd+Up and Ctrl+Cmd+Down).

You can do this in recent versions of Xcode by setting a configuration default.

From a terminal, just type this command and press Enter:

defaults write com.apple.dt.Xcode IDEAdditionalCounterpartSuffixes -array-add "ViewModel" "View"
//:
//: UIView Animation Syntax Sugar
//:
//: Created by Andyy Hope on 18/08/2016.
//: Twitter: @andyyhope
//: Medium: Andyy Hope, https://medium.com/@AndyyHope
import UIKit
extension UIView {
import RIBs
import RxSwift
import RxRelay
import ReactorKit

protocol FAQsRouting: ViewableRouting {
  func routeToFAQ(_ faq: FAQ)
  func detachFAQ()
}
@ElonPark
ElonPark / AutoRetry.swift
Created October 16, 2020 05:50 — forked from kean/AutoRetry.swift
Smart Auto Retry using RxSwift
// The MIT License (MIT)
//
// Copyright (c) 2017 Alexander Grebenyuk (github.com/kean).
import Foundation
import RxSwift
import RxCocoa
extension ObservableType {
//: Playground - noun: a place where people can play
import Foundation
import UIKit
import Darwin.os.lock
/**
A threadsafe, non-blocking (on the write side), zero-allocation ring-buffer implementation.
@ElonPark
ElonPark / writing.md
Created August 2, 2022 11:39 — forked from longfin/writing.md
์—”์ง€๋‹ˆ์–ด๋ฅผ ์œ„ํ•œ ๊ธ€์“ฐ๊ธฐ

์ด ๊ธ€์€ Heinrich Hartmann ๋‹˜์ด ์ž‘์„ฑํ•˜์‹  ๊ธ€์„ ํ•œ๊ตญ์–ด๋กœ ๋ฒˆ์—ญํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์›๋ฌธ์€ https://www.heinrichhartmann.com/posts/writing/ ์—์„œ ํ™•์ธํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.


๊ธ€์“ฐ๊ธฐ๋Š” ํฐ ์กฐ์ง์—์„œ ์˜ํ–ฅ๋ ฅ์„ ๋ฐœํœ˜ํ•˜๋Š” ๋ฐ ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค. ๊ฒฝ๋ ฅ ์žˆ๋Š” ์†Œํ”„ํŠธ์›จ์–ด ์—”์ง€๋‹ˆ์–ด๋กœ์„œ์˜ ๊ธ€์“ฐ๊ธฐ๋Š” ์ง๋ฌด ๋ฒ”์œ„๋ฅผ ํ™•์žฅํ•˜๊ณ  ๊ฒฝ๋ ฅ์„ ๋ฐœ์ „์‹œํ‚ค๊ธฐ ์œ„ํ•ด ํš๋“ํ•ด์•ผ ํ•˜๋Š” ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๊ธฐ์ˆ ์ž…๋‹ˆ๋‹ค.

๊ธ€์“ฐ๊ธฐ๋Š” ์–ด๋ ต์Šต๋‹ˆ๋‹ค. ๋งŽ์€ ์†Œํ”„ํŠธ์›จ์–ด ์—”์ง€๋‹ˆ์–ด๋“ค์ด ๊ธ€์“ฐ๊ธฐ์™€ ์”จ๋ฆ„ํ•˜์ฃ . ์ €๋„ ๊ฐœ์ธ์ ์œผ๋กœ ๋ฌธํ•™์— ๋Œ€ํ•œ ๊ด€์‹ฌ์ด ์—†๊ธฐ ๋•Œ๋ฌธ์— ๊ธ€์“ฐ๊ธฐ๊ฐ€ ์ž์—ฐ์Šค๋Ÿฝ์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.

@ElonPark
ElonPark / libdispatch-efficiency-tips.md
Created October 16, 2025 16:34 — forked from tclementdev/libdispatch-efficiency-tips.md
Making efficient use of the libdispatch (GCD)

libdispatch efficiency tips

The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).

My take-aways are:

  • You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.

  • Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse