The first 2 characters of the UUID value comes from the MD5 hash of a supplied UUID. The next 3 characters are the MD5 hash of the concatenation of the current year and week number -- this value is, of course, static over a week. The remaining of the UUID value comes from the MD5 of a random value and the current time at a precision of 1us. The third field is prefixed with a “4” to indicate it is a version 4 UUID type.
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: my-app | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: my-app |
The first 2 characters of the UUID value comes from the MD5 hash of the backend pid modulo 3. The next 2 characters are the MD5 hash of the concatenation of the current year and week number. This value is, of course, static over a week. The remaining of the UUID value comes from the MD5 of a random value and the current time at a precision of 1us. The third field is prefixed with a “4” to indicate it is a version 4 UUID type.
The first four characters of the UUID value comes from the MD5 hash of the concatenation of the current year and week number. This value is, of course, static over a week. The remaining of the UUID value comes from the MD5 of a random value and the current time at a precision of 1us. The third field is prefixed with a “4” to indicate it is a version 4 UUID type. There are 65536 possible prefixes so, during a week, only 1/65536 of the table rows are required in the memory to avoid a read IOP upon insertion. That’s much easier to manage, a 1TB table will need to have only about 16MB in the buffer pool to support the inserts
Let's say I have a table with a NOT NULL
field.
The client does not need to set the property, because it will happen in a trigger before insert. While this works in postgres, we cannot do it yet with graphile (to my knowledge):
Example table:
CREATE SCHEMA awesome_schema;
CREATE TABLE awesome_schema.products (
id uuid PRIMARY KEY DEFAULT uuid_generate_v4 (),
//registry.npmjs.org/:_authToken=${NPM_TOKEN} |
//registry.npmjs.org/:_authToken=${NPM_TOKEN} |
function fit(num, oldmin, oldmax, newmin, newmax) { | |
const ratio = (num - oldmin) / (oldmax - oldmin); | |
return newmin + ratio * (newmax - newmin); | |
} |
#!/bin/bash | |
if [ -z "$2" ] | |
then | |
echo "Usage: $(basename $0) <namespace> <app>" | |
exit 1 | |
fi | |
POD=$(kubectl get pods -n $1 -l app=$2 -o jsonpath="{.items[*].metadata.name}") | |
kubectl logs -n $1 $POD -f |
const bitcoin = require('bitcoinjs-lib'); | |
var privatekey = process.argv[2] | |
// NOTE: only wif and pubKeyHash are correct, they were all that is needed for this function to work | |
const pair = bitcoin.ECPair.fromWIF(privatekey, { | |
messagePrefix: '\x19Denarius Signed Message:\n', | |
bip32: { | |
public: 0x019da462, // TODO DONT USE | |
private: 0x019d9cfe // TODO DONT USE |