Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / VueRouterTemplate.vue
Last active April 12, 2024 12:44
Template para nuestro ejercicio de Vue Rotuer
<template>
<div class="flex flex-col h-screen">
<!-- Header -->
<header class="flex items-center h-14 px-4 border-b border-gray-300 sm:h-16 md:px-6 lg:px-8">
<div>
<a class="flex items-center gap-2 font-semibold" href="#">
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="40" height="40" />
</a>
</div>
.fade-in {
animation: fadeIn 0.3s;
-webkit-animation: fadeIn 0.3s;
-moz-animation: fadeIn 0.3s;
-o-animation: fadeIn 0.3s;
-ms-animation: fadeIn 0.3s;
}
@keyframes fadeIn {
0% {opacity:0;}
100% {opacity:1;}
@Klerith
Klerith / tsconfig.vitest.json
Created April 5, 2024 16:22
Archivo de configuración de TypeScript para Vitest
{
"extends": "./tsconfig.app.json",
"exclude": [],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo",
"lib": [],
"types": ["node", "jsdom", "vitest/globals"]
}
}
@Klerith
Klerith / IndecisionView.html
Created April 3, 2024 19:19
Ventana de chat para el curso de Vue.js
<!-- Fuente: https://tailwindcomponents.com/component/chat-layout -->
<template>
<div class="bg-gray-100 h-screen flex flex-col max-w-lg mx-auto">
<div class="bg-blue-500 p-4 text-white flex justify-between items-center">
<span>Mi esposa</span>
</div>
<div class="flex-1 overflow-y-auto p-4">
<div class="flex flex-col space-y-2">
<!-- Messages go here -->
@Klerith
Klerith / heroes.ts
Created March 25, 2024 19:19
Material para el ejercicio del curso de Vue.js
const heroes = [
{
id: 1,
name: 'Batman',
owner: 'DC'
},
{
id: 2,
name: 'Spiderman',
owner: 'Marvel'
@Klerith
Klerith / vue-instalaciones.md
Last active March 25, 2024 17:42
Instalaciones recomendadas - Curso de Vue.js de cero a experto
@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 March 20, 2024 14:42
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 March 18, 2024 20:53
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 March 18, 2024 14:56
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",