Skip to content

Instantly share code, notes, and snippets.

View justinabrahms's full-sized avatar

Justin Abrahms justinabrahms

View GitHub Profile
@justinabrahms
justinabrahms / check-newrelic-policy-teams.py
Created October 16, 2025 21:10
New Relic Alert Policy Team Checker - Detects PER_POLICY alert policies with conditions from multiple teams. This helps identify alert routing issues where team tags are used for incident management (e.g., Rootly) - a single incident would alert all teams simultaneously instead of just the owning team.
#!/usr/bin/env python3
"""
Check New Relic alert policies for multiple teams under PER_POLICY configuration.
This detects policies where conditions monitor entities with different team tags,
which can cause issues with alert routing when using PER_POLICY incident preference.
Usage:
./check-newrelic-policy-teams.py # Check all PER_POLICY policies
./check-newrelic-policy-teams.py 705052 # Check specific policy by ID
"""
700ce58f4629734c21558ec1dae8960a

New Relic Alert Condition Team Tagger

A utility for bulk-tagging New Relic alert conditions by team.

Features

  • Queries New Relic for all alert conditions without a "team" tag
  • Presents conditions one by one for interactive tagging
  • Smart team name matching:
  • Type full team name for exact match
@justinabrahms
justinabrahms / gist:b26099674af439a2d889853a4c123a52
Created April 17, 2025 05:42
Tekton Pipeline Template with Go templating
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: deployment-pipeline
spec:
params:
- name: app-name
type: string
description: The name of the application
- name: image-name

github pull request querying

I’m querying review statuses for team so they can get a sense of who is doing all of the PR approvals and how long things are taking.

URL: https://github-url-here/api/graphql Header: Authorization: Bearer

query {
  search(query: "org:ORGHERE is:pr created:>2021-01-01", type: ISSUE, last: 50) {
@justinabrahms
justinabrahms / invoke.sh
Created April 28, 2022 18:09
Information on how to generate a nodejs license scan using SBOMs
npm i --production
npx -p @cyclonedx/bom cyclonedx-node -o bom.json
python ../license-scan.py
@justinabrahms
justinabrahms / avendar-id-parser.py
Created June 25, 2020 10:37
item parser for avendar.net
import re
from hashlib import sha256
class Item(object):
def __init__(self, item):
self.item = item
def __str__(self):
return self.item['name']
"""
Fetches some valid oauth credentials from edX, using only the secret & app key.
Based primarly off of the Facebook example in flask-oauth
"""
from flask import Flask, redirect, url_for, session, request
from flask_oauth import OAuth
#!/bin/sh
# Originally from https://gist.github.com/dmkash/2355219
SESSION_NAME="ccxcon"
cd ~/src/github.com/mitodl/ccxcon
tmux has-session -t ${SESSION_NAME}
if [ $? != 0 ]
"""Goal here is to obfuscate GPG blocks using markov chains.
Steps:
1. Train markov chain with some news articles on a similar topic.
2. Take in a GPG armored ascii block.
3. Use that input to determine which branch of the markov chain to walk.
4. The result would be a new article similar to the inputs.
5. The user could then take the same program, run it against the same
inputs, and output the GPG block.