Skip to content

Instantly share code, notes, and snippets.

@bartv
bartv / main
Last active September 6, 2017 18:34
minimal setup
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = vm1.training1.inmanta.eu
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $myhostname
mydestination = $myhostname, localhost.vm1.training1.inmanta.eu, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
Feb 12 09:04:52 mon-1 java[12294]: Feb 12, 2015 9:04:52 AM flens.core.util.AbstractPlugin err
Feb 12 09:04:52 mon-1 java[12294]: SEVERE: multi valued record not exanded:Record [type=null tags=[], values={plugin_instance=dev-shm, type_instance=free, plugin=df, values=[4.186415104E9], interval=10737418240, time=1423731882222, source=mon-1, type=df_complex}]
Feb 12 09:04:52 mon-1 java[12294]: Feb 12, 2015 9:04:52 AM flens.core.util.AbstractPlugin err
Feb 12 09:04:52 mon-1 java[12294]: SEVERE: multi valued record not exanded:Record [type=null tags=[], values={plugin_instance=dev-shm, type_instance=reserved, plugin=df, values=[0.0], interval=10737418240, time=1423731882222, source=mon-1, type=df_complex}]
Feb 12 09:04:52 mon-1 java[12294]: Feb 12, 2015 9:04:52 AM flens.core.util.AbstractPlugin err
Feb 12 09:04:52 mon-1 java[12294]: SEVERE: multi valued record not exanded:Record [type=null tags=[], values={plugin_instance=dev-shm, type_instance=used, plugin=df, values=[0.0], interval=10737418240, time=1423731882222
@bartv
bartv / auth.py
Last active August 29, 2015 14:05
#!/usr/bin/env python
import httplib, socket, sys, os
if len(sys.argv) != 2:
print("The first argument should be the path of the file with the user credentials")
sys.exit(2)
if not os.path.exists(sys.argv[1]):
print("Unable to read the credential file")
\lstdefinelanguage{IMP}{
morekeywords={typedef, implementation, as, implement, is, end, select, entity, matching, self, index, extends,include, for, using, enum, with, parent},
morecomment=[l]{\#},
morestring=[b]",
breaklines = true,
}
\usepackage{microtype}
\ifluatex
\usepackage{fontspec}
\newfontfeature{Microtype}{protrusion=default;expansion=default;}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont[Numbers=OldStyle]{Linux Libertine O}
\setsansfont[UprightFont = *-Regular,
ItalicFont = *-RegularIt,
make all-recursive
Making all in contrib
make[2]: Nothing to be done for `all'.
Making all in hardware
Making all in agilent-dmm
make[3]: Nothing to be done for `all'.
Making all in alsa
make[3]: Nothing to be done for `all'.
Making all in appa-55ii
make[3]: Nothing to be done for `all'.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
make all-recursive
Making all in contrib
make[2]: Nothing to be done for `all'.
Making all in hardware
Making all in agilent-dmm
make[3]: Nothing to be done for `all'.
Making all in alsa
make[3]: Nothing to be done for `all'.
Making all in appa-55ii
make[3]: Nothing to be done for `all'.
from Imp.export import dependency_manager
from Imp.resources import Resource
@dependency_manager
def use_relations(config_model, resources):
for _id, resource in resources.items():
res_class = resource.model.__class__
if resource.model.__module__ == "std" and res_class.__name__ == "File":
model = resource.model
host = std::Host(name = "tripel", os = "linux")
std::File(host = host, path = "/tmp/dir/test", owner = "bart", group = "bart", mode = 644, content =
"test", requires = dir)
dir = std::Directory(host = host, path = "/tmp/dir", owner = "bart", group = "bart", mode = 755)