Skip to content

Instantly share code, notes, and snippets.

from click import command, option, Option, UsageError
class MutuallyExclusiveOption(Option):
def __init__(self, *args, **kwargs):
self.mutually_exclusive = set(kwargs.pop('mutually_exclusive', []))
help = kwargs.get('help', '')
if self.mutually_exclusive:
ex_str = ', '.join(self.mutually_exclusive)
kwargs['help'] = help + (
import os
import re
exts = set(['.java', '.groovy'])
BEGIN_JAVADOC = re.compile('^\s*\/\*\*.*')
END_JAVADOC = re.compile('^\s*\*\/.*')
MISSING_PARAGRAPH = re.compile('^(\s*)\*\s*$')
507,513d506
<
< // cert auth
< case 'ssh-rsa-cert-v01@openssh.com':
< case 'ssh-dss-cert-v01@openssh.com':
< case 'ecdsa-sha2-nistp256-cert-v01@openssh.com':
< case 'ecdsa-sha2-nistp384-cert-v01@openssh.com':
< case 'ecdsa-sha2-nistp521-cert-v01@openssh.com':
535c528
< if (!pubKeyFullType.startsWith(sigFullType)) {
@jacobtolar
jacobtolar / Log4JTest.java
Last active December 11, 2017 20:43
verification for LOG4J2-2123
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class Log4JTest {
private static final Logger logger = LogManager.getLogger("Log4JTest");
public static void main(String[] args) {
logger.info("this is a normal message and will appear before and after the fix");
logger.info("filter -- this message should not appear after LOG4J2-2123");
}
}