Skip to content

Instantly share code, notes, and snippets.

View mterrel's full-sized avatar

Mark Terrel mterrel

View GitHub Profile
@mterrel
mterrel / gist:be0e6197acbc3518c008c53900795f9f
Created August 6, 2023 13:32
make test output for adding adaptable.app to PSL
root@93b302eb3964:/test# date; make test
Sun Aug 6 13:31:46 UTC 2023
cd linter; \
./pslint_selftest.sh; \
./pslint.py ../public_suffix_list.dat;
test_NFKC: OK
test_allowedchars: OK
test_dots: OK
test_duplicate: OK
test_exception: OK
@mterrel
mterrel / Unbounded Systems Individual CLA.md
Last active February 15, 2020 15:47
Unbounded Systems Individual Contributor License Agreement (CLA)

Unbounded Systems Individual Contributor License Agreement

In order to clarify the intellectual property license granted with Contributions from any person or entity, Unbounded Systems, LLC ("Unbounded") must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license does not change your rights to use your own Contributions for any other purpose.

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Unbounded. Except for the license granted herein to Unbounded and recipients of software distributed by Unbounded, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions.

"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Unbounded. For legal entities, the entity making a Contribution and all other entities that control, are controlled

@mterrel
mterrel / gist:d8f29c6bfd92e346efcf82b61c7eed48
Created October 14, 2019 22:43
medium - Fixing DNS timeouts in Docker - 3
$ docker kill -s USR1 dnsmasq
$ docker logs dnsmasq
dnsmasq[1]: cache size 150, 1085/4664 cache insertions re-used unexpired cache entries.
dnsmasq[1]: queries forwarded 1712, queries answered locally 3940
dnsmasq[1]: queries for authoritative zones 0
dnsmasq[1]: server 172.16.0.119#53: queries sent 1172, retried or failed 0
dnsmasq[1]: server 172.16.1.65#53: queries sent 252, retried or failed 0
dnsmasq[1]: server 172.16.0.2#53: queries sent 608, retried or failed 0
@mterrel
mterrel / gist:915d81f4bc39b8120b1f61355c81239a
Created October 14, 2019 22:42
medium - Fixing DNS timeouts in Docker - 2
$ DNS_IP=$(dns_cache)
$ docker run --dns ${DNS_IP} --rm busybox ping -c1 adaptjs.org
@mterrel
mterrel / gist:4a5ee0dd3b39f8b1e94288d9f06c0f2b
Created October 14, 2019 22:37
medium - Fixing DNS timeouts in Docker - 1
$ tcpdump -n -i eth1 port 53
11:35:59.474735 IP 172.16.0.131.54264 > 172.16.0.119.domain: 64859+ AAAA? registry-1.docker.io. (38)
11:35:59.474854 IP 172.16.0.131.49631 > 172.16.0.119.domain: 43524+ A? registry-1.docker.io. (38)
11:35:59.476871 IP 172.16.0.119.domain > 172.16.0.131.49631: 43524 8/0/1 A 34.197.189.129, A 34.199.40.84, A 34.199.77.19, A 34.201.196.144, A 34.228.211.243, A 34.232.31.24, A 52.2.186.244, A 52.55.198.220 (177)
11:35:59.476957 IP 172.16.0.119.domain > 172.16.0.131.54264: 64859 0/1/1 (133)
@mterrel
mterrel / dns_cache
Last active August 14, 2020 03:35
Docker DNS cache script
#!/usr/bin/env bash
: "${IMAGE:=andyshinn/dnsmasq:2.76}"
: "${NAME:=dnsmasq}"
: "${ADAPT_DNS_IP_FILE:=/tmp/adapt_dns_ip}"
# Get IP address for an interface, as visible from inside a container
# connected to the host network
interfaceIP() {
# Run a container and get ifconfig output from inside
@mterrel
mterrel / git.ps1
Created July 3, 2018 21:44
Use WSL git with VS Code
# Run WSL git from Windows, mapping some paths between unix <-> Win
# To use with wslgit.cmd, place them in the same directory
Function ToUnix {
# If the arg has a \, then it's probably a path. Convert it.
if ($args[0] -match "\\") {
$mapped = wsl wslpath -u `'$($args[0])`'
} else {
$mapped = $args[0]
}