This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
protocol IReusableView: AnyObject where Self: UIView { | |
func prepareForReuse() | |
} | |
class TableViewCell<ViewType: IReusableView>: UITableViewCell { | |
let wrappedView = ViewType() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewModelController<ViewModelType: IViewModel>: UIViewController { | |
let viewModel: ViewModelType | |
required init(viewModel: ViewModelType) { | |
self.viewModel = viewModel | |
super.init(nibName: nil, bundle: nil) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Prefer IPv4 over IPv6 - make apt-get faster | |
sudo sed -i "s/#precedence ::ffff:0:0\/96 100/precedence ::ffff:0:0\/96 100/" /etc/gai.conf | |
# Update Packages | |
sudo apt-get update -y | |
sudo apt-get upgrade -y | |
# Nano Editor |
NewerOlder