Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / instalaciones.md
Created March 26, 2025 20:00
Flisol - TanStack Query - Instalaciones
@Klerith
Klerith / chat.interface.ts
Created March 11, 2025 17:54
Este es un archivo con información ficticia que simula un backend con latencia.
export enum Plan {
BASIC = 'basic',
PRO = 'pro',
PREMIUM = 'premium',
ENTERPRISE = 'enterprise',
}
export interface Client {
id: string; // C1-12345
name: string;
@Klerith
Klerith / instalaciones-react-router.md
Last active March 10, 2025 17:28
Instalaciones recomendadas para el curso de React Router

Curso - React Router

Esta es la lista de instalaciones recomendadas para el curso de React Router, si encuentran enlaces adicionales o cambios en esta hoja, pueden hacerlos.

Editor de código

@Klerith
Klerith / blacksmith.md
Created February 26, 2025 21:17
Instrucciones para la tarea

Blacksmith - Juego de Aventura Basado en Texto

Objetivo

Utiliza lo que has aprendido para crear un juego simple basado en texto, jugado completamente en la consola.

Cómo Empezar

  1. Clona el repositorio.
@Klerith
Klerith / private.e2e-spec.ts
Created February 20, 2025 14:50
Ejercicio para las pruebas de rutas protegidas
import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication, ValidationPipe } from '@nestjs/common';
import { getRepositoryToken } from '@nestjs/typeorm';
import * as request from 'supertest';
import { Repository } from 'typeorm';
import { AppModule } from '../../../src/app.module';
import { User } from '../../../src/auth/entities/user.entity';
import { validate } from 'uuid';
@Klerith
Klerith / register.e2e-spec.ts
Last active February 20, 2025 14:21
Tarea sobre pruebas
import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication, ValidationPipe } from '@nestjs/common';
import * as request from 'supertest';
import { getRepositoryToken } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { AppModule } from '../../../src/app.module';
import { User } from '../../../src/auth/entities/user.entity';
const testingUser = {
@Klerith
Klerith / instalaciones-nest-testing.md
Last active February 4, 2025 14:50
Instalaciones recomendadas para el curso de Nest + Testing
@Klerith
Klerith / form-utils.ts
Created January 27, 2025 18:39
Utilidades para formularios reactivos
import {
AbstractControl,
FormArray,
FormGroup,
ValidationErrors,
} from '@angular/forms';
async function sleep() {
return new Promise((resolve) => {
setTimeout(() => {
<h1 class="text-2xl font-bold">{{ product().title }}</h1>
<div class="divider"></div>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<!-- Datos generales -->
<div class="flex flex-col gap-2">
<h2 class="text-2xl font-bold h-12">Datos generales</h2>
<input
type="text"
placeholder="Título"
@Klerith
Klerith / hex-color-generator.ts
Created January 15, 2025 16:50
Generador de colores HEX
const color = '#xxxxxx'.replace(/x/g, (y) =>
((Math.random() * 16) | 0).toString(16)
);