Skip to content

Instantly share code, notes, and snippets.

@mrkaspa
mrkaspa / pre-commit
Created September 16, 2016 21:59 — forked from matteosister/pre-commit
pre-commit hook for elixir
#!/bin/sh
# credo checks before commit
mix credo
CREDO_RES=$?
if [ $CREDO_RES -ne 0 ]
then
exit $CREDO_RES
fi
@mrkaspa
mrkaspa / y-combinator.go
Last active August 29, 2015 14:27 — forked from wancw/y-combinator.go
Y combinator in Go, runable example: http://play.golang.org/p/xVHw0zoaWX
package main
import "fmt"
type (
tF func(int) int
tRF func(tF) tF
tX func(tX) tF
)
@mrkaspa
mrkaspa / onchange.sh
Last active August 29, 2015 14:25 — forked from evgenius/onchange.sh
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <[email protected]>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of