Whole module optimization does exactly what we want. It compiles all the files in one go. The problem with whole module optimization is that it optimizes, so its pretty slow. But if you add a user-defined custom flag; SWIFT_WHOLE_MODULE_OPTIMIZATION and set it to yes, as well as set the optimization level to none. It will do whole module optimization without optimizing. And it'll be super fast.
by https://www.skilled.io/u/swiftsummit/swift-with-a-hundred-engineers
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/ | |
testPath="{ project name }Tests/PresentationLayer/UserStories/$1" | |
projectPath="{ project name }TODO/PresentationLayer/UserStories/$1" | |
generamba gen "$2" { template name } --test_path "$testPath" --module_path "$projectPath" |
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
@objc protocol Refreshable | |
{ | |
/// The refresh control | |
var refreshControl: UIRefreshControl? { get set } | |
/// The table view | |
var tableView: UITableView! { get set } | |
/// the function to call when the user pulls down to refresh | |
@objc func handleRefresh(_ sender: Any); |
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
require 'liquid' | |
require 'fileutils' | |
input_file = File.absolute_path(ARGV[0]) | |
@template = Liquid::Template.parse(File.open(input_file, "r").read) | |
renderedTemplate = @template.render() | |
extn = File.extname(input_file) | |
output_file = File.dirname(input_file) + "/" + File.basename(input_file, extn) | |
File.open(output_file, "w") {|f| f.write(renderedTemplate) } |
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
custom_rules: | |
quick_focus: | |
included: ".*.swift" | |
name: "Focus on tests" | |
regex: "^\s*f(it|context|describe)\s*\(" | |
match_kinds: | |
- identifier | |
message: "Focused tests should not be commited" | |
severity: warning |
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
// If you want to create some common way to load objects from nibs, you will probably try something like that: | |
protocol NibLoadable: class { | |
static func fromNib() -> Self? | |
static func nibName() -> String | |
} | |
extension NibLoadable { | |
static func nibName() -> String { | |
return String(describing: Self.self) | |
} |
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
osascript -e 'tell application "iOS Simulator" to quit' | |
osascript -e 'tell application "Simulator" to quit' | |
xcrun simctl erase all |
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
git checkout { your branch } | |
git checkout -b tmp | |
git checkout develop | |
git pull | |
git rebase develop { your branch } | |
{ complete all rebase steps } | |
git checkout develop | |
git merge --no-ff { your branch } | |
git push | |
git checkout { your branch } |
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
[alias] | |
co = checkout | |
ci = commit | |
st = status | |
br = branch | |
hist = log --graph --pretty=format:\"%Cred%h%Creset %Cred|%Creset %s%C(cyan)%d%Creset\" | |
histFull = log --graph --pretty=format:\"%Cred%h%Creset %ad %Cred|%Creset %s%C(cyan)%d %Cgreen(%cr) %Cblue[%an]%Creset\" --date=short | |
last = log -n1 --graph --pretty=format:\"%Cred%h%Creset %ad %Cred|%Creset %s%C(cyan)%d %Cgreen(%cr) %Cblue[%an]%Creset\" --date=short | |
changes = log --pretty=format:\"%s\" | |
type = cat-file -t |
- Separate subject from body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how