Skip to content

Instantly share code, notes, and snippets.

@obonyojimmy
obonyojimmy / keyboardcapture.go
Last active November 30, 2025 15:52
go lang keyboard capture
package main
import (
"fmt"
"syscall"
//~ "time"
"unsafe"
"golang.org/x/sys/windows"
)
@MartinBrugnara
MartinBrugnara / doc.txt
Last active April 11, 2026 18:32
DigitalOcean, assign public ipv6 to wireguard clients
# /etc/sysctl.d/wireguard.conf
net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.default.forwarding=1
net.ipv6.conf.eth0.proxy_ndp=1
#/etc/wireguard/wg0.conf (DO virtual machine)
[Interface]
# The server interface does not actually need an ipv6.
# The 2 following must be repeated for each used addres [0, 1]
@VincentAntoine
VincentAntoine / timescaledb_tables_and_hypertables_sizes.sql
Last active August 25, 2026 07:46
Query to list all tables and hypertables in a Postgresql / TimescaleDB database with their total size
WITH chunks AS (
SELECT
ht.schema_name AS hypertable_schema,
ht.table_name AS hypertable_name,
ck.table_name AS chunk_name
FROM _timescaledb_catalog.hypertable ht
JOIN _timescaledb_catalog.chunk ck
ON ht.id = ck.hypertable_id
),