dbrno

A little bit about me

I'm a front end developer, musician, and curious. I'm currently creating little things to help digital content creators make your dreams come true at @Hotmart

Spending my time creating things that can be useful to other people is what motivates me. You can find more about what I've been doing here.

Work Experience

Freelancer
may 2020 - jul 2020

Codeby
out 2020 - apr 2022

Hotmart
may 2022 - current

Dev Stack

React JS

GraphQl

Typescript

Node

Picture of the author
Picture of the author
Picture of the author

My code Snippets

See all snippets here

Chrome default color picker snippet

function copy(value) {
    setTimeout(async()=>console.log(
     await window.navigator.clipboard.writeText(value)), 3000);
    console.log("Color: " + value);
}

window.colorPicker = () => new EyeDropper().open().then((color)=> copy(color.sRGBHex))
window.colorPicker();

// create color picker snippet
// press f12 and ctrl + o 
// !color-picker
// click in document and press tab before 3s

Make dynamic css classes

function cssHandles(...arguments) {
   return arguments.reduce((acc, cur) => {
     if (typeof cur === 'string') return acc + ` ${cur}`;
     if (typeof cur === 'object') {
        return Object.keys(cur).map((key) => {
            if(cur[key]) return acc + ` ${key}`
            return acc
        }).filter(Boolean).join('').trim()
         
     }  
   }, '')
}

cssHandles({ 'button--active': true, 'button--disabled': false, 'primary': true }, { 'is--open': false })
> 'button--active primary'

Show package json infos by terminal

alias pkg="cat package.json"
alias head-pkg="head package.json"
alias tail-pkg="tail package.json"
alias pkg-scripts="pkg | jq .scripts"
alias hgrep="history | grep "