This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Package iptrie is a fork of github.com/yl2chen/cidranger. This fork massively strips down and refactors the code for | |
// increased performance, resulting in 20x faster load time, and 1.5x faster lookups. | |
package iptrie | |
import ( | |
"fmt" | |
"math/bits" | |
"net/netip" | |
"strings" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
lua-load haproxy.lua | |
frontend X | |
tcp-request session set-var(sess.ssl_session_id) ssl_fc_session_id,hex if { ssl_fc } | |
tcp-request content lua.ssl-log-key if { ssl_fc } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
"syscall" | |
"time" | |
"github.com/coreos/go-systemd/daemon" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _run_deferred() { | |
local _depth="$BASHPID.${#FUNCNAME[@]}" | |
[[ "$_depth" != "$_deferred_depth" ]] && return | |
local opt=$- | |
set +e | |
for (( i=${#_deferred[@]} - 1; i >= 0; i-- )); do | |
eval "${_deferred[i]}" | |
done | |
[[ "$opt" == *e* ]] && set -e | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# go test -bench=. | |
goos: linux | |
goarch: amd64 | |
pkg: tmp/eh4 | |
BenchmarkSelect-8 200000000 7.65 ns/op | |
BenchmarkLen-8 2000000000 1.07 ns/op | |
PASS | |
ok tmp/eh4 4.580s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lsof -p 25058 | |
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME | |
influxd 25058 phemmer cwd DIR 253,8 8192 192 /home/phemmer | |
influxd 25058 phemmer rtd DIR 253,0 249 96 / | |
influxd 25058 phemmer txt REG 253,8 17441363 335701024 /home/phemmer/.go/bin/influxd | |
influxd 25058 phemmer mem REG 0,30 26156 /mnt/influxdb/influxdb2/data/_internal/monitor/675/000000014-000000002.tsm (path dev=0,32) | |
influxd 25058 phemmer mem REG 0,30 26381 /mnt/influxdb/influxdb2/data/_internal/monitor/675/000000039-000000001.tsm (path dev=0,32) | |
influxd 25058 phemmer mem REG 0,30 25692 /mnt/influxdb/influxdb2/data/_internal/monitor/675/000000012-000000003.tsm (path dev=0,32) | |
influxd 25058 phemmer mem REG 0,30 26377 /mnt/influxdb/influxdb2/data/_internal/monitor/675/000000016-000000001.tsm (path dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SIGQUIT: quit | |
PC=0x458e7e m=0 sigcode=65537 | |
goroutine 0 [idle]: | |
runtime.sys_umtx_op(0xee3bd8, 0xf, 0x18, 0x0, 0x800000004, 0x400ee3540, 0x0, 0x422c5e, 0xc51e80, 0x7fffffffe9d0, ...) | |
/usr/local/go/src/runtime/sys_freebsd_amd64.s:21 +0x1e | |
runtime.futexsleep1(0xee3bd8, 0x0, 0xffffffffffffffff) | |
/usr/local/go/src/runtime/os_freebsd.go:92 +0x5d | |
runtime.futexsleep.func1() | |
/usr/local/go/src/runtime/os_freebsd.go:80 +0x3a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
self_path="$(readlink -f "$0")" | |
self_dir="${self_path%/*}" | |
#unset PWD # screws with go package path detection | |
IFS=$'\n' read -d '' -a gdms < <(which -a gdm) | |
realgdm= | |
foundself= | |
for gdm in "${gdms[@]}"; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEST DEFINITIONS ::= BEGIN | |
testOID ::= { 1 2 3 } | |
testTable OBJECT-TYPE | |
SYNTAX SEQUENCE OF testTableEntry | |
MAX-ACCESS not-accessible | |
STATUS current | |
::= { testOID 0 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
exec 3> >(ipset restore) | |
echo 'create blacklist hash:net -exist' >&3 | |
echo 'create blacklist_new hash:net -exist' >&3 | |
echo 'flush blacklist_new' >&3 | |
#echo "http://www.spamhaus.org/drop/drop.txt" | |
while read ip; do | |
echo "add blacklist_new $ip" >&3 |
NewerOlder