Skip to content

Instantly share code, notes, and snippets.

View dlpigpen's full-sized avatar
🎯
Focusing

MD dlpigpen

🎯
Focusing
View GitHub Profile

Connect Firebase Hosting to Namecheap Custom Domain

SOURCE, SOURCE, SOURCE

  1. Go to Firebase's Dashboard > Develop > Hosting > Connect Domain.
  2. Enter the custom domain that you'd like to connect to your Hosting site.
  3. (Optional) Check the box to redirect of all requests on the custom domain to a second specified domain.
  4. Click Continue to initiate the validation process.
  5. Go to Namecheap's Dashboard > Domain List > Manage > Advanced DNS.
  6. Under Host Records, add a new record with:
@dlpigpen
dlpigpen / clear_state_of_contract_on_near_protocol.md
Created July 11, 2022 11:11 — forked from ilyar/clear_state_of_contract_on_near_protocol.md
How do clear the state of a contract on Near protocol?

How do clear the state of a contract on Near protocol?

Prepare

source neardev/dev-account.env
export CONTRACT_NAME=$CONTRACT_NAME

View state

@dlpigpen
dlpigpen / Measure.swift
Created June 22, 2016 08:06 — forked from kostiakoval/Measure.swift
Measure Speed in Swift
func measure(title: String!, call: () -> Void) {
let startTime = CACurrentMediaTime()
call()
let endTime = CACurrentMediaTime()
if let title = title {
print("\(title): ")
}
print("Time - \(endTime - startTime)")
}
@dlpigpen
dlpigpen / gist:49ce68cb435c93530305
Created December 10, 2015 02:07 — forked from ikhanhmai/gist:b9a2c3a3263db8d9e9ac
iOS - openURL from Custom Keyboard Extension
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))
}
}
}
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 {