last update: Dec 4, 2020
- macOS >= 10.14 (Mojave); tested with 10.15 (Catalina)
- homebrew properly installed
# The trick is to link the DeviceSupport folder from the beta to the stable version. | |
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
# (A similar approach works for older versions too, just change the version number after DeviceSupport) |
import WebKit | |
class NativeWebViewController: UIViewController { | |
let viewportScriptString = "var meta = document.createElement('meta'); meta.setAttribute('name', 'viewport'); meta.setAttribute('content', 'width=device-width'); meta.setAttribute('initial-scale', '1.0'); meta.setAttribute('maximum-scale', '1.0'); meta.setAttribute('minimum-scale', '1.0'); meta.setAttribute('user-scalable', 'no'); document.getElementsByTagName('head')[0].appendChild(meta);" | |
let disableSelectionScriptString = "document.documentElement.style.webkitUserSelect='none';" | |
let disableCalloutScriptString = "document.documentElement.style.webkitTouchCallout='none';" | |
override func viewDidLoad() { | |
// 1 - Make user scripts for injection |
:root { | |
--ease-in-quad: cubic-bezier(.55, .085, .68, .53); | |
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19); | |
--ease-in-quart: cubic-bezier(.895, .03, .685, .22); | |
--ease-in-quint: cubic-bezier(.755, .05, .855, .06); | |
--ease-in-expo: cubic-bezier(.95, .05, .795, .035); | |
--ease-in-circ: cubic-bezier(.6, .04, .98, .335); | |
--ease-out-quad: cubic-bezier(.25, .46, .45, .94); | |
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1); |
// Router.swift | |
import Alamofire | |
enum Router: URLRequestConvertible { | |
static let baseURLString = "https://private-85a46-routable.apiary-mock.com/" | |
case readUsers | |
case createUser(parameters: Parameters) |
// | |
// Convenience extensions to read images into textures. | |
// | |
import UIKit | |
import OpenGLES | |
extension DrawContext { | |
/// Make texture with an image in it. | |
public func makeTexture(id: TextureId? = nil, width: Int? = nil, height: Int? = nil, fromFileContents filename: String) -> TextureId { |
import Foundation | |
/** | |
A swift protocol to make any Int enum able to count its cases. | |
Super-useful for making enums to help you deal with sections in tableviews without having to maintain a case for the count of the enum. | |
Originally developed by Logan Wright for Swift 2.0 here: | |
https://gist.github.com/LoganWright/c8a26b1faf538e40f747 | |
const firebase = require('firebase-admin'); | |
var serviceAccountSource = require("./source.json"); // source DB key | |
var serviceAccountDestination = require("./destination.json"); // destiny DB key | |
const sourceAdmin = firebase.initializeApp({ | |
credential: firebase.credential.cert(serviceAccountSource) | |
}); | |
const destinyAdmin = firebase.initializeApp({ |
[ | |
{ "city": "Abbeville", "state": "Louisiana" }, | |
{ "city": "Aberdeen", "state": "Maryland" }, | |
{ "city": "Aberdeen", "state": "Mississippi" }, | |
{ "city": "Aberdeen", "state": "South Dakota" }, | |
{ "city": "Aberdeen", "state": "Washington" }, | |
{ "city": "Abilene", "state": "Texas" }, | |
{ "city": "Abilene", "state": "Kansas" }, | |
{ "city": "Abingdon", "state": "Virginia" }, | |
{ "city": "Abington", "state": "Massachusetts" }, |
last update: Dec 4, 2020