Skip to content

Instantly share code, notes, and snippets.

View crashdump's full-sized avatar
🖖

Adrien P. crashdump

🖖
View GitHub Profile
@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 / 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.