Skip to content

Instantly share code, notes, and snippets.


Richard Seldon arcseldon

View GitHub Profile
DrBoolean / free-er2.js
Created Feb 27, 2016
Free(er) Monads Pt2
View free-er2.js
const daggy = require('daggy')
const Task = require('data.task')
const _ = require('lodash')
const kleisli_comp = (f, g) => x => f(x).chain(g)
const compose = (f, g) => x => f(g(x))
const id = x => x
const Free = daggy.taggedSum({Impure: ['x', 'f'], Pure: ['x']})
const {Impure, Pure} = Free
DrBoolean / coyo_uses.js
Created Feb 26, 2016
Coyoneda Uses in JS
View coyo_uses.js
const daggy = require('daggy')
const compose = (f, g) => x => f(g(x))
const id = x => x
//===============Define Coyoneda=========
const Coyoneda = daggy.tagged('x', 'f') = function(f) {
return Coyoneda(this.x, compose(f, this.f))
raine / ramda
Last active May 4, 2020
Browse Ramda documentation in Terminal
View ramda
#!/usr/bin/env bash
# Browse Ramda documentation in Terminal
# Requires jq and a tool such as fzf or peco for interactive filtering
json=$(curl -s $LATEST)
functions=$(echo "$json" | jq -r '.[] | if .sig and (.sig | length > 0) then .name + " :: " + .sig else .name end')
staltz /
Last active Dec 8, 2021
The introduction to Reactive Programming you've been missing
mattratleph /
Last active Dec 1, 2021 — forked from roothybrid7/
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)
:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
View cucumbertables.vim
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a
function! s:align()
let p = '^\s*|\s.*\s|\s*$'
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g'))
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*'))
normal! 0
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))