Skip to content

Instantly share code, notes, and snippets.

@hlung
hlung / fix-xcode-sdk
Last active December 24, 2015 13:39 — forked from rnapier/fix-xcode
More verbose print and check to process only *.platform folders.
#!/usr/bin/python
# fix-xcode-sdk
# Rob Napier <robnapier@gmail.com>
# Forked by Thongchai Kolyutsakul <thongchaikol@gmail.com>
# (https://gist.github.com/hlung/6806651)
# Script to link in all your old SDKs every time you upgrade Xcode
# Create a directory called /SDKs (or modify source_path).
# Under it, put all the platform directories:
@hlung
hlung / keyboardHeightObservable.swift
Last active June 11, 2023 11:41 — forked from laurilehmijoki/keyboardHeightObservable.swift
RxSwift Observable on iOS keyboard height. Updated from original. Changelog below.
import RxSwift // Version 3.2.0
import RxCocoa // Version 3.2.0
typealias KeyboardHeightInfo = (CGFloat, TimeInterval)
func keyboardHeight() -> Driver<KeyboardHeightInfo> {
return Observable
.from([
NotificationCenter.default.rx.notification(NSNotification.Name.UIKeyboardWillShow)
.map { notification -> KeyboardHeightInfo in