Skip to content

Instantly share code, notes, and snippets.

View SanCoder-Q's full-sized avatar
💭
I may be slow to respond.

JmQu SanCoder-Q

💭
I may be slow to respond.
View GitHub Profile
@gcanti
gcanti / optionT.js
Last active May 16, 2021 09:20
Monad transformer example (OptionT), Flow and fp-ts, npm install fp-ts
// @flow
import type { Option } from 'fp-ts/lib/Option'
import type { Lazy } from 'fp-ts/lib/function'
import type { Monad } from 'fp-ts/lib/Monad'
import * as optionT from 'fp-ts/lib/OptionT'
import { array } from 'fp-ts/lib/Array'
// If M<A> is a monad then M<Option<A>> is a monad
@gcanti
gcanti / free.js
Last active December 1, 2020 08:04
Free Monad example, Flow and fp-ts, npm install fp-ts
// @flow
import type { Free } from 'fp-ts/lib/Free'
import { liftF } from 'fp-ts/lib/Free'
import { Identity, identity } from 'fp-ts/lib/Identity'
// Creating set of instructions (AST)
export class Write<A> {
+_tag: 'Write' = 'Write';
@GentlemanHal
GentlemanHal / mvp-monitor.html
Last active June 23, 2020 18:35
Nevergreen MVP monitor page
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
</head>
<body>
<ul id="projects">
</ul>
@npryce
npryce / property-based-testing-tools.md
Last active August 14, 2022 20:34
Property-Based Testing Tools

If you're coming to the Property-Based TDD As If You Meant It Workshop, you will need to bring a laptop with your favourite programming environment, a property-based testing library and, depending on the language, a test framework to run the property-based-tests.

Any other languages or suggestions? Comment below.

.NET (C#, F#, VB)

Python:

function git-revert-batch {
echo "$@" | xargs -n1 git revert --no-commit
}
alias grb='git-revert-batch'
# use like:
# grb ee5c95a 981da8b
# list commits in reverse order, and it's ready to make one neat+tidy revert-commit