Skip to content

Instantly share code, notes, and snippets.

View felipejoq's full-sized avatar
👋
Hello!

Felipe felipejoq

👋
Hello!
View GitHub Profile
@Klerith
Klerith / self-certificates.sh
Last active June 20, 2025 01:38
Generar certificados
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt
@Klerith
Klerith / configurar-node-ts.md
Last active July 8, 2025 02:24
Node con TypeScript - TS-Node-dev simplificado

Node con TypeScript - TS-Node-dev (preferido)

  1. Instalar TypeScript y demás dependencias
npm i -D typescript @types/node ts-node-dev rimraf
  1. Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
npx tsc --init --outDir dist/ --rootDir src
@Klerith
Klerith / pasos-node-ts-jest.md
Created August 19, 2023 18:35
Note + TypeScript + Jest = Testing

Pasos para configurar Jest con TypeScript, en Node

Documentación oficial sobre Jest

  1. Instalaciones de desarrollo (super test es útil para probar Express)
npm install -D jest @types/jest ts-jest supertest
@Klerith
Klerith / pasos-node-typescript.md
Last active July 10, 2025 10:18
Configurar proyecto de Node con TypeScript

Pasos para usar Node con TypeScript con Nodemon

Más información - Docs Oficiales

  1. Instalar TypeScript y tipos de Node, como dependencia de desarrollo
npm i -D typescript @types/node
  1. Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
@Klerith
Klerith / medium-dbdiagram.txt
Created July 14, 2023 18:25
Creación del diagrama de la base de datos
Table users {
user_id integer [pk, increment]
username varchar [not null, unique]
email varchar [not null, unique]
password varchar [not null]
name varchar [not null]
role varchar [not null]
gender varchar(10) [not null]
@Klerith
Klerith / programas.md
Created July 13, 2023 20:10
Programas para hacer diagramas entidad relación
@Klerith
Klerith / docker-compose.yml
Created June 16, 2023 19:29
Postgres - Docker compose
version: '3'
services:
todosDB:
image: postgres:15.3
container_name: todos-db
restart: always
ports:
- 5432:5432
environment:
@Klerith
Klerith / password-property-dto.ts
Created July 16, 2022 16:32
Password validation - DTO
@IsString()
@MinLength(6)
@MaxLength(50)
@Matches(
/(?:(?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/, {
message: 'The password must have a Uppercase, lowercase letter and a number'
})
password: string;
@Klerith
Klerith / templateSlice.js
Last active June 12, 2025 16:20
Cascaron para crear Redux Slices rápidamente
import { createSlice } from '@reduxjs/toolkit';
export const templateSlice = createSlice({
name: 'name',
initialState: {
counter: 10
},
reducers: {
increment: (state, /* action */ ) => {
//! https://react-redux.js.org/tutorials/quick-start