Skip to content

Instantly share code, notes, and snippets.

@dmtucker
dmtucker / ipv6-erl.md
Last active April 13, 2024 15:58
Configuring IPv6 on EdgeRouter Lite

Configuring IPv6 on EdgeRouter Lite

Tested with:

  • v1.9.7+hotfix.4, Wave G in Seattle
  • v1.10.5, Comcast in the South Bay Area
set interfaces ethernet eth0 description LAN
set interfaces ethernet eth1 description WAN
set interfaces ethernet eth2 description WLAN
@dmtucker
dmtucker / dynv6-update-host.bash
Last active October 23, 2023 07:00 — forked from corny/dynv6.sh
Update script for dynv6.com to set your IPv6 address
#!/usr/bin/env bash
update_via_http () {
if [ -z "${token+undefined}" ] || [ "$#" != 2 ]
then
echo 'usage: token=<your-HTTP-token> update_via_http zone ipv6' 1>&2
exit 1
fi
zone="$1"
ipv6="$2"
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=141323
@dmtucker
dmtucker / projects.md
Last active January 30, 2022 09:00
Projects
LTS
Stage Group Project Services
dmtucker

say we claim support for >=1, <3

  • 1.0 is the first supported version.
    • if this isn't tested, features from later versions may be depended on that break compatibility with this version.
  • 1.x adds to it.
    • test the latest version available to detect new features that collide (e.g. variables named async are fine in python 3.6 but async becomes a keyword in python 3.7).
      • only the latest version needs to be tested because features cannot be removed without a major version bump.
    • if something breaks, either
      • a new feature collided with existing code
      • upstream did not follow semver and broke compatibility
  • existing code uses upstream code that is not part of the public API
@dmtucker
dmtucker / 1.17
Last active April 25, 2020 04:07
What's up with Python 1.17 in the PyPI stats database?
$ python3 sep.py
different: cp037 b'a'
different: cp273 b'a'
different: cp424 b'a'
different: cp500 b'a'
different: cp875 b'a'
different: cp1026 b'a'
different: cp1140 b'a'
untested: cp65001
different: utf_32 b'\xff\xfe\x00\x00/\x00\x00\x00'
import os
import py
def _relpath(path, *, relto):
# TODO py35+ commonpath = os.path.commonpath([path, relto])
commonpath = str(py.path.local(path).common(py.path.local(relto)))
def _commonpath_to(_path):
return _path[len(commonpath):].strip(os.path.sep)
why doesn't it make sense to mix strings and bytes in path components with posixpath.join? this Q is really only for py2 since 3 does away with implicit conversions, but the unicode could be encoded and the join would succeed. even if that results in a multi-encoding str, I've been told, that's ok in POSIX