Skip to content

Instantly share code, notes, and snippets.

View iFloris's full-sized avatar

Floris van Lint iFloris

View GitHub Profile
@nelsonblaha
nelsonblaha / wetness.yaml
Created August 18, 2021 20:16
Home Assistant Automations to update input_number.lawn_wetness
- id: '1511485012754'
alias: Update Lawn Wetness Rain
trigger:
- platform: state
entity_id: sensor.openweathermap_rain
- platform: state
entity_id: sensor.openweathermap_forecast_precipitation
condition: []
action:
- data_template:
17 maart 2021
Rechts 65
VVD 34
PVV 17
FvD 8
JA21 3
SGP 3
Links 41
SP 9
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@birnbuazn
birnbuazn / housekeeping_images.sh
Last active February 23, 2024 19:12 — forked from DaanGeurts/housekeeping_images.sh
Deleting unused images from Google Container Registry, leaving x number left
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@hazcod
hazcod / cloudbuild.yaml
Last active May 13, 2020 11:27
Clean container registry images in Google Cloud Build step.
substitutions:
_IMG_KEEP: "3"
steps:
- name: 'gcr.io/cloud-builders/gcloud-slim'
entrypoint: 'bash'
args:
- '-c'
@DaanGeurts
DaanGeurts / housekeeping_images.sh
Created June 20, 2019 11:11
Deleting unused images from Google Container Registry, leaving x number left
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@arturmartins
arturmartins / mac-upgrade.sh
Last active March 7, 2024 03:09
How to keep your mac software updated easily (2023)
#!/bin/bash
# Requirements:
# - homebrew: https://brew.sh/
# - homebrew tap: buo/cask-upgrade - https://github.com/buo/homebrew-cask-upgrade
# - homebrew mas (Mac App Store command-line interface - https://github.com/mas-cli/mas)
BREWFILE="${HOME}/Brewfile"
# Update, upgrade all and cleanup
brew update && brew upgrade && brew cu --all --yes --cleanup && mas upgrade && brew cleanup
@ispiropoulos
ispiropoulos / shelly.py
Created August 28, 2018 09:16
Shelly Switch Home Assistant Component
"""
Support for The Shelly Wifi switch.
Save this file inside ".homeassistant/custom_components/switch" (create the folders if not present) and restart HASS.
usage example:
switch:
- platform: shelly
switches:

Running Minikube via LXD

I make some assumptions, and make no claims in how well supported this is or ever will be. I wanted to avoid using VMs because i've been working in containers for the last half decade. It made sense to just skip the middle man and use a machine type container system to run my minikube workloads.

Why not juju?

Simply put, Juju does a fantastic job; but to stay objective I wanted to achieve minikube in LXD as a functional alternative to juju deploy kubernetes-core, or using KVM/VirtualBox in this solution.

@ahmetb
ahmetb / gcrgc.sh
Last active February 26, 2024 09:14
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software