Skip to content

Instantly share code, notes, and snippets.

View vavrusa's full-sized avatar

Marek Vavruša vavrusa

View GitHub Profile
@vavrusa
vavrusa / build.log
Created August 17, 2017 16:18
clickhouse build failure
[22:54:07] : [build] CMAKE_FLAGS_ADD="-DENABLE_MYSQL=OFF" REVISION=54276-cf0 AUTHOR=mvavrusa@cloudflare.com DEB_CLANG=$(which clang-3.8) DEB_CXX=$(which g++-6) DEB_CC=$(which gcc-6) THREAD_COUNT=4 ./release && \
[22:54:07] : [build] mv ../*.deb /build/clickhouse/pkg
[22:54:07] : [build]
[22:54:07] : [build] Current revision is 54276-cf0
[22:54:08] : [build] dpkg-buildpackage -rfakeroot -us -uc -b
[22:54:08] : [build] dpkg-buildpackage: info: source package clickhouse
[22:54:08] : [build] dpkg-buildpackage: info: source version 1.1.54276-cf0
[22:54:08] : [build] dpkg-buildpackage: info: source distribution unstable
[22:54:08] : [build] dpkg-buildpackage: info: source changed by mvavrusa@cloudflare.com <builder@yandex-team.ru>
[22:54:08] : [build] dpkg-source --before-build clickhouse
@vavrusa
vavrusa / console.lua
Last active March 31, 2018 05:07
Fun with BPF
$ sudo luarocks install https://raw.githubusercontent.com/iovisor/bcc/master/src/lua/bpf-scm-1.rockspec
$ cat bpf_ttl.lua
local S = require('syscall')
local bpf = require('bpf')
-- Kernel-space part of the program
local map = bpf.map('array', 256)
local prog = assert(bpf(function ()
local net = pkt.net_off -- Socket filter on TCP starts from TCP otherwise
if net.ver == 4 then -- Check for IPv4
$ kdig @9.9.9.9 akamai.com +subnet=111.111.111.0/24
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 9698
;; Flags: qr rd ra; QUERY: 1; ANSWER: 1; AUTHORITY: 0; ADDITIONAL: 1
;; EDNS PSEUDOSECTION:
;; Version: 0; flags: ; UDP size: 4096 B; ext-rcode: NOERROR
;; CLIENT-SUBNET: 73.231.144.0/20/0
;; QUESTION SECTION:
;; akamai.com. IN A