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
| #!/usr/bin/env ruby | |
| # | |
| # git config --add hooks.jenkins.giturl <git url you've configured in jenkins> | |
| # git config --add hooks.jenkins.jenkinsurl https://your.jenkins.host/ | |
| require 'rubygems' | |
| require "net/http" | |
| require "uri" | |
| repopath = File.expand_path(__FILE__ + '/../../').split('/') |
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
| def parseheader(headerstream, defined_constants): | |
| depth = 0 | |
| ignoring = False | |
| for line in headerstream: | |
| line = line.strip() | |
| if not line.startswith('#'): | |
| continue |
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
| import ctypes | |
| __all__ = ['FtdiSerial', 'FtdiException', 'FtdiTimeoutException'] | |
| libftdi = ctypes.CDLL('libftd2xx.so') | |
| FT_OK = 0 | |
| class FtdiException(Exception): |
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 __future__ import print_function | |
| import traceback | |
| import sys | |
| def run(): | |
| print("minirepl on Python", sys.version) | |
| continued = False | |
| line = None | |
| while True: | |
| try: |
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 __future__ import print_function | |
| from contextlib import contextmanager | |
| class DslRunner(object): | |
| """Runs Python code in the context of a class. | |
| Public methods will be exposed to the DSL code. | |
| """ |
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
| import ctypes | |
| __all__ = ['FtdiSerial', 'FtdiException', 'FtdiTimeoutException'] | |
| libftdi = ctypes.CDLL('libftd2xx.so') | |
| FT_OK = 0 | |
| class FtdiException(Exception): |
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
| assumption: your machine has eth0 bridged to br0 already | |
| (everything as root) | |
| create a new netns: | |
| ------------------- | |
| ip netns add foo | |
| ip netns exec foo bash |
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 | |
| # sudoers: | |
| # username ALL = NOPASSWD: /usr/bin/hcitool, /bin/mount | |
| # crontab: | |
| # @reboot ~/Source/dotfiles/tools/bt-proximity | |
| # one-time pairing: | |
| # bt-device -c F0:XX:XX:XX:XX:XX | |
| mkdir -p ~/.local/bt-proximity |
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
| *.d | |
| *.pre | |
| *.p1 | |
| *.lst | |
| *.sym | |
| *.obj | |
| *.o | |
| *.sdb | |
| *.obj.dmp | |
| html/ |
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
| import codecs | |
| import sys | |
| from xml.dom.minidom import parse, parseString | |
| def minimize(el): | |
| attrs = [] | |
| for i in range(0, el.attributes.length): | |
| attrs.append(el.attributes.item(i).name) | |
| for attr in attrs: | |
| if el.getAttribute(attr) == "" or el.getAttribute(attr) == "0": |
OlderNewer