curl -s -S 'https://registry.access.redhat.com/v1/repositories/openshift3/postgresql-apb/tags' | jq '.'
curl -s -S 'https://registry.access.redhat.com/v1/repositories/rhel7/tags'| jq '.'
tmp |
#!/bin/bash | |
if [ x"$#" != x"1" ]; then | |
echo "$0 hostname" | |
exit 1 | |
fi | |
hostname=$1; shift | |
json=$(aws ec2 describe-instances) | |
echo "${json}" | jq -r '.Reservations[].Instances[] | select(.PrivateDnsName == "'${hostname}'") | .Tags | from_entries | .Name' |
#!/usr/bin/python | |
import json | |
import sys | |
input_path = sys.argv[1] | |
print("* " + input_path) | |
f = open(input_path, 'r') | |
data = json.load(f) |
esc=$(printf '\033'); tail -f /var/log/containers/nova/nova-compute.log | sed -e "s/d7ed6fe9-e0fb-4ccb-8d80-85bd80cf367a/${esc}[33md7ed6fe9-e0fb-4ccb-8d80-85bd80cf367a${esc}[0m/g" |
#!/usr/bin/env python | |
import csv | |
import sys | |
import requests | |
import subprocess | |
import urllib.parse | |
from pprint import pprint | |
from lxml import html | |
from argparse import ArgumentParser |
#!/bin/bash | |
# This script is an example for calling OpenStack Rest API with cURL. | |
# First, gets project-scoped token, then gets instance information with the token. | |
# Prereq: jq | |
# Note that before running this script, ensure to set some environment variables. | |
# e.g. | |
# source ~/keystonerc_admin | |
# or |
#!/usr/bin/python | |
import socket | |
import struct | |
import sys | |
#value = 191041708 | |
def to_ipaddr(value): | |
packed = socket.ntohl(value) | |
x = struct.pack('!I', packed) |
define server_list | |
set var $s = (*dnsmasq_daemon)->servers | |
echo \n | |
echo struct server *:\n | |
print $s | |
while $s | |
echo .domain:\n | |
print $s.domain |
#!/usr/bin/env python | |
# Prereq: PyCrypto | |
# Validation: https://www.samltool.com/decrypt.php | |
# Usage: ./decrypt_saml_response.py --key PRIVATE_KEY --pretty-print RESPONSE_XML | |
import sys | |
import optparse | |
import base64 |