Skip to content

Instantly share code, notes, and snippets.

View gchiappe's full-sized avatar
💭
I may be slow to respond.

Giancarlo A. Chiappe gchiappe

💭
I may be slow to respond.
View GitHub Profile
@gchiappe
gchiappe / scale.py
Last active July 11, 2016 15:01 — forked from fabeat/scale.py
from PIL import Image
def add_whitespaces(image, max_size):
"""
Adds white spaces until the image reaches the desired max_size.
Forked from: https://gist.github.com/fabeat/6621507
:param image: Image
:param max_size: [ W , H ]
:return: Image
@gchiappe
gchiappe / 52-thinkpad.conf
Last active January 31, 2020 00:29
X11 Thinkpad Synaptics Touchpad Settings
# 52-thinkpad.conf
# This is a X11 configuration file that tunes up the synaptics touchpad using the
# synaptics libinput driver, I made this recopilating settings from different sources.
# Tested in elementaryOS 5.1
# Install HWE synaptics driver for Ubuntu 18.04.3+
# sudo apt install xserver-xorg-input-synaptics-hwe-18.04
# Install this file in:
# /usr/share/X11/xorg.conf.d/52-thinkpad.conf
@gchiappe
gchiappe / 95thinkpad_touchpad
Created January 31, 2020 16:14
Thinkpad Touchpad: restore multi touch at sleep wake
#!/bin/sh
# Install this file as:
# /usr/lib/pm-utils/sleep.d/95thinkpad_touchpad
# and sudo chmod +x it.
case "$1" in
resume)
modprobe -r psmouse
modprobe psmouse