Skip to content

Instantly share code, notes, and snippets.

View gleydson404's full-sized avatar

Gleydson Cavalcante gleydson404

  • @ALDI-SOUTH-IT
  • Mülhein an der Rhur, Germany
View GitHub Profile
@gleydson404
gleydson404 / keychron_linux.md
Created January 28, 2022 18:26 — 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:

@gleydson404
gleydson404 / tmux.conf
Created July 11, 2017 18:48 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@gleydson404
gleydson404 / tmux-cheatsheet.markdown
Created May 23, 2016 03:14 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@gleydson404
gleydson404 / dtree.py
Created October 19, 2015 19:05
Implementação de árvore de decisão com o algoritmo ID3
# coding: utf-8
import collections
def majority_value(data, target_attr):
"""
Cria uma lista com todos os valores do atributo passado para cada registro
e retorna os valores que aparecem com maior frequencia para este atributo
"""
data = data[:]
return most_frequent([record[target_attr] for record in data])