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
# See git log --help for details | |
git log --reverse --after='Jan 19' --format='format:%h %an' |
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 | |
# Check all keytabs in the current directory | |
for kt in *.keytab | |
do | |
pr=$(klist -k $kt | tail -1 | awk '{print $2}') | |
echo -n "${kt}: " | |
kinit -kt $kt $pr > /dev/null 2>&1 && echo OK || echo FAILED | |
done |
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
import rpm | |
for pkg in rpm.TransactionSet().dbMatch('provides', 'java'): | |
print '%s:%s:%s:%s' % (pkg['name'], pkg['version'], pkg['release'], pkg['epoch']) |
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
import crypt | |
crypt.crypt('my-secret-word', '$1$someSalt$') |
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
sum(increase(kafka_producer_topic_metrics_record_send_total{topic = "$my_topic_name"}[1d])) |
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
TOPIC_NAME_REGEX='(CI|TST|IT)[0-9]' | |
ZOOKEEPER_ADDR=127.0.0.1:2181 | |
for topic in $(kafka-topics --zookeeper $ZOOKEEPER_ADDR --list | egrep $TOPIC_NAME_REGEX) | |
do | |
kafka-topics --zookeeper $ZOOKEEPER_ADDR --delete --topic $topic | |
done |
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
pipeline { | |
agent { | |
label 'Linux' | |
} | |
stages { | |
stage('ask') { | |
steps { | |
script { | |
def askpass = input( | |
message: 'Please enter the password', |
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 | |
# Cleanup old schemas from schema registry | |
import httplib | |
import json | |
import re | |
DELETE_REGEX = 'IT6[0-6][0-9]-' | |
con = httplib.HTTPConnection('127.0.0.1', 8081) |
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 | |
# Get compressed URL content | |
import gzip | |
import StringIO | |
import urllib2 | |
req = urllib2.Request('http://my.lenses.url/api/alerts', | |
headers = { | |
'Accept-encoding': 'gzip', |
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 | |
# Check service availability | |
# Usage: $0 hostname port | |
import socket | |
import sys | |
if len(sys.argv) != 3: | |
sys.stderr.write("Usage: %s hostname port\n" % sys.argv[0]) | |
sys.exit(2) |