Skip to content

Instantly share code, notes, and snippets.

View hagen1778's full-sized avatar
💭
I may be slow to respond.

Roman Khavronenko hagen1778

💭
I may be slow to respond.
View GitHub Profile
create table test(a Int64, b Int64, c Int64, d String)
engine=MergeTree partition by tuple() order by (a,b,c);
insert into test select 1, 0, number, toString(number) from numbers(1000000);
insert into test select 2, 2, number, toString(number) from numbers(100);
insert into test select 3, 3, number, toString(number) from numbers(1000000);
select count() from test where a=2 and c=1;
1 rows in set. Elapsed: 0.002 sec.
@paolocarrasco
paolocarrasco / README.md
Last active July 11, 2025 09:57
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

@f41gh7
f41gh7 / victoria_metrics_push_gw.py
Created January 17, 2021 02:08
VictoriaMetrics as push gateway.
from prometheus_client import Counter, start_http_server
from threading import Thread
import requests as re
import time
JOB_NAME = 'test'
INSTANCE = 'localhost'
def scrape_and_send(local_url: str, vm_url: str, scrape_interval: int):
@ihard
ihard / backfill prom metric.txt
Last active December 23, 2021 13:51
backfill prom metric via vmalert
cat <<EOF > rules.yml
---
groups:
- name: main
rules:
EOF
curl -s -g 'http://localhost:9090/api/v1/series?' --data-urlencode 'match[]={job="grafana"}' \
@f41gh7
f41gh7 / README.md
Last active April 21, 2022 09:34
vmagent k8s discovery timings

how to generate load on vmagent

requirements

  • golang
  • python3
  • git

starting