Skip to content

Instantly share code, notes, and snippets.

SpareSimian

Block or report user

Report or block SpareSimian

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@SpareSimian
SpareSimian / ipdeny-to-NonUS.py
Created Aug 2, 2019
Non-US ipset from whois database via ipdeny website
View ipdeny-to-NonUS.py
#!/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
@SpareSimian
SpareSimian / aws-ip-ranges-to-zones.py
Created Jun 6, 2019
Dump AWS netblocks into zone files for use as ipsets
View aws-ip-ranges-to-zones.py
#!/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'
@SpareSimian
SpareSimian / BuildBoost.cmd
Created Apr 13, 2019
Build Boost binary libraries with several Visual Studio versions
View BuildBoost.cmd
@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
You can’t perform that action at this time.