This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # chkconfig: 35 68 38 | |
| # description: Starts heka with supervisord | |
| PATH=/usr/local/bin:/usr/local/sbin:$PATH | |
| NAME=hekad | |
| LOCK_FILE="/var/lock/subsys/${NAME}" | |
| SUPERVISORCTL="/usr/local/bin/supervisorctl" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -P INPUT DROP | |
| -P FORWARD ACCEPT | |
| -P OUTPUT DROP | |
| -A INPUT -i lo -m comment --comment "000 allow inbound lo" -j ACCEPT | |
| -A INPUT -s 127.0.0.0/8 -i lo -p tcp -m comment --comment "000 reject local traffic inbound on loopback" -j REJECT --reject-with icmp-port-unreachable | |
| -A INPUT -p icmp -m comment --comment "001 allow inbound icmp" -j ACCEPT | |
| -A INPUT -i eth0 -p udp -m multiport --sports 53 -m multiport --dports 1025:65535 -m comment --comment "002 allow inbound udp dns eth0" -j ACCEPT | |
| -A INPUT -i eth1 -p udp -m multiport --sports 1025:65535 -m multiport --dports 53 -m comment --comment "002 allow inbound udp dns eth1" -j ACCEPT | |
| -A INPUT -i eth0 -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m multiport --sports 53 -m multiport --dports 1025:65535 -m comment --comment "003 allow tcp inbound dns eth0" -j ACCEPT | |
| -A INPUT -i eth1 -p tcp -m multiport --sports 1025:65535 -m multiport --dports 53 -m comment --comment "003 allow tcp inbound dns eth1" -j ACCEPT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo " ---- Proxy hosts are --- " | |
| host proxy.service.consul | |
| echo | |
| echo " --- Unset proxy environment variables --- " | |
| unset HTTP_PROXY | |
| unset HTTPS_PROXY | |
| unset http_proxy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # dd hardrive from remote host to an nfs drive | |
| WHERE=$1 | |
| WHO=elim | |
| DISK=sda | |
| function usage() { | |
| echo "Usage: $0 [hostname]" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Parse out ipv4 netblocks | |
| set -eu | |
| # If I'm a mac host use sed -E otherwise use sed -r like a normal person | |
| if [[ $OSTYPE = "darwin"* ]]; then | |
| SED='sed -E' | |
| else | |
| SED='sed -r' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import nntplib | |
| import re | |
| import sys | |
| usage = """./nntp-stats [nntp-group-name]""" | |
| if len(sys.argv) < 2: | |
| print usage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| May 26 19:47:33 2016 (13059) Traceback (most recent call last): | |
| File "/usr/lib/mailman/Mailman/Queue/NewsRunner.py", line 87, in _dispose | |
| conn.quit() | |
| File "/usr/lib64/python2.6/nntplib.py", line 608, in quit | |
| resp = self.shortcmd('QUIT') | |
| File "/usr/lib64/python2.6/nntplib.py", line 267, in shortcmd | |
| self.putcmd(line) | |
| File "/usr/lib64/python2.6/nntplib.py", line 205, in putcmd | |
| self.putline(line) | |
| File "/usr/lib64/python2.6/nntplib.py", line 200, in putline |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Generated by confd {{datetime}} | |
| # Ensure that unknown users are purged | |
| resources { 'user': | |
| purge => true, | |
| noop => true, # noop for now | |
| } | |
| # make sure some default users don't get killed | |
| users { 'default-ec2-user': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| consul "github.com/hashicorp/consul/api" | |
| "log" | |
| ) | |
| type ConsulClient struct { | |
| client *consul.KV | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Generated by confd {{datetime}} | |
| --- | |
| {{ $serial := get "/serial" }}# Serial: {{ $serial.Value }} | |
| {{ range $users := ls (print "/global-admins/" $serial.Value) }} | |
| {{ $uid := get (print "/global-admins/" $serial.Value "/" $users "/uid") }} | |
| {{ range $keys := getvs (print "/global-admins/" $serial.Value "/" $users "/sshpubkey*") }} | |
| - user: {{ $users }} | |
| uid: {{ $uid.Value }} | |
| keys: |