Skip to content

Instantly share code, notes, and snippets.

View Limon-O-O's full-sized avatar
🍋

Limon Limon-O-O

🍋
View GitHub Profile
@evgenmikhaylov
evgenmikhaylov / UIApplication+VisibleViewControllers.swift
Last active January 22, 2023 20:28
UIApplication Swift category to add visibleViewControllers property
import UIKit
extension UIApplication {
private struct AssociatedObjectsKeys {
static var visibleViewControllersPointers = "UIApplication_visibleViewControllersPointers"
}
fileprivate var visibleViewControllersPointers: NSPointerArray {
var pointers = objc_getAssociatedObject(self, &AssociatedObjectsKeys.visibleViewControllersPointers) as! NSPointerArray?
extension String {
init<T>(dumping x: T) {
self.init()
dump(x, to: &self)
}
}
func assertDumpsEqual<T>(_ lhs: @autoclosure () -> T, _ rhs: @autoclosure () -> T, file: StaticString = #file, line: UInt = #line) {
assert(String(dumping: lhs()) == String(dumping: rhs()), "Expected dumps to be equal.", file: file, line: line)
}
@JamesMenetrey
JamesMenetrey / README.md
Last active September 29, 2022 08:27
Install Oh-My-Zsh + iTerm2 with Solarized + System-wide console in 2017 (macOS)

Install iTerm2 with Solarized in 2017

Here is the looks and feel of your terminal once the tutorial has been applied on your system:

Install iTerm2

Using Homebrew: