Skip to content

Instantly share code, notes, and snippets.

View Ikke's full-sized avatar

Kevin Daudt Ikke

  • Netherlands
  • 09:08 (UTC +02:00)
View GitHub Profile
@Ikke
Ikke / _README.md
Created August 6, 2022 21:04
Docker + traefik + ipv6

IPv6 via traefik in docker

This adds an additional network to the traefik container with a public IPv6 network attached to it. Docker will automatically assign a free address to the traefik container from the IPv6 subnet

Internally traefik will still forward traefik over an IPv4 network

Note that, because docker does not do any NAT for IPv6 or proxying, and this uses publically routable IPv6 addresses, traffic directly reaches the containers, unless you block it with a firewall. For 80/443, you actually want this to happen though.

@Ikke
Ikke / brand.conf.php
Last active October 27, 2020 11:26
Zabbix branding configuration
<?php
//PHP5.6+
return [
'BRAND_HELP_URL' => '',
'BRAND_LOGO' => '',
'BRAND_FOOTER' => '',
];
@Ikke
Ikke / ruby.vim
Created January 24, 2019 09:11
Ruby heredoc syntax highlighting
let s:bcs = b:current_syntax
unlet b:current_syntax
syntax include @SQL syntax/sql.vim
unlet b:current_syntax
syntax include @SHELL syntax/sh.vim
unlet b:current_syntax
syntax include @CONF syntax/conf.vim
@Ikke
Ikke / sync_files.sh
Last active October 18, 2018 14:47
Devops scripts
#!/bin/bash
source $PWD/.sync_settings
if [[ -z "$SYNC_HOST" ]]; then
echo "Please specify SYNC_HOST in .sync_settings"
exit 1
fi
if [[ -z "$SYNC_HOST" ]]; then
@Ikke
Ikke / fix-python37.patch
Created August 12, 2018 11:31
Solaar 0.9.2 patch to support python 3.7
diff --git a/lib/solaar/ui/__init__.py b/lib/solaar/ui/__init__.py
index 5a0340e..80441f5 100644
--- a/lib/solaar/ui/__init__.py
+++ b/lib/solaar/ui/__init__.py
@@ -123,7 +123,7 @@ _queue_processor.start()
del Thread
-def async(function, *args, **kwargs):
+def ui_async(function, *args, **kwargs):
#!/bin/bash
site=$(basename $0)
google-chrome-stable --app="https://$site"
#!/bin/bash
file=$1
# Ignore the command this script was run with to prevent infiniute recursion
editor=$(which -a $EDITOR | grep -v $0 | head -n1)
if test -z "$CURRENT_UID"; then
export CURRENT_UID=$UID
fi
ip prefix-list deny-loopback permit 192.168.0.0/16 le 31
ip prefix-list deny-loopback deny 192.168.0.0/16 ge 32
route-map EBGP
match ip address prefix-list deny-loopback
router bgp 65001
!...
! Does not seem to work
redistribute connected route-map EBGP
@Ikke
Ikke / check_crt.py
Last active September 10, 2017 11:05
#!/bin/env python3
import sys
import os
import time
import datetime
from sh import openssl
from datetime import datetime as dt
if len(sys.argv) < 2:
@Ikke
Ikke / write_stats.py
Created March 29, 2017 20:25
Write stats to redis
#!/bin/python
import redis
import sys
import datetime as DT
class Stat:
@staticmethod
def store_new_stat(r, stat):
p = r.pipeline()