Skip to content

Instantly share code, notes, and snippets.

import org.postgresql.ds.PGSimpleDataSource;
import java.sql.*;
import java.lang.Thread;
import java.util.Collections;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer;

CockroachDB Platform Provisioning and Sizing Best Practices

Terminology

Sizing:

  • a process of estimating platform resource requirements (CPU, RAM, disk, network) of a planned application based on technical descriptions of the application’s requirements
  • is an ”educated guess” rather than a precise calculation
  • CRDB is intrinsically elastic - relieves the pressure to get the sizing “exactly right”
  • done for pricing / budgetary estimates and to right-size a POC environment (procurement dependent, non-cloud)
#################
# NETWORK CHAOS #
#################
---
apiVersion: chaos-mesh.org/v1alpha1
kind: NetworkChaos
metadata:
name: delay-uswest-useast
labels:
app: cockroachdb

INTRO TO PYTHON FOR DATA SCIENCE

NUMPY

# height and weight are available as a regular lists

# Import numpy
import numpy as np
@fabiog1901
fabiog1901 / modules.md
Last active October 15, 2018 15:42
Linux modules - signing
$ openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=XYZ/"
$ /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vmmon)
$ /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vmnet)
$ mokutil --import MOK.der

Long explanation

If you have a Linux system running in Secure Boot and you install VirtualBox or VMware player you will see, with some frustration, that you won’t be able to run any VMs. I haven’t found any post that explains this properly, and most people suggest disabling Secure Boot as a solution and I find that to be a very poor solution, so here’s my 2 cents. Earlier picture shows what you’ll see from the GUI, but if you run it from the console you’ll see: