Skip to content

Instantly share code, notes, and snippets.

View m4r10k's full-sized avatar

Mario Kleinsasser m4r10k

View GitHub Profile
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
scrape_configs:
## gather metrics of prometheus itself
- job_name: prometheus
static_configs:
- targets:
- localhost:9090
## gather the metrics of json_exporter application itself
- job_name: json_exporter
---
metrics:
- name: battery
type: object
path: '{ .Body.Data.Inverters.1 }'
help: Battery Data
labels:
id: "battery"
name: "battery"
values:
AWSTemplateFormatVersion: 2010-09-09
Resources:
EventsToCentralMonitoringEventBus:
Type: 'AWS::Events::Rule'
Properties:
Description: Events-To-Central-Monitoring-EventBus
Name: Events-To-Central-Monitoring-EventBus
EventPattern:
source:
@m4r10k
m4r10k / MagnumPIChronosportView.mc
Created August 25, 2021 11:36
MagnumPI Chronosport Sea Quartz 30 Garmin Vivoactive
import Toybox.Application;
import Toybox.Graphics;
import Toybox.Lang;
import Toybox.System;
import Toybox.WatchUi;
using Toybox.Graphics as Gfx;
using Toybox.Lang as Lang;
using Toybox.Math as Math;
using Toybox.System as Sys;
'object_attributes': { 'action': 'update',
'assignee_id': 2,
'assignee_ids': [2],
'author_id': 2,
'closed_at': None,
'confidential': False,
'created_at': '2021-01-29 16:35:37 UTC',
'description': '',
'discussion_locked': None,
'due_date': None,
from flask import escape
from flask import request
import json
import requests
def gitlab_habitica_google_function(request):
"""HTTP Cloud Function.
Args:
request (flask.Request): The request object.
<https://flask.palletsprojects.com/en/1.1.x/api/#incoming-request-data>
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ (ds "data").name }}-{{ (ds "data").suffix }}
namespace: {{ (ds "data").namespace }}
spec:
replicas: {{ (ds "config").replicas }}
selector:
matchLabels:
service: {{ (ds "data").name }}-{{ (ds "data").suffix }}
#!/bin/bash
export TERM=ansi
export CUSTOMIZEPATH=kploy-customize
# Processing custom template deployment files
echo "Processing script template"
echo "--------------------------"
./gomplate -f ./run-tpl.sh -o ./run.sh -d data=../$CUSTOMIZEPATH/data.yaml
#!/bin/bash
export TERM=ansi
export BASEPATH=kploy
export CUSTOMIZEPATH=kploy-customize
# Kubernetes deploy
# Export the provided image name as IMAGE
export IMAGE=$1