Skip to content

Instantly share code, notes, and snippets.

View gfreitash's full-sized avatar

Gabriel Freitas gfreitash

  • Goiânia, GO, Brazil
View GitHub Profile
@evertjr
evertjr / animation.tsx
Created July 31, 2024 13:20
Feedback face animation with Framer Motion and Tailwind
"use client";
import { AnimationProps, motion } from "framer-motion";
import { useState } from "react";
type Feedbacks = "bad" | "not bad" | "good";
const feedbackMapping: { [key: number]: Feedbacks } = {
0: "bad",
1: "not bad",
@sidola
sidola / Config.java
Last active March 26, 2025 19:04
SPA / Spring wildcard resource serve - This is how you configure Spring Boot to work with for example react-router. It will serve the `index.html` file on all routes that aren't used by REST controllers.
import java.io.IOException;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.resource.PathResourceResolver;
@Configuration
public class Config implements WebMvcConfigurer {