Skip to content

Instantly share code, notes, and snippets.

View hmanzur's full-sized avatar
:octocat:
Github Actions Hachathon 2020 Winner

Habid Enrique Manzur Restrepo hmanzur

:octocat:
Github Actions Hachathon 2020 Winner
View GitHub Profile
@hmanzur
hmanzur / Ansible Debian.md
Last active May 26, 2025 16:02
Ansible Vault Self Hosted Debian

Playbook de Ansible para Instalar y Configurar HashiCorp Vault

Este playbook automatiza la instalación y configuración de HashiCorp Vault en sistemas basados en Debian/Ubuntu.

Requisitos

  • Sistema operativo: Debian/Ubuntu

  • Ansible 2.9 o superior

import { useEffect, useState } from 'react';
/**
* Transforma una cadena de texto a formato camelCase.
* @param {string} str - La cadena de texto a capitalizar.
* @returns {string} - La cadena resultante en formato camelCase
* @example
* const result = capitalizeWords("hola mundo");
* console.log(result);

🔍 Conceptos Fundamentales

Comprender qué es Terraform, cómo funciona, su arquitectura y flujo de trabajo (plan, apply, destroy). Infraestructura como código (IaC): Conceptos y beneficios. Diferencias entre archivos de configuración y estado (.tf y terraform.tfstate).

📁 Configuración y Sintaxis

HCL (HashiCorp Configuration Language): Cómo definir recursos, proveedores, variables, outputs, módulos, etc. Bloques principales (provider, resource, module, data, output, variable).

@hmanzur
hmanzur / README.md
Last active December 19, 2024 21:30
Github Actions Reusable Workflow Calls

Reutilización de Workflows en GitHub Actions

GitHub Actions permite reutilizar workflows mediante la instrucción workflow_call. Esta funcionalidad facilita la modularidad y el uso de workflows comunes en múltiples repositorios. Para configurar y utilizar esta funcionalidad en un repositorio:

Configuración de acceso a componentes

Es importante habilitar el acceso a los workflows reutilizables. Para repositorios privados, realiza los siguientes pasos:

  1. Ve a la configuración del repositorio en:
    https://github.com/orgs/<tu-organización>/repos/<nombre-del-repo>/settings/actions
@hmanzur
hmanzur / loader.svg
Last active November 20, 2024 16:56
Asincode Loader
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hmanzur
hmanzur / useDocumentMeta.js
Last active November 15, 2024 14:28
Manipulate HTML meta, title and links in components
import { useEffect } from 'react';
/**
* Custom hook to manage the document's title, meta tags, and link tags.
* @param {string} title - The new title for the document.
* @param {Array} metas - An array of meta tag objects with { key, props, value }.
* @param {Array} links - An array of link tag objects with { rel, href }.
*/
const useDocumentMeta = (title, metas = [], links = []) => {
useEffect(() => {
@hmanzur
hmanzur / 00_Bases.md
Last active April 27, 2023 20:17
DevOps Roadmap 2023

Bases DevOps

  • Principios DevOps
  • Bases en algún lenguaje de programación (Python / Typescript / Go / Java)
  • Manejo de herramientas de CI / CD (Github Actions / Repository Pipelines / Cloud Pipelines / Circle CI)
  • Infraestructura como código (Terraform / Pulumi / Cloud SDK)
  • Unix (Bash scripting, Linux, comandos más usados)
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
args:
- '-c'
- |
# File that contains failures.
failure_file=failure.log
touch ${failure_file}
for d in portal/*/; do
@hmanzur
hmanzur / 00_Bases.md
Last active May 12, 2021 17:47
JS Roadmap 2021

Bases del lenguaje

  • Asignación, variables y tipos
  • Condicionales y operadores
  • Arrays y ciclos
  • Funciones
  • Callbacks
@hmanzur
hmanzur / es6-spreadsheet-parser.js
Last active February 23, 2021 14:38
Es6 promisify xlsx parser
/**
* Convert Spreadsheet to array using XLSX library and es6 promises
*
* @param {File} file - File to parse
* @param {string} [type=array] - Type to parse
* @returns {Promise<Object, String>}
*
* @see https://www.npmjs.com/package/xlsx
*/
function spreadParser(file, type = 'array') {