Skip to content

Instantly share code, notes, and snippets.

View dataduke's full-sized avatar

Benjamin Nothdurft dataduke

View GitHub Profile
@dataduke
dataduke / Maps.java
Last active October 11, 2023 19:41
Flatten a nested Map
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class Maps {
public static Map<String, Object> asFlattendMap(Map<String, Object> map) {
return map.entrySet().stream()
.flatMap(Maps::flatten)
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
@dataduke
dataduke / Dockerfile for XLT TestSuite
Last active January 24, 2019 14:33
XLT TestSuite in Docker
FROM ubuntu:16.04
################
# Setup System #
################
# Add sources to mirror list
RUN echo "deb http://archive.ubuntu.com/ubuntu xenial main universe\n" > /etc/apt/sources.list && \
echo "deb http://archive.ubuntu.com/ubuntu xenial-updates main universe\n" >> /etc/apt/sources.list && \
@dataduke
dataduke / README.md
Created March 24, 2016 01:12 — forked from gesellix/README.md
Docker Birthday #3
@dataduke
dataduke / umlaute.ahk
Last active January 15, 2016 09:30
AutoHotkey script to type umlaute with other keyboards
#a::
!a::
Send, ä
Return
!+a::
Send, Ä
Return
#o::
!o::
Send, ö
@dataduke
dataduke / commit-msg
Created June 23, 2015 10:15
git hook for checking a commit message
#!/bin/sh
# move to /.git/hooks/commit-msg
#
# check for regex pattern
PATTERN="[A-Z]{2,}_[0-9]{1,6}"
head -n1 "$1" |grep -qsE ${PATTERN} || {
echo >&2 Include pattern in your commit message. Example: ABCD_1234.
exit 1
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
.
|-- build.properties              # XLT java build properties
|-- build.xml                     # XLT java build configuration
|-- global_testdata.properties    # global testdata properties
|-- scripts
|   |-- modules.helper            # basic scripts
|   |-- modules.pages             # scripts for specific pages
|   |   |-- account               # scripts on Account pages
|   |   |-- cart                  # scripts on Cart page