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/python3 | |
# calculate average bytes per label pair for a given metric | |
def calculate_average_bytes_per_label_pair(metric_string): | |
# Splitting the metric string into label pairs | |
label_pairs = metric_string.split(", ") | |
# Calculating the total bytes | |
total_bytes = sum(len(pair) for pair in label_pairs) |
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
{ | |
"__inputs": [ | |
{ | |
"name": "DS_PROMETHEUS", | |
"label": "Prometheus", | |
"description": "", | |
"type": "datasource", | |
"pluginId": "prometheus", | |
"pluginName": "Prometheus" | |
} |
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
#!/bin/sh | |
API="https://api.kraken.com/0/public/Ticker" | |
quote=$(curl -sf $API?pair=BTCUSD | jq -r ".result.XXBTZUSD.c[0]") | |
quote=$(LANG=C printf "%.2f" "$quote") | |
echo " \$$quote " |
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
#!/bin/bash | |
btcprice=$(/home/<your user>/.config/polybar/scripts/coinbash.sh -l btc | grep "BTC" | cut -c 24-32) | |
echo " \$$btcprice" | |
# NOTE: credit for coinbash.sh here | |
# https://github.com/8go/coinbash | |
# MUST get coinmarketcap API key - free |
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
#!/bin/bash | |
# made by Will Bollock, CCI HelpDesk | |
# mysql root user/pass for account creation | |
rootuser= | |
rootpasswd= | |
informationFile=Torch_Account_Information.txt | |
# master file that is copied to $user's home | |
# make an HTML template here | |
# html email template here |