Skip to content

Instantly share code, notes, and snippets.

View cnst's full-sized avatar

Constantine A. Murenin cnst

View GitHub Profile
@cnst
cnst / Public_Recursive_Name_Servers.md
Created November 20, 2019 21:47 — forked from mutin-sa/Top_Public_Recursive_Name_Servers.md
List of Top Public Recursive Name Servers
IPv4 Addr IPv6 Addr ASn Loc Svc Org
8.8.8.8 2001:4860:4860::8888 AS15169 Worldwide (Anycast) Google Public DNS Google
8.8.4.4 2001:4860:4860::8844 AS15169 Worldwide (Anycast) Google Public DNS Google
77.88.8.8 2a02:6b8::feed:0ff AS13238 Worldwide (Anycast) Yandex.DNS Yandex
77.88.8.1 2a02:6b8:0:1::feed:0ff AS13238 Worldwide (Anycast) Yandex.DNS Yandex
1.1.1.1 2606:4700:4700::1111 AS13335 Worldwide (Anycast) Cloudflare-DNS Cloudflare/APNIC
1.0.0.1 2606:4700:4700::1001 AS13335 Worldwide (Anycast) Cloudflare-DNS Clou
@cnst
cnst / select.default.return.bad.go
Created January 14, 2019 03:54
basic-level gist demonstrating channel draining in Go, shows `select … default: return` is a bogus paradigm compared to `close(channel)`
// https://play.golang.org/p/wqVLF8XYQyX
// Author: Constantine A. Murenin (cnst++@…)
// http://cm.su/
// 2019-01-12 (Saturday)
// Testing conditions when `default: return` would shortcircuit.
// It seems that it shouldn't be an issue as long as channel still has something to drain.
// In other words, nothing that's already in the channel should ever be lost;
// but things that haven't quite made it into the channel yet would probably never make it.
// BN: Synchronisation between the first and second runs deliberately has bugs that show that
// `default` isn't used properly, and `close(channel)` paradigm should have been used instead.
# Author: Constantine A. Murenin (cnst) http://cnst.su/
#
# Automatically redirect `/search/?search=nginx` to `/search/nginx.html` externally,
# such that the location in the browser will change, but then process the request
# with the backend as if no such redirect has ever happened.
server {
listen [::]:7380;
location = /search/ {
if ($arg_search) {
return 302 /search/$arg_search.html;
@cnst
cnst / 2016-07-26 Hetzner Switch Replacement 2016-08-02--03.eml
Created July 26, 2016 13:57
Hetzner: Important Client Information: Switch Replacement for your server(s) (2/3 August 2016)
Subject: =?utf-8?Q?Wichtige_Kundeninformation=3A_Switch-Tausch_f=C3=BCr_I?=
=?utf-8?Q?hre=28n=29_Server_=282=2E/3=2E_August_2016=29_/_Important_Clien?=
=?utf-8?Q?t_Information=3A_Switch_Replacement_for_your_server=28s=29_=282?=
=?utf-8?Q?/3_August_2016=29?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
From: support@hetzner.de
Message-Id: <E1bS2F7-00074D-Iq@robot.first-ns.de>
Date: Tue, 26 Jul 2016 15:17:53 +0200
@cnst
cnst / 2016-05-31 Linode DNS.eml
Created June 4, 2016 05:27
Linode Support Ticket: "On June 27th, our DNS infrastructure will cease to answer DNS queries which are received on our old name server IP addresses."
Return-Path: <support@linode.com>
Received: from mail2.linode.com (mail2.linode.com [IPv6:2600:3c00::f03c:91ff:fedf:57ab])
by xxxxxxxxxxxxxxxxxxxxxxxxxx with ESMTP id xxxxxxxxxxxxxx
for <xxxxxxxxxx>; Tue, 31 May 2016 06:43:15 -0700 (PDT)
Received: from www9.linode.com (www9.linode.com [50.116.26.223])
by mail2.linode.com (Postfix) with ESMTP id xxxxxxxxxx;
Tue, 31 May 2016 09:43:13 -0400 (EDT)
Date: Tue, 31 May 2016 09:43:13 -0400 (EDT)
From: support@linode.com
To: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxU
Winning entry at the Redis Labs / Rackspace #HashtagHackathon, 2016-03-11.
Copyright (c) 2016 Constantine A. Murenin <URL:http://cnst.su/>
% env TZ=US/Central last | head
root pts/0 XXXXXXXXXXXXX Sat Mar 12 17:18 still logged in
root pts/3 XXXXXXXXXXXXXXXX Fri Mar 11 20:29 - 21:23 (00:53)
root pts/2 XXXXXXXXXXXXXXXX Fri Mar 11 20:25 - 21:23 (00:58)
root pts/1 XXXXXXXXXXXXXXXX Fri Mar 11 19:59 - 21:24 (01:24)
root pts/0 XXXXXXXXXXXXXXXX Fri Mar 11 17:37 - 21:25 (03:48)
From Linode at FMT2:
li16x-xxx:~# traceroute ntp1.yycix.ca ; date
traceroute to ntp1.yycix.ca (192.75.191.6), 30 hops max, 60 byte packets
1 192.168.105.3 (192.168.105.3) 0.379 ms 0.570 ms 0.707 ms
2 10gigabitethernet7-6.core3.fmt2.he.net (65.49.10.217) 6.690 ms 6.695 ms 6.649 ms
3 10gigabitethernet10-1.core1.sjc2.he.net (184.105.222.14) 6.635 ms 0.792 ms 6.564 ms
4 10gigabitethernet12-1.core1.sea1.he.net (72.52.92.158) 25.300 ms 25.296 ms 25.238 ms
5 10gigabitethernet1-1.core1.yvr1.he.net (184.105.222.2) 25.282 ms 25.287 ms 33.093 ms
6 10gigabitethernet3-1.core1.yyc1.he.net (184.105.223.217) 50.792 ms 49.072 ms 48.983 ms
@cnst
cnst / gist:5289192
Created April 2, 2013 01:15
hetzner.de huge packet loss for several hours today
Cns# mtr --report{,-wide,-cycles=100} --order "SRL BGAWV" ip68-97-xx-xxx.ok.ok.cox.net ; date
HOST: XXXXXXXXXX Snt Rcv Loss% Best Gmean Avg Wrst StDev
1.|-- static.33.203.4.46.clients.your-server.de 100 100 0.0% 0.5 1.1 1.5 11.1 1.6
2.|-- hos-tr3.juniper2.rz13.hetzner.de 100 100 0.0% 0.2 0.2 0.4 12.1 1.3
3.|-- hos-bb2.juniper4.rz2.hetzner.de 100 100 0.0% 2.7 3.3 4.9 59.7 8.5
4.|-- r1nue1.core.init7.net 100 100 0.0% 2.8 4.5 5.3 14.0 3.4
5.|-- r1nue2.core.init7.net 100 100 0.0% 2.9 4.4 5.3 14.2 3.8
6.|-- r1fra2.core.init7.net 100 100 0.0% 5.7 9.0 9.8 17.7 4.3
7.|-- r1fra1.core.init7.net 100 100 0.0% 5.8 8.0 8.7 17.1 3.7
8.|-- xe-4-2-2.fra23.ip4.tinet.net 100 57 43.0% 10.2 11.9 12.5 47.9 5.9