mkdir -p /srv/doh-proxy/git /srv/doh-proxy/venv
python3 -mvirtualenv /srv/doh-proxy/venv
# Fork of https://github.com/facebookexperimental/doh-proxy - functionality additions
git clone https://github.com/rfinnie/doh-proxy /srv/doh-proxy/git/doh-proxy
# Fork of https://github.com/decentfox/aioh2 - Python 3.6/3.8 fixes
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 datetime | |
def http_date(dt=None): | |
"""Return an RFC 7231 HTTP date formatted string | |
Input may be an epoch timestamp, or datetime object. | |
If a naive datetime object, it must be in GMT already. | |
If not specified, now is assumed. | |
""" | |
if dt is None: |
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
# smwrand | |
# Ryan Finnie <[email protected]> | |
# Based on deconstruction by Retro Game Mechanics Explained | |
# https://www.youtube.com/watch?v=q15yNrJHOak | |
class SMWRand: | |
seed_1 = 0 | |
seed_2 = 0 | |
def _rand(self): |
vanityhash has become an accidental benchmark.
git clone https://github.com/rfinnie/vanityhash
vanityhash/vanityhash benchmark
- Benchmark mode takes 60 seconds to complete.
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/python3 | |
import os | |
import glob | |
TARGET_SIZE = (1024**4) * 3 | |
COLLECTION_CONFIGS = { | |
'cam1': { | |
'glob': '/media/camera/streams/cam1/cam1_*.mp4', | |
'weight': 0.2, |
I hereby claim:
- I am rfinnie on github.
- I am rfinnie (https://keybase.io/rfinnie) on keybase.
- I have a public key whose fingerprint is 42E2 C8DE 8C17 3AB1 02F5 2C6E 7E60 A3A6 86AE 8D98
To claim this, I am signing this object:
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 python3 | |
# auto_pager.py | |
# Copyright (C) 2018 Ryan Finnie | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# |
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 python3 | |
import socketserver | |
import socket | |
import time | |
import struct | |
class MCastUDPServer(socketserver.UDPServer): | |
# Usage: |
NewerOlder