This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TLS and other security settings for Traefik. | |
# | |
# https://twitter.com/wbolster/status/1361813865303056386 | |
# | |
# At the time of writing (2021-02), this results in | |
# an A+ rating from Qualys SSL Labs. See | |
# https://www.ssllabs.com/ssltest/ for details. | |
# | |
# Note: these settings are for the *dynamic* configuration! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
try: | |
# Python 3 | |
from functools import reduce | |
STRING_TYPE = str | |
except ImportError: | |
# Python 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This is joke^Wenterprise code ab^H^Husing the ‘@’ operator to simulate | |
applying multiple decorators on a single line of code. | |
""" | |
# © 2022 wouter bolsterlee, licensed under SPDX BSD-3-Clause | |
import functools | |
# helper class and the magic ‘@stacked’ decorator itself |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Text manıṗulatıȯn tool to move dots above letters to another ṗosıṫıon. | |
""" | |
import operator | |
import random | |
import re | |
import unicodedata | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Dirty tricks to automatically inject keyword arguments from the caller's scope. | |
""" | |
import functools | |
import inspect | |
import sys | |
def auto_inject_kwargs(f): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Preferences" | |
activate | |
set current pane to pane "Accessibility" | |
end tell | |
tell application "System Events" | |
tell process "System Preferences" | |
click checkbox "Use grayscale" of window 1 | |
end tell | |
end tell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import logging | |
import random | |
import time | |
import happybase | |
logging.basicConfig() | |
logger = logging.getLogger() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import collections | |
class attrify: | |
def __init__(self, d): | |
object.__setattr__(self, 'd', d) | |
def __getattribute__(self, name): | |
if name == '__dict__': | |
return object.__getattribute__(self, 'd') |

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moved to https://github.com/wbolster/qualname |
NewerOlder