Skip to content

Instantly share code, notes, and snippets.

View ab's full-sized avatar

Andy Brody ab

View GitHub Profile
@ab
ab / motorola_parse_support_dates.py
Last active January 4, 2024 17:01
Parser for Motorola Mobility security update policies per device | for https://github.com/endoflife-date/endoflife.date/
#!/usr/bin/env python3
"""
usage: motorola_parse_support_dates.py
This script prints info about Motorola phone end of life dates in the YAML
format expected for the endoflife.date website.
See https://en-us.support.motorola.com/app/software-security-update
@ab
ab / ngrok.yml
Created March 16, 2021 16:43
Ngrok config file
# ~/.ngrok2/ngrok.yml
authtoken: "<REDACTED>"
tunnels:
ecommerce_python:
proto: http
hostname: <YOUR-CUSTOM-SUBDOMAIN>.ngrok.io
addr: localhost:8101
host_header: rewrite
bind_tls: true
#!/bin/bash
if [ $# -eq 0 ]; then
cat >&2 <<EOM
usage: poetry-shebang FILE
Install this script somewhere on your \$PATH -- such as /usr/local/bin/ -- to
be able to seamlessly run Python scripts under \`poetry run\` without having to
type that out.
#!/bin/bash
set -eo pipefail
cd "$(git rev-parse --show-toplevel)"
if [ -t 1 ]; then
opts=("--ansi")
else
opts=()
fi
#!/bin/bash
set -x
cd $(git rev-parse --show-toplevel)
poetry install --no-root
@ab
ab / foo.csv
Created February 24, 2021 22:21
Testing
cola b c
foo omg baz
@ab
ab / signals_test.py
Created January 13, 2021 22:29
Python script that prints pstree and loops forever, gracefully exiting on SIGINT/SIGTERM, useful for debugging process managers / deploy behavior
#!/usr/bin/env python3
import collections
import logging
import os
import psutil
import signal
import sys
import time
logger = logging.getLogger(__name__)
@ab
ab / 💩.rb
Last active November 16, 2020 22:25
#!/usr/bin/env ruby
alias 📄 puts
class A🖥
@@🐴 = {
😂: 'Hello, world!',
🙃: 'HALP',
🖥: 'computer.',
}
#!/usr/bin/env python
from ddtrace import tracer
@tracer.wrap()
def traced():
return "Traced"
def not_traced():
return "Not traced"
@ab
ab / AA_dmarc.rb_MOVED.md
Last active August 11, 2020 22:06
DMARC analysis: some hacks to look at DMARC vendors. MOVED TO https://github.com/ab/dmarc-analysis