Skip to content

Instantly share code, notes, and snippets.

View vroman's full-sized avatar

Víctor Román Archidona vroman

View GitHub Profile
@vroman
vroman / pgx_json.go
Created February 28, 2023 10:41 — forked from rrafal/pgx_json.go
Use JSON column with golang pgx driver.
package main
import (
"fmt"
"encoding/json"
"github.com/jackc/pgx"
"log"
)
var schema = `
@vroman
vroman / ca.md
Created June 8, 2022 10:05 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@vroman
vroman / 00_README.md
Created December 21, 2021 22:41 — forked from reagent/00_README.md
Custom HTTP Routing in Go

Custom HTTP Routing in Go

Basic Routing

Responding to requests via simple route matching is built in to Go's net/http standard library package. Just register the path prefixes and callbacks you want invoked and then call the ListenAndServe to have the default request handler invoked on each request. For example:

package main

import (
@vroman
vroman / encrypted-git-repo.md
Created June 7, 2018 23:36
Transparent Git Encryption

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang (geek@cerias.net). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes