TODO: Write a project description
TODO: Describe the installation process
/** | |
* Copyright 2019 Google LLC. | |
* SPDX-License-Identifier: Apache-2.0 | |
*/ | |
function getEnvironment() { | |
var environment = { | |
spreadsheetID: "<REPLACE WITH YOUR SPREADSHEET ID>", | |
firebaseUrl: "<REPLACE WITH YOUR REALTIME DB URL>" | |
}; |
struct User: Equatable { | |
var firstName: String | |
var lastName: String | |
} | |
@main | |
struct MyApp: App { | |
@State var value = User(firstName: "", lastName: "") | |
@State var showEdit = false |
import UIKit | |
#if canImport(SwiftUI) && DEBUG | |
import SwiftUI | |
struct UIViewControllerPreview<ViewController: UIViewController>: UIViewControllerRepresentable { | |
let viewController: ViewController | |
init(_ builder: @escaping () -> ViewController) { | |
viewController = builder() | |
} |
It is loaded by default by /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist.
If you run
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
Marlin/Configuration{,_adv}.h
)
nvim -d {Marlin,config/Artillery/Genius}/Configuration.h
, same for Configuration_adv.h
LIN_ADVANCE
instead of S_CURVE_ACCELERATION
(don't work together)TFT-config.ini
)
extension UITapGestureRecognizer { | |
func didTapAttributedTextInLabel(label: UILabel, inRange targetRange: NSRange) -> Bool { | |
// Create instances of NSLayoutManager, NSTextContainer and NSTextStorage | |
let layoutManager = NSLayoutManager() | |
let textContainer = NSTextContainer(size: CGSize.zero) | |
let textStorage = NSTextStorage(attributedString: label.attributedText!) | |
// Configure layoutManager and textStorage | |
layoutManager.addTextContainer(textContainer) |
#!/bin/bash | |
# See http://apple.stackexchange.com/questions/107307/how-can-i-install-the-command-line-tools-completely-from-the-command-line | |
echo "Checking Xcode CLI tools" | |
# Only run if the tools are not installed yet | |
# To check that try to print the SDK path | |
xcode-select -p &> /dev/null | |
if [ $? -ne 0 ]; then | |
echo "Xcode CLI tools not found. Installing them..." |
import Foundation | |
import SwiftUI | |
let isUITesting = /* your UI test detection here */ | |
@main | |
struct EntryPoint { | |
static func main() { | |
if isUITesting { | |
UITestApp.main() |
extension Publisher { | |
func asResult() -> AnyPublisher<Result<Output, Failure>, Never> { | |
return map(Result.success) | |
.catch { Just(Result.failure($0)) } | |
.eraseToAnyPublisher() | |
} | |
} | |
extension Publisher { | |
func values<S, F: Error>() -> AnyPublisher<S, Never> where Output == Result<S, F>, Failure == Never { |