Skip to content

Instantly share code, notes, and snippets.

View websvcPT's full-sized avatar
🏠
Working from home

WEBsvc websvcPT

🏠
Working from home
View GitHub Profile
@websvcPT
websvcPT / rotate_desktop.sh
Last active February 17, 2018 02:55 — forked from mildmojo/rotate_desktop.sh
Script to rotate the screen and touch devices on modern Linux desktops. Great for convertible laptops.
#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
# https://wiki.ubuntu.com/X/InputCoordinateTransformation
@websvcPT
websvcPT / dict_merge.py
Created June 16, 2018 19:43
Python Recursive Dictionary Merge
def recursive_dict_merge(DICT1, DICT2):
"""
Merges 2 dictionaries recursively
Updates DICT1 with DICT2 keys/values
Does not remove existing values from DICT1
Does not add new keys from DICT2 if they don't exist in DICT1 already
:param DICT1:
:param DICT2:
:return: dict