- Go to Firebase's Dashboard >
Develop
>Hosting
>Connect Domain
. - Enter the custom domain that you'd like to connect to your Hosting site.
- (Optional) Check the box to redirect of all requests on the custom domain to a second specified domain.
- Click Continue to initiate the validation process.
- Go to Namecheap's Dashboard >
Domain List
>Manage
>Advanced DNS
. - Under
Host Records
, add a new record with:
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
abstract contract Context { | |
function _msgSender() internal view virtual returns (address payable) { | |
return payable(msg.sender); | |
} | |
function _msgData() internal view virtual returns (bytes memory) { |
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
Visit this website by Safari mobile and tap to the buttion "Find My UDID": http://udid.store. | |
You don't need the iTunes or plug your cable into the Mac. |
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
func measure(title: String!, call: () -> Void) { | |
let startTime = CACurrentMediaTime() | |
call() | |
let endTime = CACurrentMediaTime() | |
if let title = title { | |
print("\(title): ") | |
} | |
print("Time - \(endTime - startTime)") | |
} |
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
func openURL(url: String) { | |
var responder: UIResponder = self | |
while responder.nextResponder() != nil { | |
responder = responder.nextResponder()! | |
NSLog("responder = %@", responder) | |
if responder.respondsToSelector("openURL:") == true { | |
responder.performSelector("openURL:", withObject: NSURL(string: url)) | |
} | |
} | |
} |
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 Foundation | |
extension String | |
{ | |
// Works in Xcode but not Playgrounds because of a bug with .insert() | |
mutating func insertString(string:String,ind:Int) { | |
var insertIndex = advance(self.startIndex, ind, self.endIndex) | |
for c in string { |