Skip to content

Instantly share code, notes, and snippets.

@lebenasa
lebenasa / main.go
Created October 19, 2017 20:50
Exploring automatic table fields discovery in Go
// pqprobe probes Postgresql database for given table name and tries to obtain the table's fields.
package main
import (
"fmt"
"log"
"strings"
"github.com/jmoiron/sqlx"
_ "github.com/lib/pq"
@lebenasa
lebenasa / pqprobe_main.go
Created October 20, 2017 13:04
Exploring automatic table fields discovery in Go
// pqprobe probes Postgresql database for given table name and tries to obtain the table's fields.
package main
import (
"fmt"
"log"
"strings"
"github.com/jmoiron/sqlx"
_ "github.com/lib/pq"
@lebenasa
lebenasa / nvim-wsl.py
Last active March 3, 2024 19:55
Use Neovim inside Windows Subsystem Linux in Windows
#!python3
"""
Start neovim server inside WSL then run neovim client (nvim-qt) in Windows.
Requirements:
- Windows Subsystem Linux 2
- Neovim inside WSL (install plugins, customizations, etc. in WSL-side)
- nvim-qt inside Windows (bundled with `choco install neovim`)
- Python3.6 or later inside Windows to run this script
- Correct PATH variables on Windows