# Enable internal menu
defaults write com.apple.dt.Xcode ShowDVTDebugMenu -bool YES
# Enable project build time
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
| #!/bin/bash | |
| killall Xcode | |
| xcrun -k | |
| xcodebuild -alltargets clean | |
| rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" | |
| rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache" | |
| rm -rf ~/Library/Developer/Xcode/DerivedData/* | |
| rm -rf ~/Library/Caches/com.apple.dt.Xcode/* | |
| open /Applications/Xcode.app |
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
| {% include numberWithCommas.html number=1 %} | |
| {% include numberWithCommas.html number=12 %} | |
| {% include numberWithCommas.html number=123 %} | |
| {% include numberWithCommas.html number=1234 %} | |
| {% include numberWithCommas.html number=12345 %} | |
| {% include numberWithCommas.html number=123456 %} | |
| {% include numberWithCommas.html number=1234567 %} | |
| {% include numberWithCommas.html number=12345678 %} | |
| {% include numberWithCommas.html number=123456789 %} | |
| {% include numberWithCommas.html number=1234567890 %} |
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 Foundation | |
| import PlaygroundSupport | |
| /// A thread-safe array. | |
| public class SynchronizedArray<Element> { | |
| private let queue = DispatchQueue(label: "io.zamzam.ZamzamKit.SynchronizedArray", attributes: .concurrent) | |
| private var array = [Element]() | |
| public init() { } | |
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
| <h1>Usage Template</h1> | |
| <h2>With integer to decimal conversion</h2> | |
| <p> | |
| {% include numf.html number=12345 %} <!-- output is 12.345,00 --><br /> | |
| {% include numf.html number=12345 decimals=0 %} <!-- output is 12.345 --><br /> | |
| {% include numf.html number=12345 decimals=4 %} <!-- output is 12.345.0000 --><br /> | |
| {% include numf.html number=12345 ds='.' ts=',' %} <!-- output is 12,345.00 --><br /> | |
| </p> |
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
| const cleanTypenameLink = new ApolloLink((operation, forward) => { | |
| if (operation.variables) { | |
| operation.variables = this.omitDeep (operation.variables, "__typename") | |
| } | |
| return forward(operation).map((data) => { | |
| return data; | |
| }) | |
| }) | |
| private omitDeep(obj, key) { |
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
| DEFAULT_SIMULATORS = ['iPhone 5s', 'iPhone 8', 'iPhone X', 'iPhone Xʀ'] | |
| PROJECT_PATH = # Project path. | |
| SCHEME = ... # (Your scheme) | |
| CONFIGURATION = ... # (usually Debug or Release) | |
| APP_ID = # Your app id. i.e: com.company.app | |
| APP_NAME = # The output name of your app. | |
| platform :ios do |
If you work on a Swift project that follows the Model-View-ViewModel (MVVM) architecture or similar, you may want to jump to counterpart in Xcode from your view to your model, and then to your view model. (ie. by using Ctrl+Cmd+Up and Ctrl+Cmd+Down).
You can do this in recent versions of Xcode by setting a configuration default.
From a terminal, just type this command and press Enter:
defaults write com.apple.dt.Xcode IDEAdditionalCounterpartSuffixes -array-add "ViewModel" "View"
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
| #!/bin/bash | |
| # System: Darwin x86_64 19.6.0 (macOS 10.15.6 19G2021) | |
| # Author: Othyn (https://github.com/othyn) | |
| # Source: https://gist.github.com/othyn/29b82e39eb8cdd98adf1be77cbb62700 | |
| # Dependencies: pv, wimlib | |
| # Licence: MIT | |
| DEFAULT="\x1b[0m" | |
| RED="\x1b[31m" |
This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.
First be sure to enable the Docker Remote API on the remote host.
This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.
OlderNewer