Skip to content

Instantly share code, notes, and snippets.

@mxmauro
mxmauro / UEFI2023.md
Created May 16, 2026 19:46
Actualización manual paso a paso de los certificados Secure Boot UEFI 2023

Cómo actualizar los certificados UEFI 2023

Descargo de responsabilidad

Las instrucciones, recomendaciones y contenidos brindados se proporcionan “tal cual”, sin garantías de ningún tipo. El usuario asume toda la responsabilidad por su utilización. No se acepta responsabilidad alguna por daños materiales, pérdida de datos, fallos de funcionamiento, lesiones o cualquier otro perjuicio derivado del uso o interpretación de la información suministrada.

BitLocker

Antes de empezar, si tiene BitLocker (cifrado de disco) activo, diríjase al Menú de Inicio -> Administar BitLocker y en la ventana que aparece, seleccione la opción de hacer una copia de seguridad de la clave de recuperación por si se llegara a necesitar y que suspenda la protección temporalmente (ante cada reinicio asegúrese de que no se haya reactivado automáticamente). Una vez finalizado el proceso, puede reactivar el cifrado.

Seguridad de Windows

@mxmauro
mxmauro / eolconverter.ps1
Created April 1, 2026 01:07
PowerShell script to change/fix EOL on text files.
<#
eolconverter.ps1
(C) 2026 Mauro H. Leggieri
License: MIT
Usage:
powershell -ExecutionPolicy Bypass -File .\eolconverter.ps1 <crlf|lf|cr> <pattern>
Description:
Recursively scans files under the current directory, matches their normalized
# Update CloudFlare DNS record within MikroTik router
# (C) Mauro H. Leggieri 2024
# MIT License
#
# CloudFlare settings
:local cfZoneID "####"
:local cfDnsRecordID "####"
:local cfApiToken "####"
;local subDomain "{subdomain}"
;local fullDomain "$subDomain.{top-level-domain}"
@mxmauro
mxmauro / GITHUB_APP.md
Created February 13, 2024 14:08
Using custom GitHub application to enhance GitHub actions

Using custom GitHub application to enhance GitHub actions

Application creation

  1. Go to your GitHub company's profile settings: https://github.com/organizations/{company name}/settings/profile
  2. Under developer settings on the left side menu, click on GitHub Apps.
  3. Click on New GitHub App buttton.
  4. Enter the application name, homepage url, disable webhook unless you need it.
  5. Set up repository access permissions. For e.g., read only access to Content, Packages and Metadata.
  6. Set up organization access permissions. For e.g., read only access to Members.
@mxmauro
mxmauro / update_go_deps.vbs
Created July 5, 2022 14:13
Update all application Go dependencies on Windows
'Run CSCRIPT update_go_deps.vbs in the folder containing your application source code
Option Explicit
Dim oShell
Dim S, Lines, Values
Set oShell = CreateObject("Wscript.Shell")
S = RunAndCapture("go list -mod=readonly -f " & Chr(34) & "{{.Path}}|{{.Indirect}}|{{.Main}}" & Chr(34) & " -m -u all")
Lines = Split(Replace(S, Chr(10), Chr(13)), Chr(13))
@mxmauro
mxmauro / adding-gpg-keys.md
Created March 9, 2022 11:48
How to sign git tags and commits

How to sign git tags and commits

The following step-by-step guide will assist you to start pushing signed commits and create signed tags. This is a quick-start guide. For more details, you can visit here and here.

There some topics to take into account on why we decided to follow a specific approach on certificate management:

  • GitHub does not handle master certificates revocation but the community seems to not care about this because the purpose of these certificates is to demostrate to others that you are you and not other person impersonating you. If your certificate expires or is stolen, you simply create a new one and upload it to GitHub. Because GitHub also verifies the email address, a thief must also gain to your account in order to be able to use it.
  • Using subkeys is preferable but updating them and GitHub periodically can become a pa
const crypto = require('crypto');
const util = require('util');
const assert = require('assert');
//------------------------------------------------------------------------------
const ITERATIONS = 1000;
const SALT_LENGTH = 32;
const IV_LENGTH = 16;
const GCM_AUTH_TAG_LENGTH = 16;
@mxmauro
mxmauro / prepare_v8.vbs
Created April 14, 2020 15:05
Easily download and compile V8 engine on Windows
'Copyright 2020, Mauro H. Leggieri
'
'Permission is hereby granted, free of charge, to any person obtaining a copy of
'this software and associated documentation files (the "Software"), to deal in
'the Software without restriction, including without limitation the rights to
'use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
'of the Software, and to permit persons to whom the Software is furnished to do
'so, subject to the following conditions:
'
'The above copyright notice and this permission notice shall be included in all
0x6e085c5b38b9098e38c3a21c4fdea435aa394aca