This file contains 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 groovy.json.JsonSlurper | |
def jsonSlurper = new JsonSlurper() | |
def object = jsonSlurper.parseText( | |
'{"count":20,"teams":[{"id":322,"name":"Hull City FC","shortName":"Hull","squadMarketValue":null,"crestUrl":"http://upload.wikimedia.org/wikipedia/de/a/a9/Hull_City_AFC.svg"},{"id":338,"name":"Leicester City FC","shortName":"Foxes","squadMarketValue":null,"crestUrl":"http://upload.wikimedia.org/wikipedia/en/6/63/Leicester02.png"},{"id":340,"name":"Southampton FC","shortName":"Southampton","squadMarketValue":null,"crestUrl":"http://upload.wikimedia.org/wikipedia/de/c/c9/FC_Southampton.svg"}]}' | |
) | |
def allTeamNames = object.teams.name | |
def namesWithCity = object.teams.findAll {it.name =~ /City/}.name |
This file contains 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
# to see commit logs with short commit hash | |
git log --pretty=reference | |
# to pick and squash multiple commits | |
git rebase --interactive [commit-hash] | |
# nice explanation available in https://www.internalpointers.com/post/squash-commits-into-one-git | |
# sparse checkout set root .gitignore and followed but any folder seperated by space | |
git sparse-checkout set //.gitignore |
This file contains 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
// [email protected] - start | |
var util = require('util') | |
var levels = ['trace', 'debug', 'info', 'warn', 'error', 'fatal'] | |
var noop = function () {} | |
var getLogger = function (opts) { | |
opts = opts || {} | |
opts.level = opts.level || 'info' | |
var logger = {} |
This file contains 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
https://stackoverflow.com/questions/31620967/any-way-to-specify-a-fileset-as-command-line-parameter |
This file contains 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
var BigNumber, | |
isNumeric = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, | |
mathceil = Math.ceil, | |
mathfloor = Math.floor, | |
notBool = ' not a boolean or binary digit', | |
roundingMode = 'rounding mode', | |
tooManyDigits = 'number type has more than 15 significant digits', | |
ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_', | |
BASE = 1e14, | |
LOG_BASE = 14, |
This file contains 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
public void step_method(String arg1, DataTable arg2) throws Throwable { | |
// Write code here that turns the phrase above into concrete actions | |
// For automatic transformation, change DataTable to one of | |
// List<YourType>, List<List<E>>, List<Map<K,V>> or Map<K,V>. | |
// E,K,V must be a scalar (String, Integer, Date, enum etc) | |
} | |
pass other steps as parameter to constructor of step class |
This file contains 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
//table/tbody/tr[ | |
td[count(//table/thead/tr[1]/th[.="column2"]/preceding-sibling::th)+1]/./a[contains(text(),"value2")] | |
and | |
td[count(//table/thead/tr[1]/th[.="column3"]/preceding-sibling::th)+1]/./a[contains(text(),"value3")] | |
] | |
/td[count(//table/thead/tr[1]/th[.="column1"]/preceding-sibling::th)+1] |
This file contains 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
-P - perl type regex syntax | |
-A -B - context lines | |
--- very useful | |
http://askubuntu.com/questions/53071/how-to-grep-for-tabs-without-using-literal-tabs-and-why-does-t-not-work |
This file contains 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
excel command expansation f9(windows) or cmd+=(mac) | |
http://www.get-digital-help.com/2011/02/09/concatenate-a-cell-range-without-vba-in-excel/ |
This file contains 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
[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\b | |
https://regex101.com/ | |
/[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\b/ | |
[A-Za-z0-9._%-]+ match a single character present in the list below | |
Quantifier: + Between one and unlimited times, as many times as possible, giving back as needed [greedy] | |
A-Z a single character in the range between A and Z (case sensitive) | |
a-z a single character in the range between a and z (case sensitive) | |
0-9 a single character in the range between 0 and 9 |
NewerOlder