I hereby claim:
- I am pallas on github.
- I am pallas (https://keybase.io/pallas) on keybase.
- I have a public key ASCsQ6NtBDpKhw9f2MArRunk8lTLxLjfIFaFVpzO79Pqtwo
To claim this, I am signing this object:
| // SPDX-License-Identifier: Unlicense | |
| bool global_debug = false; | |
| #define DEBUG(format, ...) do { \ | |
| if (global_debug) \ | |
| fprintf(stderr, "%s:%d %s " format "\n", __FILE__, __LINE__, __FUNCTION__, ## __VA_ARGS__); \ | |
| } while(false) |
| # SPDX-License-Identifier: Unlicense | |
| from ipaddress import IPv6Network | |
| from binascii import unhexlify | |
| network = IPv6Network("2001:DB8::/32") | |
| mac = "12:34:56:78:9a:bc" | |
| mac_bytes = b''.join(map(unhexlify, mac.split(':'))) | |
| address = network[int.from_bytes(mac_bytes, byteorder='big')] | |
| print(network, mac, mac_bytes, address) |
| #!/bin/bash | |
| # Author: Derrick Pallas | |
| # License: zlib | |
| BASE='dblock-set' | |
| TEMP=${BASE}$$ | |
| ipset create -exist "$BASE" hash:ip --netmask 24 || exit 1 | |
| iptables -nL INPUT | grep -q "$BASE" || | |
| ( | |
| ( iptables -N "$BASE" || iptables -F "$BASE" ) && |
| #!/bin/bash | |
| # Author: Derrick Pallas | |
| # License: zlib | |
| BASE='feodo-set' | |
| TEMP=${BASE}$$ | |
| ipset create -exist "$BASE" hash:ip --netmask 32 || exit 1 | |
| iptables -nL INPUT | grep -q "$BASE" || | |
| ( | |
| ( iptables -N "$BASE" || iptables -F "$BASE" ) && |
| #!/bin/bash | |
| # SPDX-License-Identifier: Unlicense | |
| # Author: Derrick Lyndon Pallas <[email protected]> | |
| [ $# -gt 0 ] && | |
| exec gdb "$1" --return-child-result --silent --batch \ | |
| --ex "run $([ $# -gt 1 ] && printf "'%s' " "${@:2}")" \ | |
| --ex "thread apply all bt" \ | |
| 2>/dev/null | |
| # |
| BASE?=/etc/letsencrypt | |
| DOMAIN?=mx.example.com | |
| DHBITS:=4096 | |
| LIVE:=$(BASE)/live/$(DOMAIN) | |
| PRIVKEY:=$(LIVE)/privkey.pem | |
| FULLCHAIN:=$(LIVE)/fullchain.pem | |
| .PHONY: default |
| #ifndef TRY_H | |
| #define TRY_H | |
| #include <cstdio> | |
| #include <cstring> | |
| #include <stdexcept> | |
| #include <errno.h> | |
| #define TRY(f, ...) ({ \ |
| #include <cstdint> | |
| template <typename T> | |
| inline T magic_mask(int_fast8_t n) { | |
| T base = T(1)<<(int_fast16_t(1)<<n); | |
| return (~T(0))/(base*base-1)*(base-1); | |
| } |
I hereby claim:
To claim this, I am signing this object:
| // All rights reserved, | |
| // Derrick Pallas | |
| // License: zlib | |
| #ifndef INTRUSIVE_TREE_H | |
| #define INTRUSIVE_TREE_H | |
| #include <cassert> | |
| #include <cstddef> | |
| #include <algorithm> |