show dbs
This file contains hidden or 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 | |
| import AuthenticationServices | |
| class ViewController: UIViewController { | |
| private var authSession: ASWebAuthenticationSession? | |
| private let clientId: String = "11111" | |
| private let urlScheme: String = "youUrlScheme" | |
| private let fallbackUrl: String = "yourFallbackUrl.com" |
Author: Chris Lattner
This file contains hidden or 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 | |
| public extension UITableView { | |
| public func beginRefreshing() { | |
| // Make sure that a refresh control to be shown was actually set on the view | |
| // controller and the it is not already animating. Otherwise there's nothing | |
| // to refresh. | |
| guard let refreshControl = refreshControl, !refreshControl.isRefreshing else { | |
| return |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "gopkg.in/mgo.v2" | |
| "gopkg.in/mgo.v2/bson" | |
| ) | |
| func main() { | |
| session, err := mgo.Dial("localhost") | |
| if err != nil { |