Skip to content

Instantly share code, notes, and snippets.

View gevasiliou's full-sized avatar

George Vasiliou gevasiliou

View GitHub Profile
class SetterNGetter():
def __init__(self, *args, **kwargs):
self.my_age = kwargs['age']
self.my_name = kwargs['name']
@property
def my_age(self):
return self.my_age
@gevasiliou
gevasiliou / yoga-auto-rotate
Created October 14, 2016 11:35 — forked from jrosco/yoga-auto-rotate
Lenovo Yoga 13 tablet mode / auto rotation script (ubuntu/debian)
#!/bin/bash
#
# yoga-auto-rotate -- ghetto-style tablet mode, with keyboard and all.
#
# Simple little script that will detect an orientation change for a
# Lenovo Yoga 13 (very hackily) and adjust the active display's
# orientation and disable/enable the touchpad as necessary.
#
# The Yoga 13 will emit keycode `e03e` at one second intervals
# when the screen is flipped into tablet mode. Since this keycode
@gevasiliou
gevasiliou / rotate_desktop.sh
Created October 14, 2016 09:35 — 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
@gevasiliou
gevasiliou / StatusIcon.py
Created September 29, 2016 13:17 — forked from pklaus/StatusIcon.py
StatusIcon – A Simple Tray Icon Application Using PyGTK
#!/usr/bin/env python
# found on <http://files.majorsilence.com/rubbish/pygtk-book/pygtk-notebook-html/pygtk-notebook-latest.html#SECTION00430000000000000000>
# simple example of a tray icon application using PyGTK
import gtk
def message(data=None):
"Function to display messages to the user."