Você pode adicionar todos os marcadores de convenções de comentários no Github como mensagens salvas seguindo os passos:
- Vá para https://github.com/settings/replies
- Abra o Developer Tools 2.1 digite allow paste para conseguir colar o script lá
- Copie o código abaixo e cole no console
- Presione enter, aguarde e recarregue a página
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
# FROM https://github.com/misogi/vscode-ruby-rubocop/issues/23 | |
mkdir -p ~/.vscode/bin | |
cat <<'EOT' > ~/.vscode/bin/rubocop | |
#!/bin/bash | |
export PATH="$PATH:~/.rvm/bin" | |
source ~/.rvm/scripts/rvm |
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 { createContext, useEffect, useState, ReactNode } from 'react'; | |
import { api } from '../services/api'; | |
interface Transaction { | |
id: number, | |
title: string | |
} | |
interface TransactionsProviderProps { | |
children: ReactNode |
US Nome
Como um usuário, eu [posso/gostaria/devo] fazer, para que tenha resultado
Como um papel, eu quero meta/desejo de modo que benefício Como um papel, eu quero meta/desejo A fim de receber benefício como um papel, eu quero meta/desejo Como quem quando onde, eu o que, porque por que. Como um papel, eu posso ação com o sistema para que benefício externo
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
Warming up -------------------------------------- | |
with retries 2.135k i/100ms | |
with inject 1.882k i/100ms | |
with times 2.191k i/100ms | |
Calculating ------------------------------------- | |
with retries 17.854k (±19.9%) i/s - 85.400k in 5.046312s | |
with inject 17.163k (±16.6%) i/s - 82.808k in 5.070869s | |
with times 19.642k (±13.4%) i/s - 96.404k in 5.034077s | |
Comparison: |
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
Warming up -------------------------------------- | |
with retries 17.117k i/100ms | |
with inject 18.465k i/100ms | |
with times 13.713k i/100ms | |
Calculating ------------------------------------- | |
with retries 176.365k (± 9.8%) i/s - 872.967k in 5.043064s | |
with inject 160.830k (±18.2%) i/s - 775.530k in 5.071210s | |
with times 153.791k (±26.0%) i/s - 685.650k in 5.065556s | |
Comparison: |
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
def inject_strategy(max_retries) | |
(1..max_retries).inject(nil) do |result, attempt_number| | |
begin | |
return yield if block_given? | |
rescue => e | |
# intentionally blank | |
end | |
end | |
end |
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
(1..max_retries).inject(nil) do |result, attempt_number| | |
begin | |
# some code | |
rescue => e | |
end | |
end |
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
tries ||= 0 | |
begin | |
# some code | |
rescue => e | |
return if tries >= max_retries | |
tries += 1 | |
retry |
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
max_retries.times do |index| | |
begin | |
# some code | |
rescue => e | |
end | |
end |
NewerOlder