Skip to content

Instantly share code, notes, and snippets.

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

Rafael Bernardino bernardinorafael

🏠
Working from home
  • Criciúma
  • 05:02 (UTC -03:00)
View GitHub Profile
@bernardinorafael
bernardinorafael / use-search-params.tsx
Last active December 3, 2024 14:31
useSearchParams React Hook
import React from 'react'
import { useRouter } from 'next/router'
export function useSearchParams() {
const router = useRouter()
const isClientSide = typeof window !== 'undefined'
const set = React.useCallback(
(key: string, v: string | number | boolean) => {
if (!isClientSide) return
@bernardinorafael
bernardinorafael / .zshrc
Last active December 29, 2024 00:50
zsh shortcuts
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time Oh My Zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="spaceship"
plugins=(
git
@bernardinorafael
bernardinorafael / config.json
Last active November 19, 2024 02:06
Docker config
{
"auths":{
"https://index.docker.io/v1/": {}
},
"psFormat":"table {{.ID}}\\t{{.Image}}\\t{{.Status}}\\t{{.Names}}\\t{{.Ports}}",
"credsStore":"osxkeychain",
"currentContext":"desktop-linux",
"plugins":{
"-x-cli-hints":{
"enabled":"true"
@bernardinorafael
bernardinorafael / install.sh
Last active November 19, 2024 00:31
install macos enviroment
# Run the following commands to update the packages
sudo apt update -y
sudo apt upgrade -y
#install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Run the following commands to update the packages
brew upgrade
@bernardinorafael
bernardinorafael / settings.json
Last active December 22, 2024 14:24
vscode-settings • mar/17
{
// ----------------------------------------------------
// EMMET ⤵️
// ----------------------------------------------------
"emmet.syntaxProfiles": {
"javascript": "jsx"
},
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},