Skip to content

Instantly share code, notes, and snippets.

View EduardoDoSomeCode's full-sized avatar
📘
Learning

Eddocode EduardoDoSomeCode

📘
Learning
View GitHub Profile
@velzie
velzie / manifest-v2-chrome.md
Last active September 20, 2024 20:35
How to keep using adblockers on chrome and chromium

How to keep using adblockers on chrome and chromium

  1. google's manifest v3 has no analouge to the webRequestBlocking API, which is neccesary for (effective) adblockers to work
  2. starting in chrome version 127, the transition to mv3 will start cutting off the use of mv2 extensions alltogether
  3. this will inevitably piss of enterprises when their extensions don't work, so the ExtensionManifestV2Availability key was added and will presumably stay forever after enterprises complain enough

You can use this as a regular user, which will let you keep your mv2 extensions even after they're supposed to stop working

Linux

In a terminal, run:

@codigoconjuan
codigoconjuan / Notification.tsx
Created October 18, 2023 01:02
Componente para Notificaciones
import { Fragment } from 'react'
import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/outline'
import { XMarkIcon } from '@heroicons/react/20/solid'
import { Transition } from '@headlessui/react'
export default function Notification() {
const notification = {}
return (
@codigoconjuan
codigoconjuan / recipes-schema.ts
Created October 16, 2023 23:10
Schema en ZOD para Recetas
export const RecipeAPIResponseSchema = z.object({
idDrink: z.string(),
strDrink: z.string(),
strDrinkThumb: z.string(),
strInstructions: z.string(),
strIngredient1: z.string().nullable(),
strIngredient2: z.string().nullable(),
strIngredient3: z.string().nullable(),
strIngredient4: z.string().nullable(),
strIngredient5: z.string().nullable(),
@codigoconjuan
codigoconjuan / index.ts
Created October 12, 2023 23:05
Monedas para cotizar Criptos
import { Currency } from "../types";
export const currencies : Currency[] = [
{ code: 'USD', name: 'Dolar de Estados Unidos'},
{ code: 'MXN', name: 'Peso Mexicano'},
{ code: 'EUR', name: 'Euro'},
{ code: 'GBP', name: 'Libra Esterlina'},
]
@codigoconjuan
codigoconjuan / countries.ts
Created October 10, 2023 17:34
Listado de Países para api clima
export const countries = [
{ code: 'US', name: 'Estados Unidos' },
{ code: 'MX', name: 'México' },
{ code: 'AR', name: 'Argentina' },
{ code: 'CO', name: 'Colombia' },
{ code: 'CR', name: 'Costa Rica' },
{ code: 'ES', name: 'España' },
{ code: 'PE', name: 'Perú' }
]
@codigoconjuan
codigoconjuan / PatientForm.tsx
Created October 9, 2023 18:09
Validación de Email para React-Hook-Form
{...register("email", {
required: "El Email es Obligatorio",
pattern: {
value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,
message: 'Email No Válido'
}
})}
@codigoconjuan
codigoconjuan / index.css
Created October 5, 2023 18:49
Código para swipleable List
/*** SWIPE LIST OVERRIDES **/
.swipeable-list-item__leading-actions,
.swipeable-list-item__trailing-actions {
@apply text-white text-lg uppercase font-bold;
}
.swipeable-list-item__leading-actions{
@apply bg-blue-600;
}
.swipeable-list-item__trailing-actions {
@apply bg-pink-600;
@codigoconjuan
codigoconjuan / categories.ts
Created October 2, 2023 23:09
Categorias para Admin de Gastos
export const categories = [
{ id: '1', name: 'Ahorro', icon: 'ahorro' },
{ id: '2', name: 'Comida', icon: 'comida' },
{ id: '3', name: 'Casa', icon: 'casa' },
{ id: '4', name: 'Gastos Varios', icon: 'gastos' },
{ id: '5', name: 'Ocio', icon: 'ocio' },
{ id: '6', name: 'Salud', icon: 'salud' },
{ id: '7', name: 'Suscripciones', icon: 'suscripciones' },
];
@codigoconjuan
codigoconjuan / db.ts
Created September 21, 2023 18:35
Productos para Calculadora de Propinas y Consumos
export const menuItems = [
{
"id": 1,
"name": "Pizza a la Leña Chica",
"price": 30
},
{
"id": 2,
"name": "Pizza a la Leña Mediana",
"price": 50
@codigoconjuan
codigoconjuan / db.js
Created August 22, 2023 23:18
Gist Guitarras para GuitarLA - React y TypeScipt - La Guía Completa
export const db = [
{
id: 1,
name: 'Lukather',
image: 'guitarra_01',
description: 'Morbi ornare augue nisl, vel elementum dui mollis vel. Curabitur non ex id eros fermentum hendrerit.',
price: 299,
},
{
id: 2,