Skip to content

Instantly share code, notes, and snippets.

View PedroMidueno's full-sized avatar
😎
Always learning...

Pedro Midueño PedroMidueno

😎
Always learning...
View GitHub Profile
@Klerith
Klerith / instalaciones-nest-microservicios.md
Last active May 29, 2024 14:54
Instalaciones recomendadas para el curso de Microservicios con Nest
@Klerith
Klerith / docker-compose.yml
Last active May 27, 2024 15:50
PostgreSQL + PgAdmin
version: '3'
services:
myDB:
image: postgres:15.3
container_name: my-database
restart: always
ports:
- 5432:5432
environment:
@Klerith
Klerith / instalaciones-database.md
Last active May 8, 2024 16:46
Instalaciones necesarias para el curso de base de datos

postgresql Logo

SQL de cero: Tu guía práctica con PostgreSQL

Instalaciones recomendadas

Opcionales recomendadas

@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 / seed.ts
Created July 12, 2022 18:55
Nest-Teslo Seed
interface SeedProduct {
description: string;
images: string[];
stock: number;
price: number;
sizes: ValidSizes[];
slug: string;
tags: string[];
title: string;
type: ValidTypes;
@Klerith
Klerith / Dockerfile
Last active May 25, 2024 19:38
Preparar imagen de Docker - Node App
# Install dependencies only when needed
FROM node:18-alpine3.15 AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
# Build the app with cache dependencies
FROM node:18-alpine3.15 AS builder
@Klerith
Klerith / README.md
Last active May 27, 2024 22:19
Deprecated Method - Decorador

@Deprecated - Method Decorator

En la definición del método, se puede marcar como obsoleto (deprecated) con la justificación. Esto ayudará a que otros developers sepán que deben de utilizar ya la alternativa.

@Deprecated('Most use speak2 method instead')
 speak() {
      console.log(`${ this.name }, ${ this.name }!`)
 }
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active June 2, 2024 07:47
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent