Skip to content

Instantly share code, notes, and snippets.

making things

Brad Smith infinitewarp

making things
View GitHub Profile
infinitewarp /
Last active Aug 18, 2021
crude openshift pod log scraper
# get all current cloudigrade pods logs
oc project "${PROJECT}" || exit $?
DATEDIR=$(gdate -u "+%Y-%m-%dT%H.%M.%S")
infinitewarp /
Created Aug 18, 2021
crude sqs message dumper for stage-celery
import boto3
import base64
import pathlib
import datetime
write_path = f"/tmp/messages/{':', '.')}/"
print(f"will write messages into {write_path}")
pathlib.Path(write_path).mkdir(parents=True, exist_ok=True)
max_batch_size = 10
infinitewarp /
Last active Nov 25, 2019
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 /
Created Jun 4, 2018
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 \
infinitewarp / DDLC-extract-archives.ipynb
Created Dec 16, 2017
Jupyter notebook file to extract the archives in Doki Doki Literature Club
View DDLC-extract-archives.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View example
>>> from openpyxl import load_workbook
>>> wb = load_workbook('callsheet.xlsx')
>>> wb.get_sheet_names()
>>> ws = wb.get_active_sheet()
>>> ws.title
>>> print "first row has {} cells".format(len(next(ws.rows)))
first row has 12 cells
infinitewarp /
Last active Nov 25, 2016
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
infinitewarp / mysql exclusive
Last active Sep 6, 2016
simple steps to cause an exclusive lock in mysql
View mysql exclusive
  • open shell 1 to the database and run the following to create a table and start a new transaction:
create table foo (id integer primary key);
  • open shell 2 to the database and run the following to ensure you see the table and start a new transaction:
describe foo;

US Retirement Investing


I am not a lawyer! I am not a certified accountant, economist, investment authority, or "financial advisor" in any formal capacity! This information is provided purely based on personal anecdotes and recollections, and I cannot guarantee the accuracy or validity of any of it. How you choose to handle your money and investments is entirely your own choice and your own risk. Caveat emptor!

your money your problems

Now with that out of the way...

View iterm-profile.json
"Use Non-ASCII Font" : false,
"Tags" : [
"Ansi 12 Color" : {
"Green Component" : "0.6235294",
"Red Component" : "0.4470588",
"Blue Component" : "0.8117647"