Skip to content

Instantly share code, notes, and snippets.

View Hylke1982's full-sized avatar

Hylke Stapersma Hylke1982

View GitHub Profile
@Hylke1982
Hylke1982 / gist:d0e534a0108529e7d4c631d34cd157d7
Created April 24, 2018 05:52
Extract .tar.gz2 recursive in their directories
for i in **/*.tar.bz2; do # Whitespace-safe and recursive
last=${i##*/}
directory="${i%/*}"
file=${last%%.*}
echo "$directory|$file|$last"
targetDir="$directory/$file"
mkdir -p $targetDir
tar xvjf $i -C $targetDir
done
@Hylke1982
Hylke1982 / extract-ami-id.tf
Created January 29, 2018 09:59
Extract AMI id with terraform
provider "aws" {
region = "eu-west-1"
profile = "---name-of-profile---"
}
data "aws_ami" "resourcename" {
most_recent = true
filter {
name = "name"
@Hylke1982
Hylke1982 / jacaco-maven.xml
Last active October 10, 2017 07:15
Fail a build if the code coverage threshold becomes to low
<!-- JaCoCo -->
<!-- Within maven pom.xml build -> plugins -> plugin -->
<build>
<plugins>
<!-- JaCoCo -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
@Hylke1982
Hylke1982 / redis.json
Last active November 21, 2016 20:53
redis platform gist
{
"id": "redis",
"container": {
"docker": {
"image": "redis",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 6379,
"hostPort": 0,
@Hylke1982
Hylke1982 / platform.json
Last active November 21, 2016 20:54
platform descriptor
{
"phases": [
{
"name": "redis",
"actions": [
{
"type": "container",
"descriptor": "https://gist.githubusercontent.com/Hylke1982/8a553db15d83be879ecbfe84e2f45645/raw/55879f39a3cd5db11dcc8cd042d0031b82eff39a/redis.json",
"version" : 1
}

Keybase proof

I hereby claim:

  • I am hylke1982 on github.
  • I am hylke1982 (https://keybase.io/hylke1982) on keybase.
  • I have a public key whose fingerprint is FF3C 1124 3D01 79A5 9F7D C599 9EE5 22F8 F84E 6CC7

To claim this, I am signing this object:

@Hylke1982
Hylke1982 / GarethApplication.java
Created September 25, 2015 09:35
Start the Gareth application
import org.craftsmenlabs.gareth.api.ExperimentEngine;
import org.craftsmenlabs.gareth.api.ExperimentEngineConfig;
import org.craftsmenlabs.gareth.core.ExperimentEngineConfigImpl;
import org.craftsmenlabs.gareth.core.ExperimentEngineImpl;
import org.craftsmenlabs.gareth.examples.definition.SampleDefinition;
public class ExampleApplication {
public static void main(final String[] args) {
@Hylke1982
Hylke1982 / HotelDefinition.java
Last active September 25, 2015 09:33
Hotel definition Gareth
import org.craftsmenlabs.gareth.api.annotation.Assume;
import org.craftsmenlabs.gareth.api.annotation.Baseline;
import org.craftsmenlabs.gareth.api.annotation.Time;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
public class ExperimentDefinition {
@Baseline("Get the current number of discounted rooms booked.")
@Hylke1982
Hylke1982 / hotel.experiment
Created September 25, 2015 09:28
Experiment example Gareth
Experiment: I want to validate that by showing the discounted rooms first, there will be an increase in booked rooms.
Baseline: Get the current number of discounted rooms booked.
Assume: There will be an increase in bookings for discounted rooms of 25 per week.
Time: 1 week
Success: Send email to the whole team with congratulations
Failure: Send an email to the Product Owner.
@Hylke1982
Hylke1982 / gist:4686f9aa20c59d4e202f
Created September 25, 2015 09:27
Story example Gareth
As the owner of the hotel booking site,
I want the users to see the discounted rooms first,
So that they will be booked first.