Skip to content

Instantly share code, notes, and snippets.


Leo Gallego leogallego

View GitHub Profile
leogallego /
Last active Mar 15, 2021
white noise speaker when idle pulse audio linux
White noise is caused by the suspend-on-idle for some speakers.
]$ sudo vim /etc/pulse/
### Automatically suspend sinks/sources that become idle for too long
#load-module module-suspend-on-idle
leogallego / wacom-one-small-dual-monitor-nvidia.txt
Last active Mar 5, 2021
wacom one small dual monitor nvidia propietary driver
View wacom-one-small-dual-monitor-nvidia.txt
## list screens / monitors
~]$ xrandr
Screen 0: minimum 8 x 8, current 3640 x 1920, maximum 32767 x 32767
DVI-D-0 connected 1080x1920+0+0 left (normal left inverted right x axis y axis) 475mm x 267mm
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected primary 2560x1080+1080+0 (normal left inverted right x axis y axis) 673mm x 284mm
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
leogallego / gist:ef00d7667b2ba221f444b4aea35749c8
Created Feb 14, 2021
wacom one tablet linux dual monitor setup
View gist:ef00d7667b2ba221f444b4aea35749c8
### Requirements ###
* X Server 1.8 or later
* xf86-input-wacom-0.10.9 or later
## MapToOutput ##
Tip: The '''MapToOutput''' [[xsetwacom]] parameter requires at least xf86-input-wacom- to work with the NVIDIA binary driver. See [[Coordinate Transformation Matrix|Dual-and-Multi-Monitor-Set-Up#coordinate-transformation-matrix|]] instead.
The wacom driver does not support multi-monitor setups directly - handling of such setups is handled by the X Server. [[xsetwacom]] does however provide a parameter to easily map a tablet to a screen
leogallego /
Created Feb 6, 2021 — forked from rometsch/
MPOW BH456A Bluetooth USB Adapter Kernel Module Adjustements (Realtek RTL8761B chip)


The MPOW Bluetooth 5 dongle (Model: BH456A) does not work out of the box on Ubuntu 20.04 (kernel 5.4.0-42).


Patch the bluetooth kernel module and copy the firmware binaries to /lib/firmware.

Copy the fimware

View hdmi cec libcec odroid libreelec coreelec
Pass the argument -DHAVE_AOCEC_API=1 to the cmake command in the compilation instructions:
cmake -DHAVE_AOCEC_API=1 ..
View 10-marblemouse.conf
Section "InputClass"
Identifier "Marble Mouse"
MatchProduct "Logitech USB Trackball"
Driver "libinput"
Option "ScrollMethod" "button"
Option "ScrollButton" "9"
Option "MiddleEmulation" "true"
Option "HorizontalScrolling" "false"
Option "ButtonMapping" "3 9 1 4 5 6 7 2 8"
# Option "ButtonMapping" "3 9 1 4 5 6 7 2 8" // left hand - SR scroll, LL+LR fwd, SL mid click
View gist:9f034f4d5de2e7590d811c174b951c97
# If the key already exists in another user (or machine user) or is a deploy key in a project/repo, it can't be used anywhere else.
# Github doesn't inform the owner of the key, the project or any other data about the conflict
# You only see the key fingerprint in every project or user, and a user filed description (text, might not have relation to actual key)
# How to see a github compatible fingerprint from a public id_rsa key file:
ssh-keygen -E md5 -lf /$PATH/$ID_RSA_FILE
View gist:ac18185e54e5dcaf598a748823f76832
# Set all directories permissions to 755 / rwx-r-x-r-x
find . -type d -exec chmod 755 {} \;
# Set all files permissions to 644 / rw-r--r--
find . -type f -exec chmod 644 {} \;
# Set all directories permissions to 555 / r-x-r-x-r-x (read only)
find . -type d -exec chmod 755 {} \;
# Set all files permissions to 444 / r--r--r-- (read only)
View gist:f0cb6d49d87b776d70c45b246a71f4a6
:w !sudo tee %
Or in .vimrc, map w!! to the command above:
cmap w!! w !sudo tee > /dev/null %
View whatsmyip
ip=$(curl -s
echo "My public IP address is: $ip"