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
/** | |
* Create elements and/or an attribute or a text node along a path in xml. | |
* Examples: let root be a xml element | |
* <foo/> | |
* | |
* To create a sub-element bar with an attribute id set to a value '5': | |
* Node n = createXmlPath(root, "/foo/bar/@id", "5"); | |
* | |
* To create a sub-element bar with a text content set to a value '7': | |
* Node n = createXmlPath(root, "/foo/bar/text()", "7); |
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 | |
# the last tag | |
tag=$(git tag | head -1) | |
# number of commits after tag | |
c=$(git rev-list $tag..HEAD | wc -l) | |
c=$((c-0)) | |
# header | |
printf '%-6s' "TAG" && printf '%-4s' "NUM" && printf "COMMIT\n" |
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 sys | |
import re | |
def parse_args(args_def): | |
""" | |
Simple argument parser. args_def is a dict in the following format. | |
The multi property can be used to parse comma separated values. | |
args_def = { | |
"user" : { "required": False, "default": "weblogic" }, |
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
# @author: Tomas Vitvar, https://vitvar.com, [email protected] | |
import sys | |
import re | |
def parse_args(args_def): | |
""" | |
Simple argument parser. args_def is a dict in the following format. | |
The multi property can be used to parse comma separated values. | |