Skip to content

Instantly share code, notes, and snippets.

View alexbruno's full-sized avatar
🏠
Working from home

Alex Bruno Cáceres alexbruno

🏠
Working from home
View GitHub Profile
@alexbruno
alexbruno / bg-frost-glass-fx.pcss
Created July 8, 2022 19:06
Efeito de vidro fosco para background com TailwindCSS
.bg-frost-glass-fx {
backdrop-filter: blur(5px);
@apply bg-white bg-opacity-25 shadow-md;
}
@alexbruno
alexbruno / bg-pixels.css
Created July 8, 2022 18:25
Regra simples de CSS para criar um efeito de máscara de pixels em uma imagem de background
.bg-pixels {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABZJREFUeNpi2r9//38gYGAEESAAEGAAasgJOgzOKCoAAAAASUVORK5CYII=);
}
@alexbruno
alexbruno / valid.cpf.ts
Last active March 1, 2024 11:20
Validação de CPF
// Regex para validação de CPF
export const regexCPF = /^\d{3}.\d{3}.\d{3}-\d{2}$/
// Método de validação
// Referência: https://pt.wikipedia.org/wiki/Cadastro_de_pessoas_f%C3%ADsicas
export function validCPF(value: string | number | number[] = '') {
if (!value) return false
// Aceita receber o valor como string, número ou array com todos os dígitos
const isString = typeof value === 'string'
@alexbruno
alexbruno / simple-lodash-get-like.js
Last active April 27, 2021 20:40
Simple JS lodash.get like function
/**
* Simple JS lodash.get like function
*
* @export Function
* @param {*} object
* @param {String|Array} path
* @param {*} value
*/
export default function get(obj, path, value) {
const split = (key) =>
@alexbruno
alexbruno / multiple_ssh_setting.md
Created May 8, 2018 13:56 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@alexbruno
alexbruno / valid.cnpj.ts
Last active March 17, 2024 03:07
Validação de CNPJ
// Regex para validação de string no formato CNPJ
export const regexCNPJ = /^\d{2}.\d{3}.\d{3}\/\d{4}-\d{2}$/
// Método de validação
// Referência: https://pt.wikipedia.org/wiki/Cadastro_Nacional_da_Pessoa_Jur%C3%ADdica
export function validCNPJ(value: string | number | number[] = '') {
if (!value) return false
// Aceita receber o valor como string, número ou array com todos os dígitos
const isString = typeof value === 'string'