Skip to content

Instantly share code, notes, and snippets.

View PterPmnta's full-sized avatar
💭
FullStack Web Developer

Pedro Pimienta M. PterPmnta

💭
FullStack Web Developer
View GitHub Profile
@Klerith
Klerith / client-gateway.ingress.yml
Created March 20, 2024 15:03
Ingress Ymls - Client Gateway y WebHook
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: tienda-ingress
spec:
rules:
- http:
paths:
- path: /*
pathType: ImplementationSpecific
@Klerith
Klerith / K8s.README.md
Last active November 11, 2024 15:34
Comandos que utilizaremos para configurar Kubernetes.

Helm commands

  • Crear configuración helm create <nombre>
  • Aplicar configuración inicial: helm install <nombre> .
  • Aplicar actualizaciones: helm upgrade <nombre> .

K8s commands

  • Obtener pods, deployments y services: kubectl get <pods | deployments | services>
  • Revisar todos pods: kubectl describe pods
@Klerith
Klerith / cloudbuild.yml
Last active November 1, 2024 16:55
cloudbuild.yml con secretos
steps:
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args:
- -c
- |
docker build -t XXXXXX-docker.pkg.dev/project/image-registry/image-name -f dockerfile.prod --platform=linux/amd64 --build-arg ORDERS_DATABASE_URL=$$DATABASE_URL .
secretEnv: ['DATABASE_URL']
- name: 'gcr.io/cloud-builders/docker'
@Klerith
Klerith / cloudbuild.yml
Last active November 1, 2024 15:58
Google Cloud - Build steps
steps:
- name: "gcr.io/cloud-builders/docker"
args:
[
"build",
"-t",
"XXXXX-docker.pkg.dev/project-name/registry/image-name",
"-f",
"dockerfile.prod",
"--platform=linux/amd64",
@gugadev
gugadev / http.ts
Created July 15, 2023 21:54
Small utility to remote data fetching using polymorfism to allow distinct implementations.
/**
* @description Constituye un catálogo de errores de una API.
* Un catálogo es un mapa en donde se asocia un código de error
* con un mensaje describiendo el problema que se ha originado.
* Por ejemplo:
* {
* 24323: 'Ha ocurrido un error consumiendo el servicio externo ABC',
* 13424: 'No se encontraron coincidencias para la búsqueda'
* }
*/
@Klerith
Klerith / basic.html
Last active January 2, 2025 21:29
Páginas que usaremos en la sección de Formularios Reactivos
<h2>Reactivos: Básicos</h2>
<hr>
<div class="row">
<div class="col">
<form autocomplete="off">
<!-- Campo de producto -->
<div class="mb-3 row">
@Klerith
Klerith / tarea-pg-admin.md
Last active December 13, 2024 22:31
Tarea sobre PGAdmin y Postgres

Docker Hub images

Postgres

pgAdmin

1. Crear un volumen para almacenar la información de la base de datos

docker COMANDO CREAR postgres-db

2. Montar la imagen de postgres así

OJO: No hay puerto publicado -p, lo que hará imposible acceder a la base de datos con TablePlus

@Klerith
Klerith / Dockerfile
Last active December 15, 2024 02:33
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
@Klerith
Klerith / Dockerfile
Last active December 28, 2024 21:50
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
@minhanhhere
minhanhhere / Instruction.md
Last active December 30, 2024 06:39
Customise Your Terminal Using Zsh & powerlevel10k

What we will setup

1. ZSH

ZSH, also called the Z shell, is an extended version of the Bourne Shell (sh), with plenty of new features, and support for plugins and themes.

2. oh-my-zsh

This is a framework for zsh

3. Powerlevel 10k

Powerlevel10k is a theme for Zsh. It emphasizes speed, flexibility and out-of-the-box experience.