Skip to content

Instantly share code, notes, and snippets.

@kimor79
kimor79 / gist:c2da3652ad747c999842
Created February 10, 2016 17:54
ssh tunnelling
# The host you are jumping through
Host jump.host
DynamicForward 127.0.0.1:1234
# The hosts you want to ssh to
Host desired.host
ProxyCommand nc -x 127.0.0.1:1234 %h %p
@kimor79
kimor79 / 00
Last active August 29, 2015 14:06
Cross-module variables and hiera
I'm using puppet 3 with roles (mostly), profiles, and hiera. In one module
(profiles::collectd) I use hiera_array to get the values for pdxcat/collectd's
module's tcpconns_localports variable. When I define all of the values I want
in hiera, everything is fine. However, I would like to also define values in a
profile's class rather than having to define it in every role's yaml file that
includes said profile. I haven't been able to get that to work yet.
@kimor79
kimor79 / email
Created June 4, 2014 15:52
openldap plugin collectd original email
Hi,
I've managed to cobble together an openldap plugin to monitor the various
counters from an openldap server. This is based mainly off of the apache and
mysql plugins. I am not a c programmer so apologies if the code is horrible.
Two things I need help on are:
1) Initializing the global ldap options. I don't know where this would go.
@kimor79
kimor79 / gist:5503747
Created May 2, 2013 17:14
Testing apr methods and IP. Compiled on FreeBSD 9.0-RELEASE with: cc -I /usr/local/include/ -I /usr/local/include/apr-1/ -L /usr/local/lib -lapr-1
#include "stdio.h"
#include "stdlib.h"
#include "apr.h"
#include "apr_network_io.h"
#include "apr_strings.h"
#include "apr_tables.h"
int main(void) {