Skip to content

Instantly share code, notes, and snippets.

View chaua's full-sized avatar
🦄
Working

Chauã Queirolo chaua

🦄
Working
View GitHub Profile
@chaua
chaua / build.gradle
Created November 12, 2022 00:31
Biblioteca retrofit
dependencies {
// ...
implementation('com.squareup.retrofit2:retrofit:2.5.0') {
exclude module: 'okhttp'
}
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
}
@chaua
chaua / bigquery.md
Created November 1, 2022 19:00
Notas sobre BigQuery

BigQuery

Listar o esquema das tabelas

bq show --schema --format=prettyjson

@chaua
chaua / dimens.xml
Created June 25, 2022 18:10
Android dimens.xml file including typical spacing and font sizes.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Typical spacing between two views -->
<dimen name="spacing_tiny">2dp</dimen>
<dimen name="spacing_smaller">4dp</dimen>
<dimen name="spacing_small">8dp</dimen>
<dimen name="spacing_normal">16dp</dimen>
<dimen name="spacing_large">24dp</dimen>
<dimen name="spacing_larger">32dp</dimen>
@chaua
chaua / colors.xml
Created June 25, 2022 17:43
Android colors.xml file including all Material Design color definitions.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="black">#000000</color>
<color name="white">#ffffff</color>
<color name="grey_50">#FAFAFA</color>
<color name="grey_100">#F5F5F5</color>
<color name="grey_200">#EEEEEE</color>
<color name="grey_300">#E0E0E0</color>
@chaua
chaua / traduzirPortunhol.kt
Created April 15, 2020 21:44
Função que converte uma string para portunhol
fun traduzirPortunhol(mensagem: String): String {
// Converte a mensagem para minúsculo
var texto = mensagem.toLowerCase(Locale.ROOT)
// Substitui o texto para portunhol
texto = texto.replace("\\bo\\b".toRegex(), "lo")
texto = texto.replace("\\ba\\b".toRegex(), "la")
texto = texto.replace("\\be\\b".toRegex(), "y")
texto = texto.replace("\\b(é|eh)\\b".toRegex(), "es")
@chaua
chaua / styles.xml
Last active July 14, 2017 14:20
Alterar a cor de um botão: API < 21
<style name="Button" parent="Base.TextAppearance.AppCompat.Button">
<item name="backgroundTint">@color/colorAccent</item>
<item name="android:textColor">@color/whiteColor</item>
</style>