Skip to content

Instantly share code, notes, and snippets.

View madkoding's full-sized avatar
馃З
Back to your reality

madKoding madkoding

馃З
Back to your reality
View GitHub Profile
@madkoding
madkoding / install-synaptic-figerprint.md
Created October 7, 2024 05:26
Installation and Configuration of python-validity with PAM for SDDM Fingerprint Authentication (Archlinux)

Installation and Configuration of python-validity with PAM for SDDM Fingerprint Authentication

Step 1: Installing python-validity from AUR

First, install the required dependencies:

sudo pacman -S base-devel git cmake libusb glib2-dev
@madkoding
madkoding / removeroms.md
Created May 21, 2024 23:04
Python Script for Removing Duplicate Files (roms) Based on Levenshtein Distance

Python Script for Removing Duplicate Files (roms) Based on Levenshtein Distance

This Python script identifies and removes duplicate files in a specified directory based on the Levenshtein distance between their names. Only the first file in each group of similar files is kept, and the rest are deleted. The script excludes directories and only processes files.

Requirements

  • Python 3.x
  • colorama library for colored console output

Installation

@madkoding
madkoding / instalar-proxmox-gpu-passthrough.md
Created December 28, 2023 17:17
Instalaci贸n de Proxmox y Configuraci贸n de Passthrough de GPU para una M谩quina Virtual de Windows

Instalaci贸n de Proxmox y Configuraci贸n de Passthrough de GPU para una M谩quina Virtual de Windows

Paso 1: Instalaci贸n de Proxmox

  1. Descargar Proxmox: Ve a la p谩gina oficial de Proxmox y descarga la 煤ltima ISO de Proxmox VE.

  2. Crear un medio de instalaci贸n: Usa un programa como Rufus para quemar la ISO en un USB.

  3. Instalaci贸n: Arranca tu servidor desde el USB y sigue las instrucciones en pantalla para instalar Proxmox.

@madkoding
madkoding / lastfm-spotify.md
Last active December 15, 2023 23:27
Como crear una pagina que muestre lo que estas escuchando en spotify

Como crear una pagina que muestre lo que estas escuchando en spotify

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
@madkoding
madkoding / jwt-rs256-nest.md
Last active December 15, 2023 14:23
Autenticaci贸n de JWT con firma RS256 en Nest

Configuraci贸n Correcta de JWT en NestJS con firma RS256

Este resumen proporciona una gu铆a sobre c贸mo configurar correctamente JWT en NestJS, especialmente para el uso de algoritmos RSA como RS256.

Problema Com煤n

El problema suele estar en la configuraci贸n incorrecta del JwtModule y la instancia de JwtStrategy. Es crucial especificar los algoritmos utilizados para firmar y verificar los tokens, junto con las claves correspondientes.

Verificaci贸n del Algoritmo del Token

@madkoding
madkoding / fix-hyperv-udp-packet-loss.md
Last active December 10, 2023 20:56
Fix Hyper-V UDP packet loss in linux (Minecraft Bedrock server issues)

Persistent Disabling of TCP/UDP Checksum Offloading in a Virtual Machine

This guide provides a method to persistently disable TCP/UDP checksum offloading on eth0 in a virtual machine, ensuring the changes remain effective even after a reboot. (Usually to fix issues for Minecraft Bedrock Server)

Steps

1. Install ethtool

First, ensure that ethtool is installed. If it's not installed, you can install it using the following command:

@madkoding
madkoding / semantic-emoji-commit-messages.md
Last active July 21, 2021 21:50
Semantic Emoji Commit Messages for Git

Semantic Emoji Commit Messages

Helps to keep a better order and keep easy to understand every change in the git log history Emojis looks nice, and i chose the most easy to remember ones

Syntax

type [scope] subject
emoji section (optional) Summary (present tense)
@madkoding
madkoding / install-zsh-powerline-ubuntu.md
Last active December 10, 2023 20:32
Install ZSH and Oh-my-zsh (powerline like) in Ubuntu

Install ZSH and Oh-my-zsh (Powerline-like) in Ubuntu

Introduction

This guide provides instructions on how to install ZSH and Oh-my-zsh with a Powerline-like theme in Ubuntu

Instructions

1. Install Powerline Fonts

  • First, install Powerline fonts. You can find them here.
@madkoding
madkoding / anticors-proxy-server.js
Last active December 10, 2023 20:35
Create proxy server for CORS issues (http-proxy package)
// Import required modules
const http = require("http");
const httpProxy = require("http-proxy");
// API target and proxy port configuration
const API_TARGET = 'https://pokeapi.co/api/v2/';
const PROXY_PORT = 8080;
// Create a proxy server
const proxy = httpProxy.createProxyServer({});
@madkoding
madkoding / install-docker-wsl2.sh
Last active December 10, 2023 20:37
Install Docker and Docker Compose in WSL2
#!/bin/bash
# Check if running in WSL
if grep -qEi "(Microsoft|WSL)" /proc/version &> /dev/null ; then
echo "WSL detected, proceeding with Docker installation..."
else
echo "This script is intended to be run in WSL. Exiting."
exit 1
fi