Skip to content

Instantly share code, notes, and snippets.

View infinitewarp's full-sized avatar
🐍
making things

Brad Smith infinitewarp

🐍
making things
View GitHub Profile
@infinitewarp
infinitewarp / fix-podman-qemu-hv_error-on-macos.md
Last active August 21, 2023 01:59
fix podman error `qemu-system-x86_64: Error: HV_ERROR` on macOS

fix podman qemu-system-x86_64: Error: HV_ERROR on macOS

after installing podman machine normally...

copy this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@infinitewarp
infinitewarp / explanation.md
Created November 4, 2022 14:03
RH_CFT 2022 Parachute

RH_CTF 2022 Parachute

Real-world NASA/JPL science

This puzzle was based on real-world engineering! NASA's Mars Perseverance Rover was designed with a unique landing system. It deployed a parachute to slow its decent. Then it fired small rockets to hover above the surface and deploy a one-of-a-kind sky crane to lower the rover to the surface while those rockets were firing.

Watch the 2021-02-18 Perseverance Rover's decent and touchdown here: https://youtu.be/4czjS9h4Fpg

(The parachute deploys at 0:12, and the sky crane lowers at 2:45.)

@infinitewarp
infinitewarp / clowder-hpa-timeline.md
Last active June 16, 2022 19:20
Clowder missing HPA support, timeline of events

Clowder still does not may finally (as of 611 and RHCLOUD-19289?) support native horizontal pod autoscaling (HPA).

@infinitewarp
infinitewarp / get-cloudigrade-pod-logs.sh
Last active August 18, 2021 18:01
crude openshift pod log scraper
#!zsh
# get all current cloudigrade pods logs
PROJECT="cloudigrade-stage"
#PROJECT="cloudigrade-prod"
#PROJECT="cloudigrade-ci"
oc project "${PROJECT}" || exit $?
DATEDIR=$(gdate -u "+%Y-%m-%dT%H.%M.%S")
DIRNAME="logs-$PROJECT-$DATEDIR"
@infinitewarp
infinitewarp / sqs-dump.py
Created August 18, 2021 17:46
crude sqs message dumper for stage-celery
import boto3
import base64
import pathlib
import datetime
write_path = f"/tmp/messages/{datetime.datetime.now().isoformat().replace(':', '.')}/"
print(f"will write messages into {write_path}")
pathlib.Path(write_path).mkdir(parents=True, exist_ok=True)
max_batch_size = 10
@infinitewarp
infinitewarp / data-export-request-howto.md
Last active November 25, 2019 15:54
general overview of the data export requests API

Data Export Request API

What is this?

The "data export request API" enables a Koku customer to request an export of some of the data in Koku's database that originated from sources/providers managed by that customer. The export generally includes results from Koku's "daily" and "daily summary" database tables and are generally bound by specific requested dates. Exported files are separated by Koku account, source/provider, date, and table name. These files will be written by Koku to an AWS S3 bucket that the customer specified in the request.

Upon initial request, Koku gives the customer a synchronous response to indicate that it has started the process, but the remainder of the operations are asynchronous. The customer must check back at the API if she wants to see the current state of her data export request.

Where does it live?

@infinitewarp
infinitewarp / cloudigrade.sh
Created June 4, 2018 13:37
shell environment setup script for cloudigrade
cd ~/projects/cloudigrade
[ -z $VIRTUAL_ENV ] || deactivate 2>&1 >/dev/null
workon cloudigrade
export DJANGO_SETTINGS_MODULE=config.settings.local
export AWS_PROFILE=cluster
unset \
AWS_ACCESS_KEY_ID \
@infinitewarp
infinitewarp / DDLC-extract-archives.ipynb
Created December 16, 2017 05:29
Jupyter notebook file to extract the archives in Doki Doki Literature Club
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
>>> from openpyxl import load_workbook
>>> wb = load_workbook('callsheet.xlsx')
>>> wb.get_sheet_names()
[u'QuickbooksToPodio']
>>> ws = wb.get_active_sheet()
>>> ws.title
u'QuickbooksToPodio'
>>> print "first row has {} cells".format(len(next(ws.rows)))
first row has 12 cells
@infinitewarp
infinitewarp / minecraft-region-minmax.py
Last active November 25, 2016 20:06
Get potential full size of a map from a list of Minecraft region files
from __future__ import print_function
import re
from sys import argv, exit
pattern = r'.*r\.(-?[0-9]+)\.(-?[0-9]+)\.mca$'
matcher = re.compile(pattern)
north, south, east, west = None, None, None, None