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
#!/usr/bin/env python | |
# download the current Amazon AWS list of netblocks and dump it into | |
# two files, one each for IPv4 and IPv6. The result can be imported | |
# into firewalld ipsets using --add-entries-from-file | |
import requests | |
ipv4_filename = 'AmazonAWS_ipv4.zone' | |
ipv6_filename = 'AmazonAWS_ipv6.zone' |
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
@rem build all variants needed of Boost library | |
@rem debug/release, static/dynamic CRT linkage, 32/64 bit | |
@rem vc10/vc12/vc14/vc141/vc142 | |
@rem run from %boost_root% directory | |
pushd %boost_root% | |
call .\bootstrap.bat --without-python | |
@rem Visual Studio 2019 |
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
@rem build all variations for VC16 | |
@rem if running on 32 bit, we need to use the cross compiler for 64 bit | |
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set "OSWIDTH=32BIT" || set "OSWIDTH=64BIT" | |
if "%OSWIDTH%"=="32BIT" set VSAMD64=x86_amd64 | |
if "%OSWIDTH%"=="64BIT" set VSAMD64=amd64 | |
if "%OSWIDTH%"=="" exit /B 1 | |
@echo using %VSAMD64% for 64 bit builds |
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
#!/usr/bin/env python | |
# See http://www.ipdeny.com/ipblocks/ | |
# allow function-like print when using Python 2 | |
from __future__ import print_function | |
import argparse | |
import requests | |
import io |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use JSON; | |
use experimental qw(switch); | |
my %leases; | |
my %current_lease; | |
my $current_lease_ip; |
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
#!/usr/bin/perl -T -w | |
# dump current fail2ban bans for all jails in jail order, for use in | |
# daily emailed reports | |
use strict; | |
use DBI; | |
sub formatBantime { | |
my $banDurationSeconds = $_[0]; |
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
import copy | |
import time | |
import Adafruit_CharLCD as LCD | |
ifstats = { | |
"eth0": { "tx": 0, "rx": 0 }, | |
"eth1": { "tx": 0, "rx": 0 } | |
} | |
ifnames = [ "eth0", "eth1" ] |
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
#!/usr/bin/env python3 | |
""" Convert a list of records from iptoasn.com to a firewalld ipset XML file. | |
Download https://iptoasn.com/data/ip2asn-v4.tsv.gz, uncompress, filter | |
with grep, and feed to this script to generate a file to place in | |
/etc/firewalld/ipsets for use in firewall rules. | |
Example: | |
wget -q -O - https://iptoasn.com/data/ip2asn-v4.tsv.gz | \ |
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
Minimal steps to publish a World of Warcraft addon for use by multiple addon updaters. | |
Start by installing a simple GitHub "workflow". This describes a | |
GitHub action that will be invoked when you push an annotated tag to | |
your repository. The action will spawn a virtual machine and run a | |
script that checks out your addon, zips it up in a format suitable | |
for various addon updater programs, and creates a GitHub "Release". | |
You can grab a minimal version of this file here: |