Skip to content

Instantly share code, notes, and snippets.

View aperezlillo's full-sized avatar

Alejandro Perez Lillo aperezlillo

View GitHub Profile
#!/bin/bash
# Configuración del servidor Redis
REDIS_HOST="localhost"
REDIS_PORT=6379
REDIS_PASSWORD="mypassword"
# Función para realizar una prueba de uso en Redis usando Docker
function test_redis {
# Realizar un PING y obtener el tiempo de respuesta usando Docker
@aperezlillo
aperezlillo / decorators.py
Created February 3, 2024 07:22
Python decorators
def timing_decorator(func):
import time
def wrapper(*args, **kwargs):
start = time.time()
result = func(*args, **kwargs)
end = time.time()
print(f"{func.__name__} took {end - start} seconds to run.")
return result
return wrapper
@aperezlillo
aperezlillo / nvmCommands.js
Created December 20, 2023 11:23 — forked from chranderson/nvmCommands.js
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node