Skip to content

Instantly share code, notes, and snippets.

View paulfantom's full-sized avatar
🚫
Not available.

Paweł Krupa paulfantom

🚫
Not available.
View GitHub Profile
// Programmed with https://www.espruino.com/ide
// Based on https://github.com/aegjoyce/bthome-electricity-meter/blob/main/meter.js
var counter = 0;
// time in milliseconds since epoch
var lastpulse = Date.now();
// energy variable will be actual kWh * 1000 in order for BTHome to parse to 3 decimal places
var energy = 0;
# HELP parca_metastore_cache_id_hits_total Number of cache hits for id lookups.
# TYPE parca_metastore_cache_id_hits_total counter
parca_metastore_cache_id_hits_total{item_type="function"} 2.0805072e+07
parca_metastore_cache_id_hits_total{item_type="location"} 0
parca_metastore_cache_id_hits_total{item_type="location_lines"} 1.9937094e+07
parca_metastore_cache_id_hits_total{item_type="mapping"} 2.4295074e+07
# HELP parca_metastore_cache_id_misses_total Number of cache misses for id lookups.
# TYPE parca_metastore_cache_id_misses_total counter
parca_metastore_cache_id_misses_total{item_type="function"} 9310
parca_metastore_cache_id_misses_total{item_type="location"} 0
@paulfantom
paulfantom / log.txt
Created October 12, 2021 09:00
parca-cloning
commit 918fc52072d36319b5e4b7c064fcf05fe51eda19
Merge: fa0bea6d 86ec11dd
Author: Frederic Branczyk <fbranczyk@gmail.com>
Date: Mon Oct 11 19:19:24 2021 +0200
Merge pull request #285 from parca-dev/fix-config-parsing
Fix config parsing
commit 86ec11ddfdf7dce407eae7254914a4d0f92f69ae
@paulfantom
paulfantom / cmo-cluster-role.jsonnet
Last active June 14, 2021 11:17
One ClusterRole to rule them all
// One ClusterRole to rule them all
// one ClusterRole to find them
// One ClusterRole to bring them all
// and in the darkness bind them;
{
// This should live in https://github.com/openshift/cluster-monitoring-operator/blob/master/jsonnet/cluster-monitoring-operator.libsonnet
clusterRole: {
apiVersion: 'rbac.authorization.k8s.io/v1',
kind: 'ClusterRole',
metadata: {
@paulfantom
paulfantom / adblocklist
Last active August 16, 2020 09:40
Personal Ad block list used in thaum.xyz environments
0.0.0.0 prg.smartadserver.com
0.0.0.0 wp.hit.gemius.pl
#!/bin/bash
set -eo pipefail
GIT_MAIL="cloudalchemybot@gmail.com"
GIT_USER="cloudalchemybot"
PAYLOAD='{"title":"Synchronize Makefile.common",
"base":"master",
"head":"makefile_common",
"body":"CC: @SuperQ"}'
@paulfantom
paulfantom / build.sh
Last active August 22, 2018 18:41
OpenShift-client flatpak
#!/bin/sh
flatpak-builder client com.openshift.client.json
flatpak-builder --run client com.openshift.client.json oc version
echo "Do you want to create local flatpak repo and install package? [Y/n]"
read -r -p RSP
if [[ "$RSP" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
flatpak-builder --repo=repo --force-clean client com.openshift.client.json
flatpak --user remote-add --no-gpg-verify my-repo repo
flatpak --user install my-repo com.openshift.client
#!/usr/bin/env python
"""
Copyright (C) 2018 Pawel Krupa (@paulfantom) - All Rights Reserved
Permission to copy and modify is granted under the MIT license
Print information about next space launch
Requirements:
- python
- requests library (http://docs.python-requests.org/en/master/)