Skip to content

Instantly share code, notes, and snippets.

View mweiden's full-sized avatar
🤖
Robot cars

Matt Weiden mweiden

🤖
Robot cars
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mweiden on github.
  • I am weiden (https://keybase.io/weiden) on keybase.
  • I have a public key whose fingerprint is E263 B46A A365 146E A3ED 3812 7DA4 A171 B407 E270

To claim this, I am signing this object:

FROM ubuntu:bionic
RUN apt-get update -y
RUN apt-get install -y bash git curl wget vim
RUN apt-get install -y build-essential
RUN apt-get install -y bison flex libelf-dev lsb-release
RUN apt-get install -y linux-headers-generic
# https://github.com/iovisor/bcc/blob/master/INSTALL.md#ubuntu---binary
ENV CONFIG_BPF=y
#!/usr/bin/env python3
"""
requires python 3.7
"""
import argparse
import re
import sys
import datetime
@mweiden
mweiden / build_status.md
Last active September 8, 2018 00:22
HCA Build Status

HCA Data Coordination Platform: Build Status

System Stage Status
DCP integration
DCP staging
Upload dev
Upload integration
Upload staging
Data Storage dev
Data Storage integration

Production checklist

Design

  • System blueprint (boxes and arrows)
  • Capacity planning

Administrative

@mweiden
mweiden / RUNBOOK_TEMPLATE.md
Last active August 15, 2018 21:15
A runbook template for HCA DCP

[System Name]: Run Book / System Operation Manual

Service or system overview

README.md link:

Service owner

iters = [iter(t) for t in [(1, 2), (0, 2), (0, 2, 3)]]
def get(itr):
try:
return next(itr)
except StopIteration:
return None
@mweiden
mweiden / prompt.sh
Created April 27, 2018 05:47
Prompt
function return_value() {
RETVAL=$?
[ $RETVAL -ne 0 ] && echo "\[\e[31m\]${RETVAL}\[\e[m\]" || echo "\[\e[32m\]${RETVAL}\[\e[m\]"
}
export PS1="`return_value` \[\e[34m\]\W\[\e[m\]> "
@mweiden
mweiden / README.md
Last active April 25, 2018 21:11
Generate direct urls for HCA DCP data given a bundle uuid

Direct links for DCP data

The command below takes a set of bundle UUIDs, fetches direct s3 urls for the files of each and writes it to a CSV file.

tail -n +2 melanoma_bundle_uuids.txt | ./gen_direct_url.sh > direct_urls.csv

The format of the CSV is bundle_uuid, file_name, file_url.

Prerequisites