-
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) { |
user name — [email protected]
mail server address — pop.yandex.com
connection security — SSL
port — 995
To import a set of Objective-C files in the same framework target as your Swift code, you’ll need to import those files into the Objective-C umbrella header for the framework.
- Under Build Settings, in Packaging, make sure the Defines Module setting for that framework target is set to “Yes”.
- In your umbrella header file (
FrameworkName.h
), import every Objective-C header you want to expose to Swift. For example:
#import <XYZ/XYZCustomCell.h>
#import <XYZ/XYZCustomView.h>
#import <XYZ/XYZCustomViewController.h>
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 |
NewerOlder