Skip to content

Instantly share code, notes, and snippets.

Dns resolution problem:
sudo nano /lib/systemd/system/docker.service
Add the dns after ExecStar.
--dns 8.8.8.8
@gottdammer
gottdammer / Exim4 headers Rewriting.rst
Last active March 3, 2021 14:09
Exim4 headers Rewriting
@gottdammer
gottdammer / Remote Root Access for MariaDB.rst
Last active September 17, 2021 13:36
Remote Root Access for MariaDB

Remote Root Access for MariaDB

  • Disable the Auth Plugin
use mysql;
update user set plugin='' where User='root';

To exclude some table data, but not the table structure.

https://stackoverflow.com/questions/425158/skip-certain-tables-with-mysqldump

Here is how I do it:

Dump the database structure of all tables, without any data:

Habilitar el logging de las consultas SQL en Mysql/Mariadb:

Ejecutar desde la consola de mysql:

SET GLOBAL general_log = 'OFF';
SET GLOBAL general_log_file = '/var/log/mysql/logsql.log';
SET GLOBAL general_log = 'ON';
@gottdammer
gottdammer / DisableIPv6Linux.rst
Last active March 7, 2020 17:29
Disable ipv6 Linux

Steps to disable IPv6 on Debian (Linux)

  • Edit /etc/sysctl.conf and add:
net.ipv6.conf.all.disable_ipv6 = 1
  • Reload sysctl config:
@gottdammer
gottdammer / Hacer un Gateway con UFW.rst
Last active February 21, 2020 18:15
UFW gateway/NAT

Pasos para hacer un Gateway con UFW (habilitar NAT)

  1. Habilitar Forwarding, editar /etc/sysctl.conf:
net.ipv4.ip_forward=1
@gottdammer
gottdammer / git_report.rst
Created January 31, 2020 12:05
Git Report

Make a report with git:

git log --since='2 sunday ago' --until='1 sunday ago' --format='%Cgreen%ci%Creset (%an) %s%Creset'

  • Create a Alias for git commands, edit ".git/config" :
@gottdammer
gottdammer / create_mysql_user.rst
Last active November 7, 2019 01:07
Crear usuario/dabatabase

MYSQL

create user 'username'@'localhost' identified by 'user-password';
create database dbname;
grant all privileges on dbname.* to 'username'@'localhost';
flush privileges;

PSQL

@gottdammer
gottdammer / clockchange.rst
Last active September 5, 2021 18:52
KVM QMEU Virtual Machine clock change

Change date/time inside Qemu/KVM/Virtualbox

  • Disable ntp clock from timedatectl:
timedateclt set-ntp false
  • Stop any ntp client: ntpd, crony, etc