Skip to content

Instantly share code, notes, and snippets.

View petemill's full-sized avatar

Pete Miller petemill

View GitHub Profile
@petemill
petemill / released-in.sh
Created July 23, 2026 21:10 — forked from wknapik/released-in.sh
Print the earliest Brave browser release containing PR code
#!/usr/bin/env bash
# Print the earliest Brave browser release containing PR code
# USAGE: released-in <PR_NUMBER | PR_URL | GIT_REF>
# Requires: bash>=4, coreutils, curl, git, grep, jq
set -eEo pipefail
shopt -s inherit_errexit
if [[ "$1" == */pull/* ]]; then
pr_number="$(grep -oE 'pull/[0-9]+' <<<"$1"|cut -d/ -f2)"
__author__ = 'eoglethorpe'
"""take election info from
http://projects.fivethirtyeight.com/election-2016/delegate-targets/democrats/
and convert it to JSON
"""
import json
import requests