Skip to content

Instantly share code, notes, and snippets.

View fspacek's full-sized avatar
🏠
Working from home

František Špaček fspacek

🏠
Working from home
View GitHub Profile
DROP TABLE IF EXISTS pgbench_generic_log;
CREATE TABLE pgbench_generic_log (
mtime timestamptz not null default now(),
action char not null check (action in ('I', 'U', 'D')),
username text not null,
table_name text not null,
row_data jsonb not null
);
CREATE INDEX ON pgbench_generic_log USING brin (mtime);
@fspacek
fspacek / sshtunnel.go
Created November 22, 2016 08:03 — forked from iamralch/sshtunnel.go
SSH tunnelling in Golang
package main
import (
"log"
"bufio"
"time"
"os"
"fmt"
"io"
"net"