Skip to content

Instantly share code, notes, and snippets.

View mnzsss's full-sized avatar

Gabriel Menezes mnzsss

  • Cox Automotive
  • São Paulo, SP
  • LinkedIn in/mnzs
View GitHub Profile
@broofa
broofa / checkForUndefinedCSSClasses.js
Last active June 22, 2025 08:19
ES module for detecting undefined CSS classes (uses mutation observer to monitor DOM changes). `console.warn()`s undefined classes.
/**
* Sets up a DOM MutationObserver that watches for elements using undefined CSS
* class names. Performance should be pretty good, but it's probably best to
* avoid using this in production.
*
* Usage:
*
* import cssCheck from './checkForUndefinedCSSClasses.js'
*
* // Call before DOM renders (e.g. in <HEAD> or prior to React.render())
@rinogo
rinogo / job.service.spec.ts
Last active May 20, 2024 17:09
Integration Testing a NestJS Service that leverages Prisma
import { Test, TestingModule } from '@nestjs/testing';
import { PrismaService } from '../prisma.service';
import { JobService } from './job.service';
import * as crypto from 'crypto';
describe('JobService', () => {
let service: JobService;
let prisma: PrismaService;
beforeEach(async () => {
@enesien
enesien / shadcn-multi-tag-input.md
Last active June 4, 2025 17:11
shadcn multiple tag input

shadcn/ui multi tag input component

A react tag input field component using shadcn, like one you see when adding keywords to a video on YouTube. Usable with Form or standalone.

Preview

image

Standalone Usage

@Gomah
Gomah / 1. useResponsiveVariant.ts
Last active October 30, 2024 09:00
Responsive Variants with CVA, class-variance-authority
import { useMediaQuery } from 'usehooks-ts'
import { useMemo } from 'react';
import { screens } from '.generated/screens';
/*
// You can also define the screens object manually if you don't want to use a prebuilt script.
const screens = {
sm: '640px',
md: '768px',