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 | |
# This script scales down a stateful set in a controlled way one by one. | |
set -euo pipefail | |
set -x | |
KUBERNETES_CONTEXT=${KUBERNETES_CONTEXT:-dev-us-central-0} | |
KUBERNETES_NAMESPACE=${KUBERNETES_NAMESPACE:-fire-dev-001} |
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
let | |
blue = "000096"; | |
white = "ffffff"; | |
green = "009600"; | |
orange = "ff7700"; | |
dark-orange = "803500"; | |
red = "ff0000"; | |
in | |
'' | |
g logo ${white} |
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
import pandas as pd | |
block = '01H2FK73D796PRDR32PGGMKV2H/' | |
mappings = pd.read_parquet(block+'mappings.parquet', engine='pyarrow') | |
strings = pd.read_parquet(block+'strings.parquet', engine='pyarrow') | |
locations = pd.read_parquet(block+'locations.parquet', engine='pyarrow') | |
stacktraces = pd.read_parquet(block+'stacktraces.parquet', engine='pyarrow') | |
functions = pd.read_parquet(block+'functions.parquet', engine='pyarrow') | |
def resolve_strings(df, columns=[]): |
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
logging { | |
level = "info" | |
format = "logfmt" | |
} | |
discovery.kubernetes "pods" { | |
role = "pod" | |
} | |
discovery.relabel "local_pods" { |
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
# configure protobuf search paths | |
# ensure you are in a cloned loki root path | |
cat > ~/.config/wireshark/protobuf_search_paths <<EOF | |
"$(pwd)/pkg/logproto","TRUE" | |
"$(pwd)","FALSE" | |
"$(pwd)/vendor","FALSE" | |
"/nix/store/drrmxvscqaa6521a46lqwkhhv82qr88g-source/vendor/github.com/gogo/protobuf/protobuf","FALSE" | |
EOF | |
# capture and decode 9095 as http2 |
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
From 7a8092b5a262095f02d97c62d56a82d856b66500 Mon Sep 17 00:00:00 2001 | |
From: Christian Simon <[email protected]> | |
Date: Sun, 7 Feb 2021 10:42:48 +0000 | |
Subject: [PATCH] hack: Do not compare connector | |
Necessary for my Thunderbolt adapter on X1 Carbon | |
--- | |
src/backends/meta-monitor.c | 7 +------ | |
1 file changed, 1 insertion(+), 6 deletions(-) |
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
from datetime import datetime,timedelta | |
from pytz import timezone | |
tz = timezone('America/Los_Angeles') | |
period = 7*24*3600 | |
for index in range (2648, 2654): | |
index_from = datetime.fromtimestamp(index*period,tz=tz) | |
index_to = datetime.fromtimestamp((index+1)*period-1,tz=tz) | |
print ('index %d: from %s to %s' % (index, index_from.isoformat(), index_to.isoformat())) |
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
- expr: 1 | |
labels: | |
instance: db1 | |
cloud: aws | |
record: expected_instances | |
- expr: 1 | |
labels: | |
instance: db2 | |
cloud: azure | |
record: expected_instances |
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
$ GODEBUG=netdns=cgo+1 go run main.go | |
go package net: using cgo DNS resolver | |
2020/08/26 11:15:12 #01 212.58.233.253:443 | |
2020/08/26 11:15:12 #02 212.58.237.251:443 | |
2020/08/26 11:15:13 #03 212.58.233.251:443 | |
2020/08/26 11:15:13 #04 212.58.233.251:443 | |
2020/08/26 11:15:13 #05 212.58.237.253:443 | |
2020/08/26 11:15:13 #06 212.58.237.254:443 | |
2020/08/26 11:15:14 #07 212.58.237.254:443 | |
2020/08/26 11:15:14 #08 212.58.233.254:443 |
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/awk -f | |
BEGIN { | |
D="cd /overlay/upper/usr/lib/opkg/info&&" | |
C=D"ls *.list" | |
S="sort -n" | |
while(C|getline>0) { | |
P=substr(F=$1,1,length($1)-5) | |
J=D"du -sk $(cat "F")" | |
s=0 | |
while(J|getline>0) { |
NewerOlder