Skip to content

Instantly share code, notes, and snippets.

Marcelo Lacerda marceloslacerda

View GitHub Profile
View test-tags.yml
- hosts: 127.0.0.1
handlers:
- name: handler a
shell: echo this
tags:
- xtag
- name: handler b
shell: echo that
tags:
- xtag
View docopt_bug.py
import unittest
import docopt
class DocoptTestCase(unittest.TestCase):
def test_single_optional(self):
docopt.docopt("""
test command
Usage: test [--verbose]
View ansible conditional
# neither this or that gets executed
- hosts: 127.0.0.1
remote_user: root
tasks:
- name: do this
shell: echo this
when: not all_proj
- name: do that
shell: echo that
when: all_proj
View anacron-task-daily
#!/bin/sh
sudo -u {{ USER }} /home/msl09/custom-scripts/backup-server
@marceloslacerda
marceloslacerda / MAGA
Last active Apr 29, 2016
make everything better again on irc
View MAGA
def trumpfy(string='AMERICA'):
bold=''
colors = ['5,1', '16,1', '2,1']
words = ['MAKE', string, 'GREAT', 'AGAIN']
def freedomfy(word):
for i in range(len(word)):
yield colors[i%3] + word[i].upper()
result = bold + colors[0] + ' ' + ' '.join([''.join((list(freedomfy(word)))) for word in words]) + ' '
return result
View serranodsdd.log
This file has been truncated, but you can view the full file.
including vendor/cm/vendorsetup.sh
Trying dependencies-only mode on a non-existing device tree?
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
CM_VERSION=13.0-20160415-UNOFFICIAL-serranodsdd
TARGET_PRODUCT=cm_serranodsdd
TARGET_BUILD_VARIANT=userdebug
View Xorg.0.log
[ 66341.667] (II) config/udev: Adding input device Wacom Intuos S 2 Pad (/dev/input/event17)
[ 66341.667] (**) Wacom Intuos S 2 Pad: Applying InputClass "Wacom USB device class"
[ 66341.667] (**) Wacom Intuos S 2 Pad: Applying InputClass "Wacom class"
[ 66341.667] (II) Using input driver 'wacom' for 'Wacom Intuos S 2 Pad'
[ 66341.667] (**) Wacom Intuos S 2 Pad: always reports core events
[ 66341.667] (**) Option "Device" "/dev/input/event17"
[ 66341.667] (EE) Wacom Intuos S 2 Pad: Invalid type 'stylus' for this device.
[ 66341.667] (EE) Wacom Intuos S 2 Pad: Invalid type 'eraser' for this device.
[ 66341.667] (EE) Wacom Intuos S 2 Pad: Invalid type 'cursor' for this device.
[ 66341.667] (EE) Wacom Intuos S 2 Pad: Invalid type 'touch' for this device.
View xwacom.service
[Unit]
Description=translate wacom tablet inputs
Requires=graphical.target
[Service]
Environment=DISPLAY=:0.0
Environment=XAUTHORITY=/home/msl09/.Xauthority
WorkingDirectory=/home/msl09/PycharmProjects/xwacom/
User=root
ExecStart=/usr/bin/python3 redirect_keys.py
View redirect_keys.py
from subprocess import Popen, PIPE
TOP_LEFT = '00,00,00,00,00,01,00,11,01,01,00,00,00'
BOT_LEFT = '00,00,00,00,00,01,00,10,01,01,00,00,00'
TOP_RIGT = '00,00,00,00,00,01,00,15,01,01,00,00,00'
BOT_RIGT = '00,00,00,00,00,01,00,16,01,01,00,00,00'
END = '00,00,00,00,00,00,00,00,00,00,00,00,00'
A = '''keydown Control_L
key z
View verbose xsetwacom
$ xsetwacom -v --list dev
... Display is '(null)'.
... 'list' requested.
... Found device 'Virtual core XTEST pointer' (4).
... 'Virtual core XTEST pointer' (4) is not a wacom device.
... Found device 'Virtual core XTEST keyboard' (5).
... 'Virtual core XTEST keyboard' (5) is not a wacom device.
... Found device 'Power Button' (6).
... 'Power Button' (6) is not a wacom device.
... Found device 'Video Bus' (7).
You can’t perform that action at this time.