Skip to content

Instantly share code, notes, and snippets.

@hmchen
hmchen / README.md
Created December 9, 2023 04:58 — forked from IsaacXen/README.md
(Almost) Every WWDC videos download links for aria2c.
@hmchen
hmchen / md
Created December 25, 2017 17:21
Videos to watch
https://www.infoq.com/presentations/Simple-Made-Easy
class BufferingStackView: UIStackView {
private var viewBuffer: ViewBuffer = ViewBuffer()
func prepare<T: UIView>(viewCount: Int, config: @escaping (_ index: Int, _ view: T) -> Void) {
let currentViewCount = self.arrangedSubviews.count
let neededViewCount = viewCount
let diff = neededViewCount - currentViewCount
let absDiff = abs(diff)
let shouldDelete = diff < 0
if shouldDelete {
(0..<absDiff).forEach({ _ in
@hmchen
hmchen / xcode.md
Created September 27, 2017 20:54
Xcode Tips

// Use an older version of Xcode to build on a new device. // Example use Xcode 8 to build on a device running iOS 11

sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.* \ /Applications/Xcode8.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/