Skip to content

Instantly share code, notes, and snippets.

View vczb's full-sized avatar
🙃
Code with passion, unleash your creations.

Vinicius Zucatti vczb

🙃
Code with passion, unleash your creations.
View GitHub Profile
@vczb
vczb / cmd.sh
Last active March 22, 2022 19:29
Yarn commands
# upgrade interactive
yarn upgrade-interactive --latest
@vczb
vczb / sources.list
Last active October 5, 2024 01:44
Ubuntu 20.04 /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
@vczb
vczb / global.scss
Created April 9, 2021 13:05
Global styles
/*
VARIABLES
*/
//colors
$primary: #afaaa2;
$secondary: #B44242;
$tertiary: #94A812;
@vczb
vczb / css-tips.scss
Last active August 3, 2021 19:31
CSS Tips
.grid-auto-fill {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
grid-gap: 3.2rem;
}
.truncate{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@vczb
vczb / chrome-linux.sh
Created September 1, 2021 03:15
Install chrome on linux
#chrome
$wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
$sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
$sudo apt-get update
$sudo apt install google-chrome-stable
@vczb
vczb / nextjs-environment-variables.md
Last active October 27, 2021 13:05
NextJS environment variables

will be not read, only for template/example

  • .env.local.example
  • .env.example
  • .env.template

on develop environment

@vczb
vczb / UPower.conf
Created October 27, 2021 19:05
/etc/UPower/UPower.conf
# Only the system vendor should modify this file, ordinary users
# should not have to change anything.
[UPower]
# Enable the Watts Up Pro device.
#
# The Watts Up Pro contains a generic FTDI USB device without a specific
# vendor and product ID. When we probe for WUP devices, we can cause
# the user to get a perplexing "Device or resource busy" error when
@vczb
vczb / index.d.ts
Created November 1, 2021 16:57
Type definitions for prop-types 15.7
// Type definitions for prop-types 15.7
// Project: https://github.com/reactjs/prop-types, https://facebook.github.io/react
// Definitions by: DovydasNavickas <https://github.com/DovydasNavickas>
// Ferdy Budhidharma <https://github.com/ferdaber>
// Sebastian Silbermann <https://github.com/eps1lon>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
export type ReactComponentLike =
| string
@vczb
vczb / media.js
Created December 1, 2021 02:01
media query from typescript
/* eslint-disable @typescript-eslint/no-explicit-any */
import { css } from 'styled-components'
type Breakpoints = {
[key: string]: string
}
const breakpoints: Breakpoints = {
xs: '480px',
sm: '768px',
@vczb
vczb / useClickAwayListener.js
Created December 3, 2021 01:23
click away listener to react with typescript
import { useEffect } from 'react'
type Props = {
ref: React.RefObject<HTMLElement>
handleClickAway: () => void
}
const useClickAwayListener = (ref: any, handleClickAway: any) => {
const handleClick = (event: MouseEvent) => {
if (!ref?.current?.contains(event?.target)) {