Skip to content

Instantly share code, notes, and snippets.

View crashdump's full-sized avatar
🖖

Adrien P. crashdump

🖖
View GitHub Profile
@crashdump
crashdump / logstash.sh
Created October 26, 2012 09:27 — forked from optikfluffel/logstash.conf
Logstash Init script
#! /bin/sh
### BEGIN INIT INFO
# Provides: logstash-server
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
@crashdump
crashdump / logstash.conf
Created October 26, 2012 10:19
Logstash configuration
# This is a configuration for Logstash acting like that:
#
## INPUT
# - Syslog server listening on (custom >1024 as we don't run it as root) UDP/10514
# - GELF event listening on (default) UDP/12201
#
## FILTERING
# - Nothing here yet
#
## OUTPUT
@crashdump
crashdump / exim-listener.conf
Created November 28, 2012 10:56
Baruwa : Exim config "exim-listener.conf"
.include /usr/local/etc/exim/macros.conf
hide pgsql_servers = PGSQL_SERVERS
#primary_hostname =
domainlist local_domains = @ : localhost : localhost.localdomain
domainlist relay_sql_domains = RELAY_SQL_DOMAINS
domainlist relay_sql_smtp_domains = SMTP_SQL_DOMAINS
domainlist relay_sql_lmtp_domains = LMTP_SQL_DOMAINS
domainlist ldap_domains = LDAP_DOMAINS
domainlist smtp_callback_domains = SMTP_CALLBACK_DOMAINS
domainlist whitelisted_domains = WHITELISTED_DOMAINS
@crashdump
crashdump / zabbix-yahoo_weather.pl
Last active December 17, 2015 16:49
weather.yahooapis.com -> zabbix
#!/usr/bin/perl
use strict;
use XML::Simple;
use WWW::Curl::Easy;
my $WOEID = 12215; # Yahoo! "Where On Earth Identifier" for Bedford, UK
my $ZABBIX_SENDER = "/usr/bin/zabbix_sender";
my $ZABBIX_SERVER = "172.24.1.36";
@crashdump
crashdump / check-dnsrbl.py
Last active December 17, 2015 22:49
Check a hostname (or an ip) against a list of dnsrbls. * dns roundrobin aware: If the domain have multiples ips, then the check is ran for all of them. I've also provided a template if you want to use it with Zabbix as an External Check: - Configure ExternalScripts variable in zabbix_server.conf - Put the script (check-dnsrbl.py and check-dnsrbl…
#!/usr/bin/python
# -*- coding: utf-8 -*-
import time, socket, sys, argparse
from multiprocessing.pool import ThreadPool
DNSRBL_LIST='/etc/zabbix/externalscripts/check-dnsrbl.txt'
result_list = []
def reverse_host(host, separator='.'):
@crashdump
crashdump / epilepsy.c
Created October 9, 2013 07:55
I use this on a monitoring screen to get my attention: It make the screen flash multiples times (X11)
#include <unistd.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <strings.h>
#include <memory.h>
#include <stdlib.h>
#include <stdio.h>
/*
* 2013/10/09. Adrien Pujol.
@crashdump
crashdump / .vimrc
Created November 26, 2013 10:05
vimrc /w vundle
" Install me
" git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
" wget -O ~/.vimrc https://raw.github.com/crashdump/tasty-debian/master/files/vim/vimrc
" vim +BundleInstall +qall
set nocompatible
filetype off
syntax on
#!/usr/bin/python
# -*- coding: utf-8 -*-
# set expandtab ts=4 sw=4 ai
import os, sys
import time
import random
import string
import prowlpy
from twisted.python import log
@crashdump
crashdump / consul-ssh-configurator.py
Last active July 5, 2016 17:54 — forked from mattupstate/consul-ssh-configurator.py
A script to generate an SSH config from Consul's HTTP API
#!/usr/bin/env python3
"""
Renders a partial SSH configuration file from Nodes and Services
located in a specified Consul catalog and then merges other partial
config files into the main ~/.ssh/config file. The Consul based SSH
config follows a convention for the SSH host::
Host <prefix>_<consul-cluster-name>_<node-name>
User <ssh-user>
Hostname <consul-node-address>
@crashdump
crashdump / keybase.md
Last active June 5, 2019 19:47
Keybase Proof

Keybase proof

I hereby claim:

  • I am crashdump on github.
  • I am adrienp (https://keybase.io/adrienp) on keybase.
  • I have a public key ASBN0dRpWA_POCJKLSZuueSZiYT4NbHMS9FQgHQ9oLWoHgo

To claim this, I am signing this object: