Skip to content

Instantly share code, notes, and snippets.

View jdreaver's full-sized avatar

David Reaver jdreaver

View GitHub Profile
ghci> let manyThen x end = choice [(:) <$> x <*> manyThen x end, const [] <$> end]
ghci> parseOnly (manyThen anyChar (char ':')) (pack "he:llo:")
Right "he:llo"
@derekpowell
derekpowell / cbrm.R
Last active May 22, 2023 20:36
Wrapper for brm() that supports caching of BRMS models
cbrm <- function(formula,
data,
family = gaussian(),
prior = NULL,
autocor = NULL,
cov_ranef = NULL,
sample_prior = c("no", "yes", "only"),
sparse = FALSE,
knots = NULL,
stan_funs = NULL,
@Gunni
Gunni / nftables.conf
Created February 26, 2020 23:12
Example nftables.conf for a wireguard "server"
table inet filter {
chain inbound {
type filter hook input priority 0
policy drop
ct state invalid counter drop
ct state { established, related } counter accept
ip protocol icmp counter accept
ip6 nexthdr ipv6-icmp counter accept