Skip to content

Instantly share code, notes, and snippets.

View rbernon's full-sized avatar

Rémi Bernon rbernon

  • CodeWeavers
  • France
View GitHub Profile

The stdout / stderr of these commands after pressing some keys in the same order (that usually map incorrectly but not only):

  • sudo evtest (then select the keyboard device)
  • xev -event keyboard
  • WINEDEBUG=+key wine win-keyboard.exe from the file below, compiled with x86_64-w64-mingw32-gcc -o win-keyboard.exe win-keyboard.c
  • win-keyboard.exe on windows if possible would be awesome
from __future__ import print_function
import gdb
import subprocess
import sys
import re
class WineReload (gdb.Command):
"Command to pipe gdb internal command output to external commands."
@rbernon
rbernon / git-rab
Last active April 30, 2026 10:26
#!/bin/bash
# git rebase-all-branches
# prefixes and suffixes separated with /
prefixes='wip|bug'
suffixes='wip|bug|v[0-9]+.*$'
GIT_SEQUENCE_EDITOR="sed -re '/^label (onto|branch-point)/{p;d}; /^label/{h;s:^label (.+)$:x git branch -f \1 HEAD:;x;p;x;s:($prefixes)-:\1/:g;s:-($suffixes):/\1:g}' -i" git rebase -i -r "$@"

Keybase proof

I hereby claim:

  • I am rbernon on github.
  • I am rbernon (https://keybase.io/rbernon) on keybase.
  • I have a public key whose fingerprint is 62F8 624F 9507 89D1 7EA9 42F2 0447 48AA A464 E2E2

To claim this, I am signing this object: