Skip to content

Instantly share code, notes, and snippets.

@Jiab77
Jiab77 / setup-nut-and-netdata-on-ubuntu.md
Last active July 16, 2025 09:12
In this document, I will explain how to setup nut (Network UPS Tools) on Ubuntu 18.04 and 20.04.

Setup nut and netdata on Ubuntu

In this document, I will explain how to setup nut (Network UPS Tools) on Ubuntu 18.04 and 20.04.

It is basically the next chapter of my previous gist, Upgrade nut on Ubuntu 18.04.

I'll only document USB connected UPS and not the other supported connection modes.

Install required dependencies

Protección de las credenciales enviadas por el navegador al servidor proxy

Problema

Es sabido que durante el proceso de autenticación en un servidor proxy HTTP las credenciales se envian en texto plano. Lo anterior pudiera convertirse en un problema de seguridad. Esta vulnerabilidad permite a un usuario malicioso capturar fácilmente el par usuario contraseña utilizando un ataque de tipo MitM.

Solución

Una solución viable consiste en configurar el servidor proxy con soporte para SSL, de modo que el tráfico enviado desde el navegador hacia este viaje por un canal seguro. Para esto, el navegador debe ser capaz de comunicarse con el servidor proxy a través del protocolo HTTP sobre SSL/TLS.

@dbirks
dbirks / change-last-logged-on-user-windows-10.md
Last active January 25, 2025 13:03
Change last logged on user on Windows 10

In Windows 10 you can no longer change the last logged on user in the registry like you could in Windows 7. Windows 10 requires the user's SID to be entered as well. Here's an updated guide.

In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI, you'll want to change 4 entries:

  • LastLoggedOnDisplayName
    • Enter the user's full name, like Allan Jude
  • LastLoggedOnSAMUser
    • Enter the username, like SHORTDOMAIN\allan.jude
  • LastLoggedOnUser
  • Enter the username again, like SHORTDOMAIN\allan.jude
@Stanback
Stanback / nginx.conf
Last active March 30, 2025 03:57 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which