Skip to content

Instantly share code, notes, and snippets.

View mfaani's full-sized avatar

Mohammad Faani mfaani

View GitHub Profile
@mfaani
mfaani / gist:2efc6dba501cca174ffd5772880329e1
Last active March 12, 2019 15:30
Increase WWDC Playback speed on Chrome/Safari
// Just open your browser's inspector. In its console, type:
document.getElementsByTagName("video")[0].playbackRate = 2.0
// https://stackoverflow.com/questions/7367472/why-does-url-pathcomponents-contain-an/7368129#7368129
import Foundation
let urlString1 = "http://yahoo.com/video/3" // scheme: http | host: yahoo.com | comps ["/", "video", "3"]
let urlString2 = "video/3" // scheme: Empty | host: Empty | comps ["video", "3"]
let urlString3 = "/video/3" // scheme: Empty | host: Empty | comps ["/", "video", "3"]
let urlString4 = "Facebook://Feed/3" // scheme: Facebook | host: Feed | comps ["/", "3"]
let urlString5 = "yahoo.com" // scheme: Empty | host: Empty | comps ["yahoo.com"]
let urlString6 = "giberish://yahoo.com/video/3" // scheme: giberish | host: yahoo.com | comps ["/", "video", "3"]
//
// ViewController.swift
// IntrinsicLabel
//
// Created by Faani, Mohammad on 10/5/01.
// Copyright © 2018 Funnex. All rights reserved.
//
import UIKit