os.listdir(path)
os.walk(path)
with open("data.yaml", 'r') as stream:
data_loaded = yaml.load(stream)
set -g prefix C-a | |
set -g history-limit 200000 | |
# Unbind crap | |
unbind % | |
unbind M-1 | |
unbind M-2 | |
unbind M-3 | |
unbind M-4 | |
unbind M-5 |
set modeline | |
set modelines=1 | |
set autoindent | |
set softtabstop=2 | |
set tabstop=2 | |
set shiftwidth=2 | |
set paste | |
set expandtab | |
set showmatch |
# blackhole all packets destined for 192.168.2.1 | |
ip route add blackhole 192.168.2.1 | |
# to delete the same route, replace add with del | |
ip route del blackhole 192.168.2.1 | |
#Depending on your use case, an unreachable route may work better, as it returns ICMP-unreachable instead of discarding the packets, although they tend to have the same effect. | |
ip route add unreachable 192.168.2.1 |
#!/usr/bin/env ruby | |
require 'pry' | |
require 'puppet_forge' | |
PuppetForge.user_agent = 'puppetfile/0.9.0' | |
Module_Regex = Regexp.new("mod ['\"]([a-z0-9_]+\/[a-z0-9_]+)['\"](, ['\"](\\d\.\\d\.\\d)['\"])?", Regexp::IGNORECASE) | |
def cleanname(name) |
{ | |
"kafka": { | |
"servers": [ | |
"kafka1:9092", | |
"kafka2:9092" | |
], | |
"topic": "sensu" | |
} | |
} |
lvcreate -l 100%FREE -n lv_elasticsearch vg_elasticsearch /dev/md1 | |
lvcreate -L 1T -n lv_cache vg_elasticsearch /dev/nvme0n1 | |
lvcreate -L 1G -n lv_cache_meta vg_elasticsearch /dev/nvme0n1 | |
lvconvert --type cache-pool --chunksize 256K --cachemode writeback --poolmetadata vg_elasticsearch/lv_cache_meta vg_elasticsearch/lv_cache | |
lvconvert --type cache --cachepool vg_elasticsearch/lv_cache vg_elasticsearch/lv_elasticsearch | |
Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups
command.
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe
Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.
http://web.archive.org/web/20090918202746/http://tothink.com/mnemonic/wordlist.html
oc project openshift-logging
oc rsh fluentd-xxxxx
curl -tls1.2 -s -k -vvv --cert /var/run/ocp-collector/secrets/fluentd/tls.crt --key /var/run/ocp-collector/secrets/fluentd/tls.key https://elasticsearch.openshift-logging.svc.cluster.local:9200
oc exec -n openshift-logging elasticsearch-cdm-xv88c21d-1-787549f9d4-vfbkp -- curl -tls1.2 -s -k --cert /etc/elasticsearch/secret/admin-cert --key /etc/elasticsearch/secret/admin-key http://localhost:9200