Skip to content

Instantly share code, notes, and snippets.

View RuairiSpain's full-sized avatar
🏠
Working from home

Ruairi O'Donnell RuairiSpain

🏠
Working from home
View GitHub Profile
@RuairiSpain
RuairiSpain / Makefile
Created April 9, 2023 00:16 — forked from thomaspoignant/Makefile
My ultimate Makefile for Golang Projects
GOCMD=go
GOTEST=$(GOCMD) test
GOVET=$(GOCMD) vet
BINARY_NAME=example
VERSION?=0.0.0
SERVICE_PORT?=3000
DOCKER_REGISTRY?= #if set it should finished by /
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true
GREEN := $(shell tput -Txterm setaf 2)
@RuairiSpain
RuairiSpain / App.js
Created August 29, 2021 14:06 — forked from aweary/App.js
import React from "react";
import useMutableReducer from "./useMutableReducer";
const reducer = (draft, action, state) => {
switch (action) {
case "increment":
draft.count++;
break;
case "decrement":
draft.count--;
@RuairiSpain
RuairiSpain / assertions-compareScreenshot.js
Created November 1, 2017 20:30 — forked from richard-flosi/assertions-compareScreenshot.js
Nightwatch with Visual Regression testing
// assertions/compareScreenshot.js
var resemble = require('resemble'),
fs = require('fs');
exports.assertion = function(filename, expected) {
var screenshotPath = 'test/screenshots/',
baselinePath = screenshotPath + 'baseline/' + filename,
resultPath = screenshotPath + 'results/' + filename,
diffPath = screenshotPath + 'diffs/' + filename;
@RuairiSpain
RuairiSpain / assertions-compareScreenshot.js
Created November 1, 2017 20:30 — forked from richard-flosi/assertions-compareScreenshot.js
Nightwatch with Visual Regression testing
// assertions/compareScreenshot.js
var resemble = require('resemble'),
fs = require('fs');
exports.assertion = function(filename, expected) {
var screenshotPath = 'test/screenshots/',
baselinePath = screenshotPath + 'baseline/' + filename,
resultPath = screenshotPath + 'results/' + filename,
diffPath = screenshotPath + 'diffs/' + filename;