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
#!/bin/sh | |
# | |
# Automatically adds branch name and branch description to every commit message. | |
# I made this a commit-msg hook to get it working with GitUp client. Otherwise, prepare-commit-msg hook should work as well. | |
# | |
# Usage: | |
# 1. Save this file in PROJECT_NAME/.git/hooks, with name `commit-msg` | |
# 2. chmod 755 commit-msg | |
# 3. Profit. | |
NAME=$(git branch | grep '*' | sed 's/* //') |
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
struct Flight { | |
let fromCity: String | |
let toCity: String | |
} | |
let originCities = itinerary1.map { $0.fromCity } | |
let destinationCities = itinerary1.map { $0.toCity } | |
var travelLog: [String: Int] = [:] |
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 Foundation | |
import UIKit | |
// MARK: - Decorator and Configurator protocols | |
protocol Decorator { | |
associatedtype Decoratable | |
init(dependencyManager: VDependencyManager) | |
func decorate(cell: Decoratable) |