Skip to content

Instantly share code, notes, and snippets.

View mathisve's full-sized avatar
☁️
Code & Cloud

Mathis Van Eetvelde mathisve

☁️
Code & Cloud
View GitHub Profile
@mathisve
mathisve / kubeadm.sh
Last active January 2, 2023 19:57
Kubernetes cluster using Kubeadm
## works for ubuntu
## source: https://www.linuxtechi.com/install-kubernetes-on-ubuntu-22-04/
sudo swapoff -a
sudo sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab
sudo tee /etc/modules-load.d/containerd.conf <<EOF
overlay
br_netfilter
EOF
@mathisve
mathisve / caggs.SQL
Last active May 22, 2023 17:07
Timescale crypto dashboard
--DROP MATERIALIZED VIEW tick1mcagg, tick10mcagg, tick30mcagg, tick1hcagg, tick6hcagg, tick12hcagg, tick1dcagg, tick7dcagg, tick14dcagg, tick30dcagg;
--DROP MATERIALIZED VIEW fl1mcagg, fl10mcagg, fl30mcagg, fl1hcagg, fl6hcagg, fl12hcagg, fl1dcagg, fl7dcagg, fl14dcagg, fl30dcagg;
--tickcaggs
CREATE MATERIALIZED VIEW tick1mcagg WITH (timescaledb.continuous) AS
SELECT time_bucket('1m', time) as time, avg(price) as price, symbol
FROM crypto_ticks
GROUP BY time_bucket('1m', time), symbol WITH NO DATA;
CREATE MATERIALIZED VIEW tick10mcagg WITH (timescaledb.continuous) AS
@mathisve
mathisve / blockchain.json
Created May 22, 2023 16:47
Bitcoin 2023 Grafana dashboards
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,