Skip to content

Instantly share code, notes, and snippets.

View Logiraptor's full-sized avatar
👁️

Patrick Oyarzun Logiraptor

👁️
View GitHub Profile
javascript:(function(){
let script = document.createElement('script');
script.src = 'https://unpkg.com/[email protected]/viz.js';
script.onload = function() {
let findReactComponent = function (el) {
for (const key in el) {
if (key.startsWith('__reactInternalInstance$')) {
Api Call HTTP Status UI Behavior CLI Behavior
PUT "/api/v0/staged/director/properties" 200 * Continue
PUT "/api/v0/staged/director/availability_zones" 207 Warning (AvailabilityZonesVerifier) Halt
vv Below this line, I commented the az config before running
PUT "/api/v0/staged/director/networks" 200 Warning (IaasConfigurationVerifier, NetworksExiste
resources:
- name: my-resource
jobs:
- name: my-job
plan:
- get: my-resource
serial: true
- name: my-job
serial: false
plan:
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Mimir
type: prometheus
url: 'http://gem-mimir-gateway.default.svc.cluster.local:8080/prometheus'
access: proxy
isDefault: true
jsonData:
# Replace these with proper values for your Grafana Cloud tenant
TENANT_ID="123456"
API_KEY="abcde=="
USER_AGENT="Customer/0.0.1 shell script"
ENDPOINT="https://prometheus-prod-10-prod-us-central-0.grafana.net"
# List all rules for your tenant
curl --user "$TENANT_ID:$API_KEY" \
@Logiraptor
Logiraptor / split.py
Created April 10, 2023 20:49
A Trie designed to split a list of names into prefixes for querying prometheus efficiently
import string
class Trie:
def __init__(self, prefix='', terminal=False, children=None):
self.prefix = prefix
self.terminal = terminal
self.children = children or []
def add(self, name):
if not name.startswith(self.prefix):
@Logiraptor
Logiraptor / db.go
Created December 2, 2023 15:38
a way to do object storage-only dbs
package db
import (
"context"
"io"
"strings"
"time"
"github.com/grafana/dskit/services"
)