Skip to content

Instantly share code, notes, and snippets.

View iFloris's full-sized avatar

Floris van Lint iFloris

View GitHub Profile
## GUAC INSTALL
yum update
yum install docker
systemctl start docker.service
docker run --name docker-postgres -v /some/path/on/host:/var/lib/postgresql/data -e POSTGRES_PASSWORD=PASSWORD_HERE -d postgres
docker run --rm glyptodon/guacamole /opt/guacamole/bin/initdb.sh --postgres > initdb.sql
docker run -it --link docker-postgres:postgres --rm postgres sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres'
# Enter your postgresql password from line 5
CREATE DATABASE guacamole_db;
\q
@hoerup
hoerup / xo-installer.sh
Created March 29, 2016 07:09
Install Script for Xen Orchestra
#!/bin/bash
# Note: this script works on debian 7/wheezy and debian 8/jessie
#
# If running on a raspberry 1(A/B) raspian/wheezy - downgrade node.js to 5.4.0
# Please note that raspian/wheezy for arm defaults to gcc 4.6
# gcc 4.7 is needed for compiling node-js modules
BRANCH=master
@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:
@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'
17 maart 2021
Rechts 65
VVD 34
PVV 17
FvD 8
JA21 3
SGP 3
Links 41
SP 9
@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:
@pklaus
pklaus / ddns.py
Last active September 17, 2021 12:42
A script to update the A and AAAA RRs of HOSTNAME on a DNS server according to your current external IP address using nsupdate / TSIG. This script is tested to run on Mac OS X (10.8-10.9) but you should be able to get it up and running in almost no time on any Unix or Linux system that ships nsupdate. I use this script to update my own DDNS serv…
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Written on 2013-02-04 by Philipp Klaus <philipp.l.klaus →AT→ web.de>.
Check <https://gist.github.com/4707775> for newer versions.
Uses dnspython: install with `pip install dnspython3`
"""
@fduran
fduran / gist:1870429
Created February 20, 2012 18:15
Linux disk space email alert
#!/bin/bash
# www.fduran.com
# script that will send an email to EMAIL when disk use in partition PART is bigger than %MAX
# adapt these 3 parameters to your case
MAX=95
EMAIL=alert@example.com
PART=sda1
USE=`df -h |grep $PART | awk '{ print $5 }' | cut -d'%' -f1`
if [ $USE -gt $MAX ]; then
@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

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.