Friday, March 27, 2026

Para evitar que Linux hiberne o se suspenda al cerrar la tapa mediante consola

 # 1. Editar el archivo de configuración

sudo nano /etc/systemd/logind.conf

# 2. Buscar y modificar/descomentar (quitar el #) la línea:
HandleLidSwitch=ignore

# 3. Guardar y salir (Ctrl+O, Enter, Ctrl+X)

# 4. Reiniciar el servicio para aplicar cambios
sudo systemctl restart systemd-logind

Friday, March 13, 2026

PowerShell para organizar archivos por año mes y dia

 $origen = "D:\DeleteMe"

Get-ChildItem $origen -File | ForEach-Object {

    # Obtener fecha de modificación en formato YYYYMMDD

    $fecha = $_.LastWriteTime.ToString("yyyyMMdd")

    # Crear carpeta destino

    $carpetaDestino = Join-Path $origen $fecha

    if (!(Test-Path $carpetaDestino)) {

        New-Item -ItemType Directory -Path $carpetaDestino | Out-Null

    }

    # Mover archivo

    Move-Item $_.FullName $carpetaDestino

}

Wednesday, October 29, 2025

Espacio disponible en Sharepoint

 https://admin.cloud.microsoft/?#/reportsUsage/SharePointStorage




Friday, August 8, 2025

lets encrypt para nginx

 https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04-es


sudo apt install certbot python3-certbot-nginx

sudo nano /etc/nginx/sites-available/example.com

...

server_name example.com www.example.com;

...

sudo certbot certonly --webroot -w /var/www/html/ -d tuSitio.ddns.net

#para validar configuracion 
sudo nginx -t

#para recargar la nueva configuracion
sudo systemctl reload nginx


#para validar la actualizacion
sudo systemctl status certbot.timer

#para actualizar
sudo certbot renew --dry-run


#basado en 
https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04-es

Friday, May 2, 2025

Msg 15138, Level 16, State 1, Line 7 The database principal owns a schema in the database, and cannot be dropped.

 Msg 15138, Level 16, State 1, Line 7 The database principal owns a schema in the database, and cannot be dropped.



SELECT SCHEMA_NAME, 

    SCHEMA_OWNER

FROM INFORMATION_SCHEMA.schemata

WHERE SCHEMA_OWNER = 'USERNAME';

--mi arreglo--

alter authorization on schema::db_ddladmin TO dbo;

alter authorization on schema::db_owner TO dbo;


posterior a eso puedo borrar y crear el usuario con problema

Friday, April 25, 2025

obtener ip publica desde power shell

 Invoke-RestMethod -Uri "https://ipinfo.io/ip"



telnet por powershell

 Telnet de Power Shell:


debe ser con acceso de admin

Test-NetConnection -ComputerName 193.127.xxx.xxx -port 22