Skip to content

Instantly share code, notes, and snippets.

find . -iname 'metadata.json' -exec bash -c 'jq ".requirements[]| select( .name == \"puppet\" )|.version_requirement" {} |grep -v -P -e "[7-9]\.0\.0\"$" ' \; -printf "%p\n\n"
@jradmacher
jradmacher / whisper-cleanup.py
Last active May 19, 2020 10:23
find outdated Graphite whisper files and (optionally) delete them
#!/usr/bin/env python3
import os
import sys
import signal
import argparse
import json
import time
from logging import debug,info,warning,error
import logging
@jradmacher
jradmacher / ini2json_relaxed.py
Created September 28, 2017 14:17
convert INI file to json, skipping all garbage data
# -*- coding: utf-8 -*-
import json
import sys
import re
from configparser import (ConfigParser, MissingSectionHeaderError,
ParsingError, DEFAULTSECT)
def isIniLine(line):
#filter for lines with