See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| import UIKit | |
| // 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 ... | |
| var sequence: [Int] = [] | |
| func fibonacci(_ n: Int) -> Int { | |
| guard n > 1 else { return n } | |
| return fibonacci(n - 1) + fibonacci(n - 2) | |
| } |
| import UIKit | |
| class Master { | |
| var name: String | |
| private(set) var tables: [Table] = [] | |
| private(set) var players: [Player] = [] | |
| init(name: String) { |
| var app = "1.10.0-1" | |
| var min = "1.10.0-1" | |
| func convertToInt(version: String) -> Int { | |
| var vnum = 0 | |
| for i in 0..<version.count { | |
| let index = version.index(version.startIndex, offsetBy: i) | |
| let char = version[index] | |
| if char.isNumber, let num = char.wholeNumberValue { | |
| vnum = vnum * 10 + num |
| // https://docs.swift.org/swift-book/LanguageGuide/Properties.html#ID617 | |
| public typealias Bindable = ObservableProperty | |
| @propertyWrapper | |
| public final class ObservableProperty<Input> { | |
| public typealias BindableHandler = (Input) -> Void | |
| public var wrappedValue: Input { | |
| didSet { |
| // | |
| // Diagnostics.swift | |
| // Bitz | |
| // | |
| // Created by Tiago Almeida de Oliveira on 14/01/22. | |
| // Copyright © 2022 Bitz. All rights reserved. | |
| // | |
| import os | |
| import FirebaseCrashlytics |
| #!/bin/bash | |
| OLD_IP="OLD_DNS" | |
| NEW_IP="NEW_DNS" | |
| find * -maxdepth 0 -type d \( ! -name . \) -print | while read dir | |
| do | |
| cd ${dir} | |
| CURRENT_URL=$(git remote get-url --all origin) | |
| NEW_URL="${CURRENT_URL/$OLD_IP/$NEW_IP}" | |
| echo "change -> ${CURRENT_URL} to ${NEW_URL}" | |
| git remote set-url origin $NEW_URL |
| #!/bin/sh | |
| # build-phases.sh | |
| # Formalizador | |
| # | |
| # Created by Tiago Oliveira on 06/06/20. | |
| # Copyright © 2020 Formalizar. All rights reserved. | |
| buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}//${INFOPLIST_FILE}") | |
| buildNumber=$(($buildNumber + 1)) |
| openssl x509 -text -inform DER -in bitz_me.cer -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 |
| #!/bin/bash | |
| # rodar no diretório raiz onde estão os diretórios dos repos | |
| OLD_IP="0.0.0.0" | |
| NEW_IP="gitlab.constoso.cloud" | |
| find * -maxdepth 0 -type d \( ! -name . \) -print | while read dir | |
| do | |
| cd ${dir} | |
| CURRENT_URL=$(git remote get-url --all origin) | |
| NEW_URL="${CURRENT_URL/$OLD_IP/$NEW_IP}" | |
| echo "change -> ${CURRENT_URL} to ${NEW_URL}" |