Skip to content

Instantly share code, notes, and snippets.

View rdornas's full-sized avatar

Rubem Dornas rdornas

View GitHub Profile
@rdornas
rdornas / str_cnpj.r
Created June 8, 2022 12:55
R - Transforma um texto (string) em CNPJ
# Função para transformar uma string em CNPJ.
str_cnpj <- Vectorize(function(x) {
# Remove todas as pontuações do string
y <- stringr::str_remove_all(stringr::str_squish(x), "[[:punct:]]")
# Testa se o string resultante possui 14 caracteres
if (stringr::str_length(y) == 14) {
@rdornas
rdornas / mariana.rstheme
Last active December 31, 2023 22:18
RStudio Theme inspired on Mariana (Pro) Theme from Sublime Text
/* rs-theme-name: Mariana (Pro)*/
/* rs-theme-is-dark: TRUE */
.ace_gutter {
background: #23292E;
color: #D0F4FF80
}
.ace_gutter-active-line {
background-color: #39434C
}
@rdornas
rdornas / sea_abyss.rstheme
Last active July 17, 2020 18:10
RStudio theme - Sea Abyss
/* rs-theme-name: Sea Abyss */
/* rs-theme-is-dark: TRUE */
.ace_gutter {
background: #1F303F;
color: #58585c
}
.ace_gutter-active-line {
background-color: #282A2E
}