Skip to content

Instantly share code, notes, and snippets.

View chrisxaustin's full-sized avatar

Chris Austin chrisxaustin

  • Somerville, MA, US
View GitHub Profile
@chrisxaustin
chrisxaustin / list-clones
Last active November 24, 2024 14:44
List github clone operations
#!/bin/bash
org=foo
gh api --paginate -H "Accept: application/vnd.github+json" -X GET -F include=git /orgs/$org/audit-log | jq -r '.[] | select(.action=="git.clone" and .actor!="github-actions[bot]" and .actor!="dependabot[bot]") | [.actor, .action, .repo, .programmatic_access_type] | @tsv'
@chrisxaustin
chrisxaustin / list-audit-log
Last active November 24, 2024 14:44
List github audit logs
#!/bin/bash
org=foo
gh api --paginate -H "Accept: application/vnd.github+json" -X GET -F include=git /orgs/$org/audit-log | jq
@chrisxaustin
chrisxaustin / analyze-contrib.py
Last active November 24, 2024 14:46
Analyze the output from github contributors, which I capture with the list-contrib gist
#!/opt/homebrew/bin/python3
import re
import json
import sys
import datetime
for filename in sys.argv[1:]:
with open(filename, 'r') as fh:
repo = re.split(r'/', filename)[-1]
raw = fh.read()
@chrisxaustin
chrisxaustin / list-contrib
Last active November 24, 2024 14:45
List the github contributors for a repo using the stats/contributors api.
#!/bin/bash
org=foo
pause=2
retries=6
for repo in $(./repos|sort); do
out=stats/contrib/$repo
for i in 1 2 3 4 5 6; do
gh api --paginate -H "Accept: application/vnd.github+json" /repos/$org/$repo/stats/contributors | jq > $out
lines=$(cat $out | wc -l)
if [[ $lines -gt 2 ]]; then
@chrisxaustin
chrisxaustin / list-commits
Last active November 24, 2024 14:46
List github commits for a repo
#!/bin/bash
org=foo
repo=$1
gh api --paginate -H "Accept: application/vnd.github+json" /repos/$org/$repo/commits
#!/bin/bash
org=foo
$repo=$1
gh api --paginate -XGET -H "Accept: application/vnd.github+json" -f 'state=all' /repos/$org/$repo/pulls | jq -r '.[]'
#!/bin/bash
org=foo
gh api --paginate -H "Accept: application/vnd.github+json" /orgs/$org/repos | jq -r '.[] | .name'
set maxmempattern=30000
set nocompatible
set nowrap
set noswapfile
set background=dark
set ai
set ts=2
set shiftwidth=2
set et
set textwidth=0
This file has been truncated, but you can view the full file.
alerts-es-hot-0
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
ESTAB 0 0 172.16.54.28:39108 172.16.45.112:9300 timer:(keepalive,2min41sec,0) uid:1000 ino:3039544091 sk:1 <->
ts sack cubic wscale:7,7 rto:204 rtt:2.106/3.232 ato:40 mss:8949 pmtu:9001 rcvmss:8949 advmss:8949 cwnd:10 ssthresh:26 bytes_sent:443922732 bytes_retrans:42576 bytes_acked:443880157 bytes_received:433237555 segs_out:322679 segs_in:191894 data_segs_out:177343 data_segs_in:179809 send 339943020bps lastsnd:2172 lastrcv:2172 lastack:2172 pacing_rate 679684328bps delivery_rate 3029505560bps delivered:177344 busy:206368ms retrans:0/11 dsack_dups:11 rcv_rtt:1 rcv_space:251134 rcv_ssthresh:1104828 minrtt:0.186
ES
export TFENV_ARCH=arm64
alias tf=terraform
alias tfi='terraform init'
alias tfia='terraform init && terraform apply'
alias tfa='terraform apply'
alias tfaa='terraform apply -auto-approve'
alias mvcd='mvn versions:set && mvn clean deploy -DskipTests'
alias mcd='mvn clean deploy -DskipTests'
alias gsps='git stash && git pull && git stash apply'