Skip to content

Instantly share code, notes, and snippets.

View clickfreak's full-sized avatar

Konstantin Novakovskii clickfreak

View GitHub Profile
@upa
upa / LICENSE
Last active August 23, 2022 16:42
Ansible Module for Linux Bridge and VLAN
MIT License
Copyright (c) 2021 Ryo Nakamura
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@arr2036
arr2036 / delay.sh
Last active November 26, 2024 14:25
Simple script to introduce delay on outbound packets to one or more (run multiple times) ip addresses
#!/bin/bash
# root qdisc handle
r_handle=1
# netem qdisc handle
n_handle=2
interface=
delay=
dstip=
qdpresent=
@edmonds
edmonds / dnstap.txt
Last active February 29, 2024 16:55
example formatted output from dnstap command-line tool
21:08:07.858612 CQ 127.0.0.1 UDP 40b "dnstap.info." IN A
21:08:07.858604 RQ 192.5.5.241 UDP 28b "." IN NS
21:08:07.872825 RR 192.5.5.241 UDP 857b "." IN NS
21:08:07.872825 RQ 192.5.5.241 UDP 40b "dnstap.info." IN A
21:08:07.901990 RR 192.5.5.241 UDP 686b "dnstap.info." IN A
21:08:07.901990 RQ 199.254.49.1 UDP 40b "dnstap.info." IN A
21:08:07.964484 RR 199.254.49.1 UDP 596b "dnstap.info." IN A
21:08:07.964484 RQ 192.5.5.241 UDP 48b "ns7.dnsmadeeasy.com." IN AAAA
21:08:07.964484 RQ 192.5.5.241 UDP 48b "ns7.dnsmadeeasy.com." IN A
21:08:07.979984 RR 192.5.5.241 UDP 743b "ns7.dnsmadeeasy.com." IN AAAA
@jboner
jboner / latency.txt
Last active September 29, 2025 09:22
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@antonlindstrom
antonlindstrom / dnscheck
Created July 22, 2011 10:13
keepalived for DNS
#!/bin/bash
#$Id: keepalivepin,v 1.2 2006/02/27 07:30:41 hmy Exp hmy $
#use dig check the powerdns's status.
#in the dns database,have a IN TXT RR keepalivepin.vmmatrix.net,content is "AaBbCcDdEeFf"
# Source: http://puppet-manifest-share.googlecode.com/svn/trunk/vmx-puppet/modules/lvs/files/keepalived.dns-pin
#
RR=keepalivepin.vmmatrix.net
[ $# -le 1 ]&&{ echo "usage: ${0} -h <ip>"; exit 126;}
while getopts "h:" OPT;do
case $OPT in