- Open Automator
- Create a new document
- Select Quick Action
- Set “Service receives selected” to
files or folders
inany application
- Add a
Run Shell Script
action- your default shell should already be selected, otherwise use
/bin/zsh
for macOS 10.15 (”Catalina”) or later - older versions of macOS use
/bin/bash
- your default shell should already be selected, otherwise use
- if you're using something else, you probably know what to do 😉
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
/** | |
* I needed a property wrapper that fulfilled the following four requirements: | |
* | |
* 1. Values are stored in UserDefaults. | |
* 2. Properties using the property wrapper can be used with SwiftUI. | |
* 3. The property wrapper exposes a Publisher to be used with Combine. | |
* 4. The publisher is only called when the value is updated and not | |
* when_any_ value stored in UserDefaults is updated. | |
* | |
* First I tried using SwiftUI's builtin @AppStorage property wrapper |
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
// | |
// Settings.swift | |
// Settings | |
// | |
// Created by Jordan Singer on 2/20/21. | |
// | |
import SwiftUI | |
struct Settings: View { |
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 SwiftUI | |
enum PreviewProviderMode: CaseIterable { | |
/// Use for a light appearance preview. | |
case lightMode | |
/// Use for a dark appearance preview. | |
case darkMode | |
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
# example of a custom lldb command that prints Data as String | |
# store in your home (~) directory | |
command regex printData 's/(.+)/expr print(String(data: %1, encoding: .utf8))/' |
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
xcrun simctl --set testing list | grep Booted | grep Clone | sed 's/^.*(\([A-Z0-9\-]*\)).*$/\1/g' | xargs -I {} xcrun simctl --set testing shutdown "{}" |
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 | |
@propertyWrapper | |
struct Printer<T> { | |
public var currentValue: T? | |
var wrappedValue: T? { | |
get { | |
print("Property wrapper value printed", currentValue) |
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
/// - We have multiple files with a X amount of chunks | |
/// - Each batch request can contain a max of 50 chunks from possibly multiple files | |
/// | |
/// Challenge: Distribute the chunk requests over as less batch requests as possible | |
import UIKit | |
import Foundation | |
typealias PublicIdentifier = String |
I found that the "best" way is to use HTML, as it works both in Readme/.md files and also in comments (within Issues, Gist...)
E.g. when adding/editing a comment (within Issues, Gist...) :
- Upload the picture by drag-and-drop in the text field
- replace
![image](https://your-image-url.type)
with<img src="https://your-image-url.type" width="100" height="100">
As mentioned by @cbestow (thanks!), it's not mandatory to set both width
and height
. If only one is set, the other will be adjusted accordingly to preserve the aspect ratio of the image.
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
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index 112b5d6..e6f790d 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -552,6 +552,8 @@ else() | |
set(SWIFT_HOST_VARIANT_ARCH_default "powerpc64le") | |
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "s390x") | |
set(SWIFT_HOST_VARIANT_ARCH_default "s390x") | |
+ elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686") | |
+ set(SWIFT_HOST_VARIANT_ARCH_default "i686") |
NewerOlder