Skip to content

Instantly share code, notes, and snippets.

View BlainMaguire's full-sized avatar

Blain Maguire BlainMaguire

View GitHub Profile
<?php
/**
* Copyright (c) 2017-2019 Mastercard
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@BlainMaguire
BlainMaguire / accessor.groovy
Created November 21, 2017 15:30
RestAsssured Groovy Example
package ie.aib.test.automation
import com.jayway.restassured.RestAssured
import org.librucha.ServerApp
import org.springframework.beans.factory.annotation.Value
import org.springframework.boot.test.SpringApplicationConfiguration
import org.springframework.boot.test.WebIntegrationTest
import spock.lang.Specification
import spock.lang.Unroll
data:text/html,<body style=margin:0><canvas id=c><script>var a,d=document,e=c.getContext("2d");c.width=innerWidth;c.height=innerHeight;e.lineWidth=9;e.lineJoin=e.lineCap="round";d.onmousedown=function(b){e.beginPath();a=!e.moveTo(b.clientX,b.clientY)};d.onmousemove=function(b){return a&&(e.lineTo(b.clientX,b.clientY),e.stroke())};d.onmouseup=function(){return a=0};d.onkeyup=function(b){switch(b.keyCode){case 32:e.strokeStyle=prompt("Enter new colour",e.strokeStyle);case 189:e.lineWidth--;break;case 187:e.lineWidth++}};</script>