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 | |
@objc(CLBLinearGradientView) | |
class LinearGradientView: UIView { | |
@objc var layerBacked: Bool { | |
didSet { | |
switch (layerBacked, layerView) { | |
case (true, .none): addLayerView() | |
case (false, .some): removeLayerView() | |
default: break |
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
struct SomeStruct { | |
init(someReallyExpensiveValue: @autoclosure () -> Int) { | |
print("really expensive") | |
Thread.sleep(forTimeInterval: TimeInterval(someReallyExpensiveValue() * 1)) | |
} | |
init(someEvenMoreExpensiveValue: @autoclosure () -> Int) { | |
print("even more expensive") | |
Thread.sleep(forTimeInterval: TimeInterval(someEvenMoreExpensiveValue() * 5)) | |
} |
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
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
require 'colored2' | |
require 'octokit' | |
require 'yaml' | |
if ENV['GITHUB_TOKEN'].nil? | |
puts '❗️ GITHUB_TOKEN environment variable is not set!'.red | |
puts 'Supply a token from gh CLI by running `GITHUB_TOKEN=$(gh auth token) script/check-outdated-deps.rb`' |
OlderNewer