Skip to content

Instantly share code, notes, and snippets.

View leonardodepaula's full-sized avatar

Leonardo de Paula Liebscher leonardodepaula

View GitHub Profile
# List kernels
grubby --info=ALL | grep ^kernel
# Set default kernel
grubby --set-default="/boot/vmlinuz-4.18.0-193.1.2.el8_2.x86_64"
@leonardodepaula
leonardodepaula / keychron_linux.md
Created November 12, 2021 11:45 — forked from andrebrait/keychron_linux.md
Keychron keyboards on Linux (+ Bluetooth fixes)

Here is the best setup (I think so :D) for Keychron + Linux

Make Fn + F-keys work

Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes. By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.

In order to change this, you need to change the fnmode parameter for the hid_apple kernel module. Here's some documentation on it, but a quick summary can be found below:

# Django
from django.core.exceptions import ValidationError
# Validaddor de CPF
def valida_cpf(cpf: str):
# Obtém apenas os números do CPF, ignorando pontuações
numbers = [int(digit) for digit in cpf if digit.isdigit()]
# Verifica se o CPF possui 11 números ou se todos são iguais: