Skip to content

Instantly share code, notes, and snippets.

View dnmvisser's full-sized avatar

Dick Visser dnmvisser

  • GÉANT
  • Amsterdam
View GitHub Profile
"""
Custom filters for Ansible.
Can be used by saving it (for example) as ~/.ansible/plugins/filter/filters.py
"""
def depem(string):
import re
return re.sub(r'\s+|(-----(BEGIN|END).*-----)', '', string)
@dnmvisser
dnmvisser / OphalenZonneplanPrijzen.lua
Created November 8, 2022 22:19
Domoticz dzvents script voor het ophalen van Zonneplan prijzen
-- dzvents script Instructions
-- Create the dummy hardware in Domoticz if you haven't done so already and
-- from there create two 'Custom Sensor' devices with the axis labels
-- '€/kWh' and '€/m³'. Then set the following two device ids:
local powerDeviceIdx = 48
local gasDeviceIdx = 49
return {
on = {
@dnmvisser
dnmvisser / configure-pat.sh
Last active October 18, 2019 08:53
AWS instance that provided IPv4 internet connectivity for backend hosts
#!/bin/bash
# Configure the instance to run as a Port Address Translator (PAT) to provide
# Internet connectivity to private instances.
#
#set -x
echo "Determining default interface"
IFACE=`ip -o route show default | grep default | awk '{print $5}'`
@dnmvisser
dnmvisser / configure-pat.sh
Created October 18, 2019 08:35
AWS instance that provided IPv4 internet connectivity for backend hosts
#!/bin/bash
# Configure the instance to run as a Port Address Translator (PAT) to provide
# Internet connectivity to private instances.
#
#set -x
echo "Determining default interface"
IFACE=`ip -o route show default | awk '{print $5}'`
### Keybase proof
I hereby claim:
* I am dnmvisser on github.
* I am dnmvisser (https://keybase.io/dnmvisser) on keybase.
* I have a public key ASA8k2crPtuKsY3roihxTzYj1O44-56fpdKYKTtxmUhO4wo
To claim this, I am signing this object:
@dnmvisser
dnmvisser / saml20-idp-remote.php
Last active March 19, 2019 21:48
Test metadata for SimpleSAMLphp discopower
<?php
/*
Hand picked entities from eduGAIN, with tags that correspond to the available tabs in the discopower module.
Corresponding configuration for module_discopower.php:
$config = [
'taborder' => [
'edugain',
#!/bin/bash
OLDIFS=$IFS
export IFS=$'\n'
# Find all boxes which have updates
AVAILABLE_UPDATES=$(vagrant box outdated --global | grep outdated | tr -d "*'" | cut -d ' ' -f 2 | sort | uniq 2>/dev/null)
if [[ ${#AVAILABLE_UPDATES[@]} -ne 0 ]]; then