Skip to content

Instantly share code, notes, and snippets.

View Riggs333's full-sized avatar

Thomas Traude Riggs333

View GitHub Profile
import pytest
class Hat:
def __init__(self, color: str) -> None:
self.hat_color = color
def suits(self, style: str):
return self.hat_color == style
def generate_guess(candidate: str, count: int):
num = ""
v = ""
modifier = ""
if count == 0:
num = "no"
v = "are"
modifier = "s"
elif count == 1:
num = "1"
@Riggs333
Riggs333 / tennis1.py
Created April 22, 2022 08:45
Variant 1 from Tennis Refactoring Kata
class TennisGame1:
def __init__(self, player1Name, player2Name):
self.player1Name = player1Name
self.player2Name = player2Name
self.p1points = 0
self.p2points = 0
def won_point(self, playerName):
if playerName == self.player1Name:
@Riggs333
Riggs333 / swk-ruhr-2018-02-DO.adoc
Last active February 23, 2018 14:55
Protokoll Softwerkskammer Ruhrgebiet, Lean Coffee , Dortmund, 21.02.2018

Treffen der Softwerkskammer Ruhrgebiet in Dortmund am 21.02.2018

Ursprünglich als World Cafe geplant entschieden wir uns aufgrund der Teilnehmerzahl für das Lean Coffee Format.

Über folgende Themen haben wir gesprochen:

@Riggs333
Riggs333 / sw-dev-today.adoc
Last active April 19, 2020 05:26
Software Development Today / Body of Knowledge

Software Development Today

An unordered opinionated collection of buzzwords that I consider relevant to today’s professional software development. ;-) Things you might need to know and to do.

import org.junit.Test;
import java.text.MessageFormat;
import static org.assertj.core.api.Assertions.assertThat;
public class ChoiceFormatTest {
@Test
public void noApples() {
int count = 0;
assertThat(getMessage(count)).isEqualTo("I got no apples");
@Riggs333
Riggs333 / completion-for-gradle.md
Created February 19, 2016 21:24 — forked from nolanlawson/completion-for-gradle.md
Gradle tab completion for Bash. Works on both Mac and Linux.

Gradle tab completion script for Bash

A tab completion script that works for Bash. Relies on the BSD md5 command on Mac and md5sum on Linux, so as long as you have one of those two commands, this should work.

Usage

$ gradle [TAB]
repositories { mavenCentral() }
configurations { sshAntTask }
dependencies { sshAntTask 'org.apache.ant:ant-jsch:1.9.2' }
ant.taskdef(
name: 'scp',
classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp',
classpath: configurations.sshAntTask.asPath)
#!/bin/bash
#set -x
doInstall() {
ECLIPSELOCATION=`ls $LOCATION/plugins/org.eclipse.equinox.launcher_*`
$JAVA_HOME/bin/java -jar $ECLIPSELOCATION -nosplash -application org.eclipse.equinox.p2.director \
-metadataRepository "$2" \
-artifactRepository "$2" \
-destination $LOCATION \
-installIU "$1"