Skip to content

Instantly share code, notes, and snippets.

View xorcare's full-sized avatar

Vasiliy Vasilyuk xorcare

View GitHub Profile
@xorcare
xorcare / nc_squid.5.7.conf
Last active September 11, 2024 18:29
Examples of default Squid proxy configuration
acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines
acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN)
acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN)
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
acl SSL_ports port 443
@xorcare
xorcare / gen.go
Last active January 31, 2022 18:26
Modified source code for article Pointers Might Not be Ideal as Arguments
// gen.go
// This code is derived from the article
// https://golang.design/research/pointer-params
// and modified to fit my needs.
package main
import (
"bytes"
@xorcare
xorcare / pgbench.sh
Created October 21, 2021 15:11
A script for measuring the performance of sql queries with the generation of a report in the form of a MarkDown file.
#!/usr/bin/env bash
if [ -z "$PGHOST" ]; then
export PGHOST=localhost
fi
if [ -z "$PGPORT" ]; then
export PGPORT=5432
fi