Skip to content

Instantly share code, notes, and snippets.

@pando85
pando85 / compose.py
Created August 17, 2017 09:23
compose functions in python like haskell
class Composable(object):
''' A function decorator that allows you to use Haskell style dot notation for function composition '''
fns = {}
def __init__(self, fn):
self.fn = fn
Composable.fns[fn.__name__] = fn
def __call__(self, *args, **kwargs):
''' simply calls the function '''
@pando85
pando85 / rsyslog_elasticsearch_docker.conf
Last active February 24, 2021 03:37
rsyslog configuration omelasticsearch with docker
#Ignore logs kibana
#:syslogtag, isequal, "kibana:" stop
#Ignore daemon severity
#daemon.* stop
#Ignore facility cron
#cron.* stop
#Ignore logs elasticsearch