Skip to content

Instantly share code, notes, and snippets.

type ConnPool struct {
pgx.ConnPool
}
type AfterAcquireFunc func(c *pgx.Conn) error
// NewConnPool creates a new ConnPool. config.ConnConfig is passed through to
// Connect directly.
func NewConnPool(config pgx.ConnPoolConfig) (p *ConnPool, err error) {
pp, err := pgx.NewConnPool(config)
@mvrhov
mvrhov / SplitToken.php
Created May 17, 2018 07:51
Split token
<?php declare(strict_types=1);
/**
* Released under the MIT License.
*
* Copyright (c) 2018 Miha Vrhovnik <miha.vrhovnik@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
@mvrhov
mvrhov / minimum.conf
Created April 13, 2011 08:33
nginx über config
server {
listen 80;
server_name <your.site.com>;
root /var/www/vhosts/<your.site.com>/site/www/;
#site root is redirected to the app boot script
location = / {
try_files @site @site;
}