-
Install Homebrew The Missing Package Manager for macOS (or Linux) — Homebrew
-
Download Miniforge3
-
Install Miniforge3 and restart your terminal as soon as the installation finishes:
This file contains 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
public class CountryFlags { | |
private static String A = getEmojiByUnicode(0x1F1E6); | |
private static String B = getEmojiByUnicode(0x1F1E7); | |
private static String C = getEmojiByUnicode(0x1F1E8); | |
private static String D = getEmojiByUnicode(0x1F1E9); | |
private static String E = getEmojiByUnicode(0x1F1EA); | |
private static String F = getEmojiByUnicode(0x1F1EB); | |
private static String G = getEmojiByUnicode(0x1F1EC); | |
private static String H = getEmojiByUnicode(0x1F1ED); | |
private static String I = getEmojiByUnicode(0x1F1EE); |
This file contains 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 Quick | |
import Nimble | |
class CodableDecimalSpec: QuickSpec { | |
override func spec() { | |
context("encode Model to JSON") { | |
var model: Model! | |
var json: [String: String]? | |
beforeEach { |
This file contains 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
/// Withable is a simple protocol to make constructing | |
/// and modifying objects with multiple properties | |
/// more pleasant (functional, chainable, point-free) | |
public protocol Withable { | |
init() | |
} | |
public extension Withable { | |
/// Construct a new instance, setting an arbitrary subset of properties | |
init(with config: (inout Self) -> Void) { |
This file contains 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 | |
/// A UILabel subclass that detects and attempts to fix intrinsicContentSize bugs in UILabel | |
class iOS11CompatibleLabel: UILabel { | |
override var intrinsicContentSize: CGSize { | |
// First attempt at a fix... | |
// All UILabels that misbehave have numberOfLines==0 and preferredMaxLayoutWidth=0 | |
// but all UILabels that have these two properties as 0 do not necessarily misbehave |
This file contains 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
extension XCUIApplication { | |
private struct Constants { | |
// Half way accross the screen and 10% from top | |
static let topOffset = CGVector(dx: 0.5, dy: 0.1) | |
// Half way accross the screen and 90% from top | |
static let bottomOffset = CGVector(dx: 0.5, dy: 0.9) | |
} | |
var screenTopCoordinate: XCUICoordinate { |
This file contains 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
STUFF = this is some stuff |
This file contains 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
//Simple Type - Person | |
struct Person: Codable { | |
let name: String | |
let age: Int | |
func getString() -> String { | |
return "Name: \(name), Age: \(age)" | |
} | |
} |
NewerOlder