This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ xinput --list "Wacom Intuos S 2 Pen stylus" | |
Wacom Intuos S 2 Pen stylus id=11 [slave pointer (2)] | |
Reporting 8 classes: | |
Class originated from: 11. Type: XIButtonClass | |
Buttons supported: 7 | |
Button labels: None None None None None None None | |
Button state: | |
Class originated from: 11. Type: XIKeyClass | |
Keycodes supported: 248 | |
Class originated from: 11. Type: XIValuatorClass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
export HUBOT_SLACK_TOKEN=<REDACTED> | |
export HUBOT_LOG_LEVEL="info" | |
export HUBOT_AUTH_ADMIN=<REDACTED> | |
export REDIS_URL=redis://127.0.0.1:6379/hal | |
export HUBOT_DEFAULT_COMMANDS="" | |
cd $DIR/.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat /etc/systemd/system/hubot.service | |
[Unit] | |
Description=Hubot | |
Requires=network.target | |
After=network.target | |
[Service] | |
Type=simple | |
WorkingDirectory=/root/hubot_hal/ | |
User=root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys | |
print 'Printing absolute path for "."' | |
print os.path.abspath('.') | |
print 'Printing get_script_home() output:' | |
main = sys.modules['__main__'] | |
# if hasattr(main, '__file__'): | |
print os.path.dirname(os.path.abspath(main.__file__)) | |
print main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# ---------------------------------------------------------------------------- | |
# pyglet | |
# Copyright (c) 2006-2008 Alex Holkner | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(auto-save-file-name-transforms (quote ((".*" "temporary-file-directory" t)))) | |
'(backup-directory-alist nil) | |
'(blink-cursor-mode nil) | |
'(browse-url-browser-function (quote browse-url-firefox)) | |
'(bubbles-game-theme (quote easy)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Once this extension is installed to a ipython instance, it no longer crashes if the current directory is removed. | |
Based on the work of dhananjaysathe | |
More info at: https://github.com/ipython/ipython/pull/811""" | |
import os, logging, IPython, errno | |
def getcwdu(self): | |
"""Graciously handles cases when PWD does not exist. | |
Defaults to home directory eliminating the OSError exception. | |
""" | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./cmake-build.sh | |
Do you want to build tests? (y/n) : | |
y | |
-- The C compiler identification is GNU | |
-- The CXX compiler identification is GNU | |
-- Check for working C compiler: /usr/bin/gcc | |
-- Check for working C compiler: /usr/bin/gcc -- works | |
-- Detecting C compiler ABI info | |
-- Detecting C compiler ABI info - done | |
-- Check for working CXX compiler: /usr/bin/c++ |