I hereby claim:
- I am jamesoff on github.
- I am jamesoff (https://keybase.io/jamesoff) on keybase.
- I have a public key ASBSO3lGnQgxcM5X_Ze4NCcJMHoRwGx9GRzpsmj-jxJAXgo
To claim this, I am signing this object:
from PIL import Image, ImageDraw | |
WIDTH = 180 | |
HEIGHT = 240 | |
im = Image.new("L", (WIDTH, HEIGHT)) | |
with open("230119180929.irg", "rb") as in_file: | |
in_file.seek(0x7E) | |
draw = ImageDraw.Draw(im) |
#!/usr/bin/env zsh | |
# Disable Amazon GuardDuty's k8s log parsing thing everywhere | |
# Assumes at most one GuardDuty detector in each region | |
# Docs: https://docs.aws.amazon.com/guardduty/latest/ug/kubernetes-protection.html | |
for r in $(aws ec2 describe-regions --query 'Regions[].RegionName' --output text); do | |
detector=$( aws guardduty list-detectors --query DetectorIds --output text --region "$r" ) | |
if [[ -z $detector ]]; then |
#!/usr/bin/env zsh | |
log_path=/Library/Logs/ArqAgent/backup | |
last_file=(${log_path}/*(om[1])) | |
if grep -q "Backup activity ended" "$last_file"; then | |
echo no | |
exit 1 | |
fi | |
echo yes |
#!/usr/bin/env bash | |
#MIT No Attribution | |
# | |
#Copyright 2020 James Seward | |
# | |
#Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
#software and associated documentation files (the "Software"), to deal in the Software | |
#without restriction, including without limitation the rights to use, copy, modify, | |
#merge, publish, distribute, sublicense, and/or sell copies of the Software, and to |
http https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/eu-west-2/index.json | jq '[ .products | to_entries | .[].value.attributes.instanceType | select(. != null) | scan("^[a-z0-9]+") ] | unique' |
#!/usr/local/bin/python | |
"""Ask complicated maths questions.""" | |
__revision__ = 1 | |
import sys | |
import random | |
import operator |
""" | |
fizzbuzz.py | |
Implement fizzbuzz without using a comparison operator. | |
Because I said I could. | |
""" | |
import sys |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/python monitor.py | |
WorkingDirectory=/home/james/src/simplemonitor | |
User=james | |
[Install] | |
WantedBy=multiuser.target |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
missing_s3md5() { | |
echo "Can't find/exec s3md5" | |
echo "Get it from https://github.com/antespi/s3md5 and put in PATH, or export S3MD5 to point at it." | |
exit 1 | |
} | |
S3MD5=${S3MD5:-$( which s3md5 )} |