Thorough local machine audit: security, processes, disk, network, users, services, compromise indicators.
Setup: REPORT_DIR=$(mktemp -d /tmp/machine-health-XXXXX) && chmod 700 "$REPORT_DIR" && echo "Report: $REPORT_DIR"
| $ARGUMENTS | Behavior |
|---|
| #!/usr/bin/env bash | |
| # Error Codes | |
| # 1 — Platform is not supported | |
| # 2 — No IDEs have been installed | |
| # 3 — Location for cloud scratches does not exist | |
| set -eu +x | |
| PLATFORM=$(uname -s) |
STEP 1: Take backups
export NAMESPACE=<your-tenant-namespace>
kubectl get directpvvolumes -o yaml > directpvvolumes.yaml
kubectl get directpvdrives -o yaml > directpvdrives.yaml
kubectl get ns $NAMESPACE -o yaml > tenantns.yaml
kubectl get pv -o yaml > pvs.yaml
kubectl get pvc -n $NAMESPACE -o yaml > pvcs.yaml
kubectl get tenants -n $NAMESPACE -o yaml > tenant.yaml| replicate: | |
| apiVersion: v1 | |
| # source of the objects to be replicated | |
| source: | |
| type: minio # valid values are "minio" | |
| bucket: old-minio-versioned-bucket | |
| prefix: "" # 'PREFIX' is optional | |
| # NOTE: if source is remote then target must be "local" | |
| # Source is an old version of MinIO | |
| endpoint: "http://localhost:15000" |
| # reload source | |
| alias brc="source ~/.config/fish/.bashrc" | |
| # open explorer in current folder | |
| alias e.="explorer ." | |
| # git: log pretty | |
| alias gl="git log --oneline --graph" | |
| # git: status condensed |
As MinIO needs the CN to have the policy name and original mkcert does not support this, download updated mkcert from https://github.com/kanagarajkm/mkcert/releases/download/v1.4.3-1/mkcert
mkcert localhostlocalhost-key.pem and localhost.pem to certs directory of minio server.cp -avi localhost-key.pem ~/.minio/certs/private.keycurl -Ol https://golang.org/src/crypto/tls/generate_cert.go
go run generate_cert.go -ca --host "192.168.86.47"
cp cert.pem key.pem ~/.minio/certs
mv ~/.minio/certs/cert.pem ~/.minio/certs/public.crt
mv ~/.minio/certs/key.pem ~/.minio/certs/private.key
> cat start-https.sh
export MINIO_ACCESS_KEY="minio"
export MINIO_SECRET_KEY="minio123"
export MINIO_PROMETHEUS_AUTH_TYPE="public"
| #!/bin/bash | |
| if [ "$#" -lt 0 ]; then | |
| echo "Usage: $0" | |
| exit 1 | |
| fi | |
| echo "Generating nip.io based on found external IP" | |
| FOUNDIP=$(docker run --rm --net=host appropriate/curl https://api.ipify.org) | |
| APIFQDN="minio-api.${FOUNDIP}.nip.io" | |
| FQDN="minio.${FOUNDIP}.nip.io" |
| import React, { useEffect } from 'react'; | |
| const useWhenVisible = (target: Element | undefined, | |
| callback: () => void, | |
| root: Element | undefined = document.body) => { | |
| useEffect(() => { | |
| if (!target || !root) { | |
| return; | |
| } | |
| /** | |
| * Wraps the provide component in a `Suspense`, with the provided fallback. | |
| * This should be used on components whose parent is not easy to control, such as | |
| * React Navigation screens to be able to lazy load them using `React.lazy`. | |
| * @param WrappedComponent The component to wrap. | |
| * @param fallback The component to render while loading. | |
| * | |
| * @example | |
| * const SomeScreen = withSuspense(React.lazy(() => import("path/to/some/screen"))); | |
| */ |