Skip to content

Instantly share code, notes, and snippets.

View Viniciuscarvalho's full-sized avatar

Vinicius Carvalho Marques Viniciuscarvalho

View GitHub Profile
@Viniciuscarvalho
Viniciuscarvalho / creating-pr.md
Last active January 27, 2026 22:18
Skill fo Claude for generate PR with credentials of Jira or not
name description argument-hint
creating-pr
Use when creating or updating pull requests with comprehensive descriptions and meaningful commits. Optionally integrates with Jira to populate PR content from ticket details and update ticket status - streamlines PR workflow with branch management, commit best practices, and Jira synchronization
[TICKET-ID]

You are an expert Git and GitHub workflow automation specialist with deep knowledge of version control best practices and pull request management. Your primary responsibility is streamlining the pull request creation process, ensuring high-quality commits with meaningful descriptions.

Jira Integration (Optional)

import XCTest
@testable import DeliveryAppChallenge
final class ServiceManagerTests: XCTestCase {
// MARK: Subject under test
var sut: APIService!
// MARK: Test setup
@Viniciuscarvalho
Viniciuscarvalho / SignpostId.swift
Created July 30, 2021 18:23
Collecting Instruments requests via signpostId
@available(iOSApplicationExtension 12.0, *)
private enum SignpostLog {
static let networking = OSLog(subsystem: "org.alamofire", category: "networking")
static let logger = Logger()
class Logger {
var observers: [NSObjectProtocol] = []
public func startObservingNetworkRequestsIfNecessary() {
@Viniciuscarvalho
Viniciuscarvalho / AlamofireInstruments
Created July 30, 2021 18:10
Small panel for tracking requests from Alamofire on Instruments
<?xml version="1.0" encoding="UTF-8" ?>
<package>
<id>br.com.Tracking</id>
<title>Tracking</title>
<owner>
<name>Vinicius Carvalho</name>
</owner>
<!-- Instruments Developer Help: https://help.apple.com/instruments/developer/mac/current/ -->
@Viniciuscarvalho
Viniciuscarvalho / ListNameAlgorithm.Swift
Created January 23, 2019 13:08
Algoritmo de procura se a messageString tem todas as letras de message e mostra se tem ou não todas as palavras.
import UIKit
var messageString = ["a", "casa", "do", "lago", "sempre", "é", "azul"]
var message = "a casa do lago é azul"
// 1º Resolução
let checkArray = message.components(separatedBy: " ").filter { return !messageString.contains($0) }
print(checkArray.isEmpty ? "é igual": "erooou")
func buildConstraints() {
self.content.snp.makeConstraints { make in
make.edges.equalTo(self)
}
self.photo.snp.makeConstraints { make in
make.edges.height.equalTo(content.self)
make.edges.leading.equalTo(content.self)
make.edges.trailing.equalTo(content.self)
}
@Viniciuscarvalho
Viniciuscarvalho / don't-give-me-five.Swift
Created January 9, 2019 16:58
Code Kata - Kyu 7 - Don't give me five
// In this kata you get the start number and the end number of a region and should return the count of all numbers except numbers with a 5 in it. The start and the end number are both inclusive!
// Examples:
// 1,9 -> 1,2,3,4,6,7,8,9 -> Result 8
// 4,17 -> 4,6,7,8,9,10,11,12,13,14,16,17 -> Result 12
// The result may contain fives. ;-)
// The start number will always be smaller than the end number. Both numbers can be also negative!
-------------------------------------------------------------------------
@Viniciuscarvalho
Viniciuscarvalho / sum-of-all-the-multiples-of-3-or-5.swift
Last active January 9, 2019 00:40
Code Kata - Kyu 7 - sum-of-all-the-multiples-of-3-or-5
Description:
Your task is to write function findSum.
Upto and including n, this function will return the sum of all multiples of 3 and 5.
For example:
findSum(5) should return 8 (3 + 5)
@Viniciuscarvalho
Viniciuscarvalho / reduceExtension.swift
Created August 22, 2018 14:34
Extensão de reduce para unir elementos de um array de objeto e apresenta-los concatenados em lista.
extension Array where Iterator.Element == ObjectoDoModelo {
func presentableNames() -> String {
return self.compactMap({ $0.elementoDoObjeto })
.reduce("", { $0 + "\n" + $1 }).trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
}
}
struct ListGamesUseCase {
private let listGamesPresenter: ListGamesPresenter
private let gamesGateway: GamesGateway
init(listGamesPresenter: ListGamesPresenter, gamesGateway: GamesGateway) {
self.listGamesPresenter = listGamesPresenter
self.gamesGateway = gamesGateway
}