Skip to content

Instantly share code, notes, and snippets.

View ClausPolanka's full-sized avatar

Claus Polanka ClausPolanka

View GitHub Profile
import org.junit.Assert;
import org.junit.Test;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
public class WordCounterTest {
@ClausPolanka
ClausPolanka / GithubPRFactory.kt
Created July 29, 2020 20:08
Integration (IOSP) shows logic on SLA how to open Pull Requests
fun open_pull_requests(candidate: Candidate, pairingPartner: List<PairingPartner>) {
val branches = get_branches_for(candidate)
val prs = branches.pull_requests_for(pairingPartner)
prs.forEach { githubPullRequestsRepo.open_pull_request(it) }
}
@ClausPolanka
ClausPolanka / build_maven_release.sh
Created July 11, 2020 22:32
That's how i built a release via maven for my github-pr-factory project
in master: mvn release:branch -B -DbranchName=release/1.0.x -DreleaseVersion=1.0.0 -DdevelopmentVersion=1.1.0-SNAPSHOT
in release-branch: mvn release:prepare -B -Dtag=github-pr-factory-1.0.0 -DreleaseVersion=1.0.0
in master: mvn release:perform
@ClausPolanka
ClausPolanka / StringCalculator.java
Created May 9, 2015 12:32
FlowDesign EBC impl via Java 8
package stringcalculator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;
public class StringCalculator {
@ClausPolanka
ClausPolanka / FlowDesign.scala
Last active August 29, 2015 14:20
Scala FlowDesign
import scala.collection.mutable.MutableList
class A {
val onResult: MutableList[Function1[Int, Unit]] = MutableList.empty
def process(x: Int) = {
onResult.foreach(f => f(x))
}
}
using System;
using System.Collections.Generic;
using System.Linq;
namespace domain
{
public class Diamond_Builder
{
private const string NEW_LINE = "
";
@ClausPolanka
ClausPolanka / index.html
Created March 24, 2014 20:47
Tuts+ jQuery in 30 days Contact Form example.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Effects</title>
<style>
body {
width: 600px;
margin: auto;
<html>
<head>
<title>Schoki</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<a class="menu" href="#">Home</a>
<a class="menu" href="#">Services</a>
<a class="menu" href="#">About</a>
<html>
<head>
<title>Schoki</title>
</head>
<body>
<a class="menu" href="#">Home</a>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.js"></script>
class WrapperV2
{
public static string Wrap(string text, int zeilenlänge)
{
return Wrap("", text, zeilenlänge);
}
static string Wrap(string umgebrochen, string text, int zeilenlänge)
{
if (text == "") return umgebrochen;