This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create database kv; | |
use kv; | |
/* | |
possibly add a namespace to all of this | |
lets start with BLOB for values | |
GLOBAL: | |
exists key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP database if exists analytics; | |
CREATE DATABASE analytics; | |
USE analytics; | |
CREATE TABLE entities ( | |
ts DATETIME(6) NOT NULL, | |
id BIGINT NOT NULL, | |
kind TEXT NOT NULL, | |
SORT KEY (ts, id), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP database if exists analytics; | |
CREATE DATABASE analytics; | |
USE analytics; | |
create table visitors ( | |
visitor_id BIGINT NOT NULL, | |
props JSON NOT NULL, | |
PRIMARY KEY (visitor_id) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
METADATA_BASE="http://metadata.google.internal/computeMetadata/v1/instance/attributes" | |
log() { | |
local msg="${*}" | |
logger -p syslog.info -t "startup-script" -- "${msg}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sdb-admin list-nodes --role aggregator -q \ | |
| xargs -I NODEID sdb-admin -y update-config --memsql-id NODEID --key http_api --value on | |
sdb-admin list-nodes --role aggregator -q \ | |
| xargs -I NODEID sdb-admin -y update-config --memsql-id NODEID --key http_proxy_port --value <port> | |
sdb-admin list-nodes --role aggregator -q \ | |
| xargs -I NODEID sdb-admin -y query --memsql-id NODEID --sql "RESTART PROXY" |
This is an example of how you can use RBAC and the CURRENT_SECURITY_GROUPS function to implement data hiding in SingleStore.
- Get a SingleStore free license key from https://portal.singlestore.com
- Set your SingleStore license key as an environment variable
export LICENSE_KEY="PUT YOUR LICENSE KEY HERE"
- Run SingleStore cluster in a box
docker run -it \
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create database if not exists t; | |
create database if not exists t2; | |
use t; | |
create table if not exists x (id int); | |
delimiter // | |
create or replace procedure foo (i int) as | |
begin |
- Download process.py
- Run
~/csp $ python3 process.py
usage: process.py aws|azure|gcp
~/csp $ python3 process.py aws | head -n 10
3.5.140.0
3.5.140.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eux | |
DEVICES=$(ls /dev | egrep -o nvme.n1 | sort -u | grep -v $(df -h | egrep -o nvme.n1) | sed 's_\<_/dev/_g') | |
echo "Setting up the following devices:" | |
echo ${DEVICES} | |
read -p "Are you sure? " -n 1 -r | |
echo |
NewerOlder