This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
- title: Energi | |
id: energi | |
icon: mdi:home-lightning-bolt-outline | |
cards: | |
- type: energy-date-selection | |
- type: vertical-stack | |
cards: | |
- type: energy-usage-graph | |
- type: gauge | |
name: Aktuell förbrukning |
This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""dump gsettings""" | |
from __future__ import print_function | |
from subprocess import check_output | |
def get_schemas(): | |
output = check_output(['gsettings', 'list-schemas']) | |
schemas = output.split('\n') |
# The various ${var.foo} come from variables.tf | |
# Specify the provider and access details | |
provider "aws" { | |
region = "${var.aws_region}" | |
access_key = "${var.aws_access_key}" | |
secret_key = "${var.aws_secret_key}" | |
} | |
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source. | |
# Will include all hosts the playbook is run on. | |
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html | |
- name: "Build hosts file" | |
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present | |
when: hostvars[item].ansible_default_ipv4.address is defined | |
with_items: groups['all'] |
#!/usr/bin/env python | |
"""Simple script to merge multiple RRD files together. | |
Accepts any number of RRD file names as arguments. Produces an "rrdtool dump" | |
style file on stdout. The last RRD file should have a slot for every possible | |
record in the resulting merged RRD. | |
Run something like: | |
$ python simple-merge-rrd.py filea.rrd fileb.rrd filec.rrd | \ |