Skip to content

Instantly share code, notes, and snippets.

View jimangel's full-sized avatar
🌤️
around

Jim Angel jimangel

🌤️
around
View GitHub Profile
@jimangel
jimangel / update_device_areas.py
Created April 12, 2024 20:11 — forked from rnorth/update_device_areas.py
Home Assistant pyscript to mass-update device areas
import homeassistant
@service
def update_device_areas():
devreg = homeassistant.helpers.device_registry.async_get(hass)
entreg = homeassistant.helpers.entity_registry.async_get(hass)
areareg = homeassistant.helpers.area_registry.async_get(hass)
area_ids = []
@jimangel
jimangel / readme.md
Created March 27, 2024 19:42
Cool Dockerfile build CI pipeline using GitHub Actions

From: https://github.com/firepress-org/rclone-in-docker/blob/master/.github/workflows/ci_dockerfile_is_master.yml

# The beauty of this CI setup is that it will build any valid DOCKERFILE by setting a few variables.
# See how at https://github.com/firepress-org/rclone-in-docker/blob/master/README-CI.md
# Requires secrets on github: DOCKERHUB_PASSWORD, TOKEN_SLACK
# Update DOCKERFILE_NAME if you are using a special Dockerfile name
# The way we define variables is a hack. See why: https://bit.ly/2ZEAt6u
#
# GNU v3 | Please credit the author if you are re-using some of it :-p
@jimangel
jimangel / README.md
Last active December 29, 2023 05:21
Home Assistant with ecowitt: HTTP to HTTPS nginx reverse proxy secure DIY solution

Home Assistant with ecowitt: HTTP to HTTPS nginx reverse proxy secure DIY solution

Shoutout @del13r for posting a great tutorial on the community forum and indepth feedback on GitHub issues.

Problem

Ecowitt can only send stats to HTTP API endpoints and we want to keep our Home Assistant secure via HTTP/s access only.

Resolution

@jimangel
jimangel / autoinstall_config.yaml
Created November 20, 2022 21:26
VMware ISO Ubuntu 22.04 LTS Autoinstall
#cloud-config
autoinstall:
version: 1
ssh:
install-server: true
# option "allow-pw" defaults to `true` if authorized_keys is empty, `false` otherwise.
allow-pw: false
# "[late-commands] are run in the installer environment with the installed system mounted at /target."
@jimangel
jimangel / google-artif.md
Last active October 21, 2022 01:36
Google Cloud Artifact Registry: Kubernetes v1.24.0
@jimangel
jimangel / readme.md
Last active April 19, 2022 19:08
Change kubelet / docker cgroup driver

Fixes errors in Kubernetes v1.22+:

  • kubelet cgroup driver: \"cgroupfs\" is different from docker cgroup driver: \"systemd\""
  • kubelet cgroup driver: \"systemd\" is different from docker cgroup driver: \"cgroupfs\""

By setting both to use systemd as preferred by kubeadm.

Kubeadm: remove the automatic detection and matching of cgroup drivers for Docker. For new clusters if you have not configured the cgroup driver explicitly you might get a failure in the kubelet on driver mismatch (kubeadm clusters should be using the systemd driver). Also remove the IsDockerSystemdCheck preflight check (warning) that checks if the Docker cgroup driver is set to systemd. Ideally such detection / coordination should be on the side of CRI implementers and the kubelet. Please see the page on [how to configure cgroup drivers](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/

@jimangel
jimangel / README.md
Last active April 24, 2024 19:13
Enable audit logging on a kind cluster

Enable auditing on KinD

TODO

  • Use a webhook vs. file backend (maybe cloudrun?)
  • This might only be possible if Docker is running as root - need to test

Config

Make a temporary directory to host files to be mounted in KinD.

@jimangel
jimangel / readme.md
Last active June 15, 2021 03:13
k8s-docs-pr-botherer
@jimangel
jimangel / readme.md
Created September 15, 2020 19:40
VMs with side channel mitigations enabled may exhibit performance degradation (79832)

https://kb.vmware.com/s/article/79832 has a pretty useless resolution...

Symptoms

VMs that have side channel mitigations enabled while running on Fusion on Mac OS 11.0 or later or on Workstation on Windows hosts with virtualization based security enabled may run slowly.

Cause

The root cause of the performance degradation is most likely due to mitigations for side channel attacks such as Spectre and Meltdown. Side channel attacks allow unauthorized read access by malicious processes or virtual machines to the contents of protected kernel or host memory. CPU vendors have introduced a number of features to protect data against this class of attacks such as indirect branch prediction barriers, single thread indirect branch predictor mode, indirect branch restricted speculation mode and L1 data cache flushing. While these features are effective at preventing side channel attacks they can cause noticeable performance degradation in some cases.

Resolution

Right click the VM > Settings... > Options [tab

@jimangel
jimangel / readme.md
Last active August 1, 2020 23:32
wrangler commands
/language en
/label tide/merge-method-squash
/lgtm
/approve

/retitle [WIP] <TITLE>

is:pr is:open -label:"do-not-merge/work-in-progress" -label:"do-not-merge/invalid-commit-message" -label:"do-not-merge/hold" -label:"language/en" -label:"language/it" -label:"language/zh"  -label:"language/ru" -label:"language/ko" -label:"language/vi" -label:"language/de" -label:"language/es" -label:"language/ja" -label:"language/id"  -label:"language/fr" -label:"language/hi" -label:"language/pt"