This file contains hidden or 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
| class Specification: | |
| def __and__(self, other): | |
| return And(self, other) | |
| def __or__(self, other): | |
| return Or(self, other) | |
| def __xor__(self, other): | |
| return Xor(self, other) |
This file contains hidden or 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
| START: [URL …or… mobile OS + app] | |
| STEPS: | |
| 1. [list the exact steps it takes to reproduce the problem] | |
| 2. [use numbers to show each step in order] | |
| 3. [include multiple apps if necessary] | |
| 4. [write it so a 10 year old could reproduce] | |
| ACTUAL: [identify the thing that is broken, screenshots help] | |
| EXPECTED: [explain what you expected to see] | |
| URGENCY: [only for critical production issue reports] | |
| Example: |
This file contains hidden or 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/bash | |
| ID=$(xinput list|grep TouchPad|awk '{print $6}'| cut -d= -f 2) | |
| STATE=$(xinput list-props ${ID} |grep 'Device Enabled'| awk '{ print $4}') | |
| function do_enable() { | |
| xinput enable ${ID} | |
| killall notify-osd | |
| notify-send 'TouchPad enabled' | |
| } |
This file contains hidden or 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/bash | |
| # This script rotates the screen and touchscreen input 90 degrees each time it is called, | |
| # by Ruben Barkow: https://gist.github.com/rubo77/daa262e0229f6e398766 | |
| #### configuration | |
| # find your Touchscreen device with `xinput` | |
| TouchscreenDevice='ELAN Touchscreen' | |
| screenMatrix=$(xinput --list-props "$TouchscreenDevice" | awk '/Coordinate Transformation Matrix/{print $5$6$7$8$9$10$11$12$NF}') |
This file contains hidden or 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
| NeoBundle 'chrisgillis/vim-bootstrap3-snippets' | |
| NeoBundle 'vim-scripts/todo-txt.vim' | |
| NeoBundle 'farseer90718/vim-taskwarrior' | |
| NeoBundle 'vim-perl/vim-perl' | |
| NeoBundle 'scrooloose/syntastic' |
This file contains hidden or 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
| postgres: | |
| image: postgres:9.4 | |
| volumes: | |
| - ./init.sql:/docker-entrypoint-initdb.d/init.sql |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| """Google Authenticator integration example | |
| $ pip install otpauth qrcode pillow | |
| """ | |
| import qrcode | |
| from otpauth import OtpAuth | |
This file contains hidden or 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
| postgresql92: | |
| image: onjin/alpine-postgres:9.2 | |
| volumes: | |
| - $HOME/.volumes/postgresql92:/var/lib/postgresql/data | |
| postgresql93: | |
| image: onjin/alpine-postgres:9.3 | |
| volumes: |
This file contains hidden or 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
| """Generate cryptographically strong pseudo-random numbers suitable for | |
| managing secrets such as account authentication, tokens, and similar. | |
| See PEP 506 for more information. | |
| https://www.python.org/dev/peps/pep-0506/ | |
| """ | |
| __all__ = ['choice', 'randbelow', 'randbits', 'SystemRandom', | |
| 'token_bytes', 'token_hex', 'token_urlsafe', |
This file contains hidden or 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 abc import ABC, ABCMeta, abstractmethod | |
| from collections import namedtuple | |
| from itertools import count | |
| PayloadFactory = namedtuple('PayloadFactory', [ | |
| 'good', 'created', 'queued', 'unchanged', 'requires_auth', | |
| 'permission_denied', 'not_found', 'invalid', 'error' | |
| ]) | |
| """ |