Skip to content

Instantly share code, notes, and snippets.

View digitalresistor's full-sized avatar
🔒
ALL THE THINGS!

Delta Regeer digitalresistor

🔒
ALL THE THINGS!
  • ::1
View GitHub Profile

Keybase proof

I hereby claim:

  • I am digitalresistor on github.
  • I am deltaregeer (https://keybase.io/deltaregeer) on keybase.
  • I have a public key ASB8-jhf-jqsvrUG4FPTWQ3zj2qD9eyAZJDe7huBstzA-Qo

To claim this, I am signing this object:

@digitalresistor
digitalresistor / apple-font-license.txt
Created January 20, 2022 22:56
Apple Font license
APPLE INC.
LICENSE AGREEMENT FOR THE APPLE SF MONO FONT
For iOS, iPadOS, macOS, tvOS and watchOS application uses only
PLEASE READ THIS SOFTWARE LICENSE AGREEMENT (“LICENSE”) CAREFULLY BEFORE USING THE APPLE SF MONO FONT (DEFINED BELOW). BY USING THE APPLE FONT, YOU ARE AGREEING TO BE BOUND BY THE TERMS OF THIS LICENSE. IF YOU ARE ACCESSING THE APPLE FONT ELECTRONICALLY, SIGNIFY YOUR AGREEMENT TO BE BOUND BY THE TERMS OF THIS LICENSE BY CLICKING THE “AGREE” BUTTON. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE, DO NOT USE THE APPLE FONT AND CLICK “DISAGREE”.
IMPORTANT NOTE: THE APPLE SF MONO FONT IS TO BE USED SOLELY FOR CREATING MOCK-UPS OF USER INTERFACES TO BE USED IN SOFTWARE PRODUCTS RUNNING ON APPLE’S iOS, iPadOS, macOS, tvOS OR watchOS OPERATING SYSTEMS, AS APPLICABLE.
1. General.
A. The Apple font, interfaces, content, data, and other materials accompanying this License, whether on disk, print or electronic documentation, in read only memory, or any other media or in any other form, (collective
Host *
IdentityFile ~/.ssh/id_ed25519
IdentityFile ~/.ssh/id_rsa
AddKeysToAgent yes
UseKeychain yes
GSSAPIAuthentication no
ServerAliveInterval 30
ServerAliveCountMax 2
@digitalresistor
digitalresistor / freeport.py
Created February 13, 2019 21:49
Pytest fixture to find a free port to pass to a function that is about to bind but can't be given port 0 (because it's got a stupid API that checks for port != 0) and you run a lot of concurrent tests that can't all bind to the same port!
@pytest.fixture(scope="session")
def find_free_port():
"""
Returns a factory that finds the next free port that is available on the OS
This is a bit of a hack, it does this by creating a new socket, and calling
bind with the 0 port. The operating system will assign a brand new port,
which we can find out using getsockname(). Once we have the new port
information we close the socket thereby returning it to the free pool.
This means it is technically possible for this function to return the same
port twice (for example if run in very quick succession), however operating
@digitalresistor
digitalresistor / openzwave-hassbian.sh
Created January 8, 2018 02:32 — forked from Landrash/openzwave-hassbian.sh
Install script for openzwave for hassbian
#!/bin/bash
# Install by running:
# wget -Nnv https://gist.githubusercontent.com/Landrash/8afefca92bfb96c294b5501fc52f4cbc/raw/89ff001897859d70776d9b13e364a9dacc3861a9/openzwave-hassbian.sh && sudo bash openzwave-hassbian.sh
echo "Open Z-Wave Installer for Hassbian"
echo "Copyright(c) 2016 Dale Higgs <https://gitter.im/dale3h>"
echo
echo "Running apt-get preparation"
def myfunc():
"""
>>> print(myfunc())
some text
<BLANKLINE>
not blank
"""
l = ['some text', '', 'not blank']
return '\r\n'.join(l)
@digitalresistor
digitalresistor / dhcp6c.conf
Created July 21, 2016 02:05
Comcast dhcp6c config to pull a /60 prefix delegation
interface sk1 {
send ia-pd 0;
send ia-pd 1;
send ia-na 1;
};
id-assoc pd 0 {
prefix ::/64 infinity;
prefix-interface sk0 {
@digitalresistor
digitalresistor / py35.py
Created June 12, 2016 01:08
Python 3.5 does not support IPv6 link-local with zone-indices
Python 3.5.0 (default, Oct 3 2015, 21:47:52)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ipaddress
>>> ipaddress.ip_address('fe80::aa20:66ff:fe3a:fa79%en0')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/xistence/.pyenv/versions/3.5.0/lib/python3.5/ipaddress.py", line 54, in ip_address
address)
ValueError: 'fe80::aa20:66ff:fe3a:fa79%en0' does not appear to be an IPv4 or IPv6 address
@digitalresistor
digitalresistor / email_headers.txt
Created January 26, 2016 07:00
BoA 512-bit DKIM, valid email?
Return-Path: <survey@feedback.bankofamerica.com>
Delivered-To: nobody@0x58.com
Received: from butler.0x58.com
by butler.0x58.com (Dovecot) with LMTP id vlTLIwsSp1bcQwEAeravvw
for <nobody@0x58.com>; Mon, 25 Jan 2016 23:28:27 -0700
X-Spam-Flag: NO
X-Spam-Score: -7.298
X-Spam-Level:
X-Spam-Status: No, score=-7.298 tagged_above=-99 required=5
tests=[HTML_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=0.001,
@digitalresistor
digitalresistor / main.js
Created December 4, 2015 17:20
redux-router with onEnter
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { applyMiddleware, compose, createStore } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import { createHistory } from 'history';
import { IndexRoute, Route } from 'react-router';