Skip to content

Instantly share code, notes, and snippets.

@MartinBrugnara
MartinBrugnara / doc.txt
Last active April 10, 2025 00:17
DigitalOcean, assign public ipv6 to wireguard clients
# /etc/sysctl.d/wireguard.conf
net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.default.forwarding=1
net.ipv6.conf.eth0.proxy_ndp=1
#/etc/wireguard/wg0.conf (DO virtual machine)
[Interface]
# The server interface does not actually need an ipv6.
# The 2 following must be repeated for each used addres [0, 1]
from flask import current_app
class FeatureFlags(object):
def __init__(self, app=None):
if app is not None:
self.init_app(app)
def init_app(self, app):
@micahhausler
micahhausler / packages.sls
Created September 9, 2013 17:49
Postgres 9.3 packages salt state
#!yaml
#
# Postgres 9.3 packages salt state
#
# Created 9/9/13
#
# author: Micah Hausler, [email protected]
postgres-pkgs:
pkg:
@aschreyer
aschreyer / blueprint-converter.py
Created July 9, 2012 19:43
Adding custom URL map converters to Flask Blueprint objects
from flask import Blueprint
import converters # module containing the custom converter classes
def add_app_url_map_converter(self, func, name=None):
"""
Register a custom URL map converters, available application wide.
:param name: the optional name of the filter, otherwise the function name
will be used.
"""