- http://stackoverflow.com/questions/804115 (
rebasevsmerge). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebasevsmerge) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
resetvscheckoutvsrevert) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse) - http://stackoverflow.com/questions/292357 (
pullvsfetch) - http://stackoverflow.com/questions/39651 (
stashvsbranch) - http://stackoverflow.com/questions/8358035 (
resetvscheckoutvsrevert)
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 subprocess import Popen, PIPE | |
| from os import environ | |
| def source(script, update=1): | |
| pipe = Popen(". %s; env" % script, stdout=PIPE, shell=True) | |
| data = pipe.communicate()[0] | |
| env = dict((line.split("=", 1) for line in data.splitlines())) | |
| if update: | |
| environ.update(env) |
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
| --- | |
| version: 1 | |
| disable_existing_loggers: False | |
| formatters: | |
| simple: | |
| format: "%(name)-20s%(levelname)-8s%(message)s" | |
| handlers: | |
| console: | |
| class: logging.StreamHandler | |
| level: DEBUG |
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
| OPT_VERBOSE=1 | |
| parse_opt_file() │ | |
| { │ | |
| # parse_opt_file option_name option_value │ | |
| option_name="$1" │ | |
| option_value="$2" |
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 | |
| ########################################################################## | |
| # Copyright: Leon Teale @leonteale http://leonteale.co.uk | |
| ########################################################################## | |
| ########################################################################## | |
| # Program: <APPLICATION DESCRIPTION HERE> | |
| ########################################################################## | |
| VERSION="0.0.1" | |
| PROGNAME="" | |
| AUTHOR="" |
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 logging | |
| root_logger = logging.getLogger() | |
| root_logger.warning(root_logger) | |
| for handler in root_logger.handlers: | |
| root_logger.warning("\t%s", handler) | |
| for name, _logger in logging.Logger.manager.loggerDict.items(): | |
| root_logger.warning("\t\t+%s%s", name, _logger) | |
| if not isinstance(_logger, logging.PlaceHolder): | |
| for handler in _logger.handlers: |