Skip to content

Instantly share code, notes, and snippets.

View meddle0x53's full-sized avatar
🏠
Working from home

meddle meddle0x53

🏠
Working from home
View GitHub Profile
@meddle0x53
meddle0x53 / flatten.ex
Created February 5, 2018 11:21
Simpler flatten
def flatten([head | tail], result) when is_list(head), do: flatten(head, flatten(tail, result))
def flatten([head | tail], result), do: [head | flatten(tail, result)]
def flatten([], result), do: result
@meddle0x53
meddle0x53 / functions_all_the_way.exs
Last active January 14, 2018 14:16
Church booleans and numbers in Elixir
#####################
# Basic combinators #
#####################
id = fn(x) -> x end
kestrel = fn (x) -> fn (y) -> x end end
starling =
fn (x) ->
#!/bin/bash
/usr/bin/rsync -r -t -p -o -g -x --delete --size-only -l -s --exclude-from=/home/guda/bin/ssd_backup_exclude.txt /home/guda/ /home/guda/external/backup