Skip to content

Instantly share code, notes, and snippets.

View mayconbalves's full-sized avatar
🎯
Focusing

Maycon Alves mayconbalves

🎯
Focusing
View GitHub Profile
@mayconbalves
mayconbalves / gist:5f232f6c2234bba28e2b9cd8b45233b3
Created January 13, 2026 12:57
mac-clean-cache-and-logs.sh
#!/usr/bin/env bash
set -e
echo "🧹 Iniciando limpeza de cache e logs no macOS..."
USER_CACHES="$HOME/Library/Caches"
SYSTEM_CACHES="/Library/Caches"
USER_LOGS="$HOME/Library/Logs"
{
"registrations": [
{
"id": "3",
"admissionDate": "22/10/2023",
"email": "luiz@caju.com.br",
"employeeName": "Luiz Filho",
"status": "APPROVED",
"cpf": "56642105087"
},
import "./styles.css";
export default function App() {
const fruits = ["banana", "maca", "laranja"];
const handleChange = (e) => {
const { value } = e.target;
console.log(value, "valor que vai para o back");
};
return (
import type { GatsbyConfig } from "gatsby";
const config: GatsbyConfig = {
siteMetadata: {
title: `my-project`,
siteUrl: `https://www.yourdomain.tld`
},
// More easily incorporate content into your pages through automatic TypeScript type generation and better GraphQL IntelliSense.
// If you use VSCode you can also use the GraphQL plugin
// Learn more at: https://gatsby.dev/graphql-typegen
import { useEffect, useState } from "react"
const Pokemons = () => {
const [pokemons, setPokemons] = useState([])
const [loading, setLoading] = useState(false)
useEffect(() => {
const fetchData = async () => {
const data = await fetch('https://pokeapi.co/api/v2/pokemon?offset=500&limit=500')
try {
import { useEffect, useState } from "react"
const Pokemons = () => {
const [pokemons, setPokemons] = useState([])
useEffect(() => {
const fetchData = async () => {
const data = await fetch('https://pokeapi.co/api/v2/pokemon?offset=500&limit=500')
try {
const allPokemons = await data.json()
import './App.css'
import { Suspense, lazy } from 'react'
function App() {
const Pokemons = lazy(() => {
return import('./pokemons')
})
return (
const getHours = () => {
const clock = document.getElementsByClassName('clock')[0]
const date = new Date()
const hours = date.getHours()
const minutes = date.getMinutes()
const seconds = date.getSeconds()
const hour = hours < 10 ? `0${hours}` : hours
const minute = minutes < 10 ? `0${minutes}` : minutes
const second = seconds < 10 ? `0${seconds}` : seconds
clock.innerHTML = `${hour}:${minute}:${second}`
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
min-height: 100vh;
width: 100%;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Digital Clock</title>
<link href="./styles.css" type="text/css" rel="stylesheet">
</head>
<body>