This file contains 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
r, w = os.pipe2(os.O_NONBLOCK) | |
with open(Path("/proc/{pid}/fd/{fd}".format(pid=os.getpid(), fd=w)), "wb") as script: | |
script.write("""#!/usr/bin/env bash | |
bash -c "/opt/netcrave/bin/dockerd \ | |
--config-file /etc/netcrave/_netcrave.json \ | |
" \ | |
exit ; true | |
""".encode("utf-8", "strict")) | |
This file contains 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
distinct_networks = [index for index, _ in groupby([ | |
index for index in dotenv.keys() | |
if index.endswith("_NET_4") | |
or index.endswith("_NET_6")], | |
key=lambda k: re.match("^[^_]+(?=_)", k).group())] | |
net_zip = zip( | |
[index for index in range(128, 128 + (len(distinct_networks) * 2)) if index % 2 == 0], | |
[index for index in range(128, 128 + (len(distinct_networks) * 2)) if ind |
This file contains 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
nft flush ruleset | |
nft add table inet filter | |
nft add set inet filter icmp_egress_meter4 '{ type ipv4_addr; size 8; flags timeout, dynamic; }' | |
nft add set inet filter icmp_egress_meter6 '{ type ipv6_addr; size 8; flags timeout, dynamic; }' | |
nft add map inet filter drop_bogons4 '{ type ipv4_addr : verdict; flags interval; }' | |
nft add element inet filter drop_bogons4 '{ 224.0.0.0/4 : continue }' | |
nft add element inet filter drop_bogons4 '{ 192.168.0.0/16 : continue }' |
This file contains 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
for x in $(curl -L -k -s http://www.textfiles.com/artscene/ansi/bbs/ | tr ' ' '\n' | grep HREF | tr '"' ' ' | awk '{print $2}' | grep -P "(ans|vt)" | grep -v ".png" | grep "." | shuf); do | |
#echo $x | |
curl -L -k -s http://www.textfiles.com/artscene/ansi/bbs/$x | iconv -f 437 -t utf-8 | pv -q -L 600 | |
done |
This file contains 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
# set PATH so it includes user's private bin if it exists | |
if [ -d "$HOME/bin" ] ; then | |
PATH="$HOME/bin:$PATH" | |
fi | |
export USE_CCACHE=1 | |
export CCACHE_EXEC=/usr/bin/ccache | |
ccache -M 50G |
This file contains 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
[ 751.738319] hid_xpadneo: loading out-of-tree module taints kernel. | |
[ 751.738631] loaded hid-xpadneo v0.9-144-g9b3b696 | |
[ 760.908133] xpadneo 0005:045E:0B13.0009: BLE firmware version 5.01, please upgrade for better stability | |
[ 760.908137] xpadneo 0005:045E:0B13.0009: pretending XB1S Windows wireless mode (changed PID from 0x0B13 to 0x028E) | |
[ 760.908138] xpadneo 0005:045E:0B13.0009: working around wrong SDL2 mappings (changed version from 0x00000501 to 0x00001130) | |
[ 760.908140] xpadneo 0005:045E:0B13.0009: report descriptor size: 283 bytes | |
[ 760.908141] xpadneo 0005:045E:0B13.0009: fixing up Rx axis | |
[ 760.908141] xpadneo 0005:045E:0B13.0009: fixing up Ry axis | |
[ 760.908142] xpadneo 0005:045E:0B13.0009: fixing up Z axis | |
[ 760.908143] xpadneo 0005:045E:0B13.0009: fixing up Rz axis |
This file contains 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
option domain-name "mydomain.tld"; | |
option domain-name-servers 192.0.2.14; | |
subnet 198.18.0.0 netmask 255.255.254.0 { | |
option routers 198.18.1.0; | |
range 198.18.0.1 198.18.1.254; | |
host mc { | |
hardware ethernet 52:54:00:ed:7a:b6; |
OlderNewer