Skip to content

Instantly share code, notes, and snippets.

@lrvick
lrvick / security.md
Created November 12, 2019 22:27
security preferences for #!

Security Policy

At #! we have some clear preferences when it comes to managing sevices to maximize flexibility, reliability, and security.

This document aims to be an explicit policy of things to do and not do as well as the rationale for these rules so as to inform decisions not yet explicitly covered by this document.

Principles

[*] Setting output base to '/home/build/build/external/vendor/out/crosshatch/qp1a.190711.020.c3'
[*] Using debugfs for image mounts
[*] Extracting '/home/build/build/external/vendor/crosshatch/qp1a.190711.020.c3/crosshatch-qp1a.190711.020.c3-factory-59b11ce9.zip'
[*] Unzipping 'image-crosshatch-qp1a.190711.020.c3.zip'
[*] Extracting '/home/build/build/external/vendor/crosshatch/qp1a.190711.020.c3/crosshatch-qp1a.190711.020.c3-factory-59b11ce9.zip'
Traceback (most recent call last):
File "/home/build/build/base/vendor/android-prepare-vendor/scripts/extract_android_ota_payload/extract_android_ota_payload.py", line 161, in <module>
main(filename, output_dir, partition)
File "/home/build/build/base/vendor/android-prepare-vendor/scripts/extract_android_ota_payload/extract_android_ota_payload.py", line 113, in main
payload_file = file(filename)
@lrvick
lrvick / wtf.txt
Created September 23, 2019 00:12
Higgs files. They don't exist when you look at them
root@aosp-build-aosp-local:/usr/local/bin# ls -lah .
total 334M
drwxr-xr-x 1 root root 178 Sep 22 23:02 .drwxr-xr-x 1 root root 72 Jul 19 02:03 ..
-rwsr-xr-x 1 root root 4.2M Sep 22 04:13 fixuid
-rwxr-xr-x 1 root root 13M Sep 22 04:13 glide
-rwxr-xr-x 1 root root 37M Sep 22 04:17 helm
-rwxr-xr-x 1 root root 56M Sep 22 04:14 kubectl-rwxr-xr-x 1 root root 62M Sep 22 04:21 terraform
-rwxr-xr-x 1 root root 68M Sep 22 04:24 terraform-provider-helm
-rwxr-xr-x 1 root root 59M Sep 22 04:22 terraform-provider-kubernetes
-rwxr-xr-x 1 root root 38M Sep 22 04:17 tiller
@lrvick
lrvick / whattimeisit.sh
Created September 17, 2019 00:50
Lost in time and space
docker@virtualbox:~$ date --help
BusyBox v1.27.2 (2017-10-30 14:58:40 UTC) multi-call binary.
...
docker@aosp-virtualbox:~$ date
Mon Sep 16 04:49:55 UTC 2222
docker@virtualbox:~$ sudo date -s "2019-09-16 04:50"
date: can't set date: Invalid argument
Mon Sep 16 04:50:00 UTC 2019
$ cat Dockerfile
FROM ubuntu:cosmic
ENV HOME=/home/build
ARG UID=1000
ARG GID=50
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
@lrvick
lrvick / hashbang-todo.md
Last active August 28, 2023 16:47
Hashbang Todo

#! Todo List

Things we want to get done for the community along with bounties for each.

Notes

A project is done when a k8s kustomization is submitted to the gitops repo, and it is live and available for users to use. Also must have some kind of backup solution (hosted postgres with backup services is acceptable for a first pass)

@lrvick
lrvick / Makefile
Last active August 16, 2019 23:16
make minikube wrapper for helm chart development
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))
userid = $(shell id -u)
groupid = $(shell id -g)
image = "local/$(current_dir):latest"
default: build
lint: helm-lint
fetch: submodule-update
latest: submodule-latest build
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))
userid = $(shell id -u)
groupid = $(shell id -g)
image = "bitgo/$(current_dir):latest"
default: build
lint: helm-lint
fetch: submodule-update
latest: submodule-latest build
@lrvick
lrvick / gist:f106d30826eb4680f2e447c5967a11db
Last active August 6, 2019 07:26
Broken ab_pkmd write
[lrvick@qatan crosshatch-PQ3A.190801.002]$ ls -lah crosshatch-avb_pkmd.bin
-rw-r--r-- 1 lrvick lrvick 520 Aug 6 2019 crosshatch-avb_pkmd.bin
[lrvick@qatan crosshatch-PQ3A.190801.002]$ sudo ./fastboot flash avb_custom_key crosshatch-avb_pkmd.bin
target reported max download size of 268435456 bytes
Sending 'avb_custom_key' (0 KB)...
OKAY [ 0.120s]
Writing 'avb_custom_key'...
FAILED (remote: Failed flash avb custom key Device Error)
Finished. Total time: 0.687s