Skip to content

Instantly share code, notes, and snippets.

@hasnat
hasnat / knot-resolver.conf
Last active January 18, 2024 20:59
an example split horizontal dns config using knot resolver
-- vim:syntax=lua:set ts=4 sw=4:
-- Refer to manual: https://knot-resolver.readthedocs.io/en/stable/daemon.html#configuration
-- Listen on all interfaces (localhost would not work in Docker)
net.listen('0.0.0.0')
net.listen('0.0.0.0', 853, { kind = 'tls' })
net.listen('0.0.0.0', 443, { kind = 'doh' })
net.listen('0.0.0.0', 8453, { kind = 'webmgmt' })
-- To disable DNSSEC validation, uncomment the following line (not recommended)
version: '2.4'
services:
dns-for-weave:
container_name: dns-for-weave
image: cytopia/bind
environment:
EXTRA_HOSTS: "weavescope.yourcompany.com=000.000.000.000"
DOCKER_LOGS: "1"
@hasnat
hasnat / delete_docker_logs.sh
Created September 10, 2017 21:58 — forked from stefanfoulis/delete_docker_logs.sh
delete docker logs
find /var/lib/docker/containers/ -type f -name "*.log" -delete
@hasnat
hasnat / tests.js
Last active August 15, 2017 12:39 — forked from chodorowicz/toggle.js
lodash toggle array element
import toggleItemInArray from '../toggleItemInArray';
it('toggles item properly', () => {
expect(toggleItemInArray([], 'a')).toEqual(['a']);
expect(toggleItemInArray(['a', 'b'], 'a')).toEqual(['b']);
});