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
@objc protocol Refreshable | |
{ | |
/// The refresh control | |
var refreshControl: UIRefreshControl? { get set } | |
/// The table view | |
var tableView: UITableView! { get set } | |
/// the function to call when the user pulls down to refresh | |
@objc func handleRefresh(_ sender: Any); |
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 | |
# This Works is placed under the terms of the Copyright Less License, | |
# see file COPYRIGHT.CLL. USE AT OWN RISK, ABSOLUTELY NO WARRANTY. | |
# | |
# COPYRIGHT.CLL can be found at http://permalink.de/tino/cll | |
# (CLL is CC0 as long as not covered by any Copyright) | |
OOPS() { echo "OOPS: $*" >&2; exit 23; } | |
[ -z "`pidof openssl`" ] || OOPS "openssl running, consider: killall openssl" |
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 Foundation | |
// Why bytesView rather than just extending NSData directly? | |
// Because this way we can keep our extension internal and not conflict | |
// with someone who imports us and has also extended NSData. | |
// If you're top-level code, you can just hoist everyting up to NSData directly. | |
internal extension NSData { | |
var bytesView: BytesView { return BytesView(self) } | |
} |