Skip to content

Instantly share code, notes, and snippets.

View justinabrahms's full-sized avatar

Justin Abrahms justinabrahms

View GitHub Profile
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.

mongod won't start.

If you've tried sudo service mongod start and it says it started but didn't, or maybe gives you a cryptic error.. consider removing the lock file at /edx/var/mongo/mongodb/mongod.lock and try again.

No locks available.

So, when running some tests, I got the error "No locks available". This post suggests NFS. The actual fix appears to be to restart rpcbind sudo service rpcbind restart which hung my vagrant VM. When it restarted, I got the error below, but things seemed to work as I wanted and I'm slowly backing away.