Skip to content

Instantly share code, notes, and snippets.

@FaustXVI
FaustXVI / tcrdd.sh
Created December 14, 2018 13:57
TCR merged with TDD
#!/usr/bin/env bash
BRANCH=origin/master
TEST_KEYWORD="Expect"
function runTest() {
./node_modules/.bin/elm-test
}
# look for a new test in a + line in the diff
function testJustAdded(){
#!/usr/bin/env bash
function test() {
runhaskell FiboSpecs.hs
}
function commit() {
git add .
git commit --squash=lastRed
}
@FaustXVI
FaustXVI / red.sh
Created November 13, 2018 15:46
Red script for tcr
#!/usr/bin/env bash
function test() {
runhaskell FiboSpecs.hs
}
function commit() {
git add .
git commit
git tag -f lastRed
}
"use strict";
import {should} from "chai";
should();
function fizzbuzz(n) {
const rules = [{multiple: 3, word: "fizz"}, {multiple: 5, word: "buzz"}];
return rules.filter(({multiple, _}) => n % multiple === 0)
.map(({_, word}) => word)
.reduce((a, b) => a + b, "")
:loop
timeout 120
git reset --hard -q
git clean -f -q .
goto :loop
import Data.So
fizz : Integer -> Bool
fizz n = (n `mod` 3) == 0
buzz : Integer -> Bool
buzz n = (n `mod` 5) == 0
data FizzBuzz : (n: Integer) -> Type where
Fizz : {auto fizz : So (fizz n)} -> FizzBuzz n
@FaustXVI
FaustXVI / reset.sh
Last active November 10, 2017 09:14
#!/usr/bin/env sh
while :
do
sleep 120
git reset --hard -q
git clean -f -q .
done