sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
function switchgo() { | |
version=$1 | |
if [ -z $version ] || [ $# -ne 1 ]; then | |
echo "Usage: switchgo [version]" | |
return 1 | |
fi | |
if [ -z $GOBIN ]; then | |
echo "\$GOBIN is not set" | |
return 1 |
I came across HikariCP
and I was amazed by the benchmarks and I wanted to try it instead of my default choice C3P0
and to my surprise I struggled to get the configurations
right probably because the configurations differ based on what combination of tech stack you are using.
I have setup Spring Boot
project with JPA, Web, Security
starters (Using [Spring Initializer][1]) to use PostgreSQL
as a database with HikariCP
as connection pooling.
I have used Gradle
as build tool and I would like to share what worked for me for the following assumptions:
This gist is related to SO post https://stackoverflow.com/questions/26490967/how-do-i-configure-hikaricp-in-my-spring-boot-app-in-my-application-properties-f
package main | |
import ( | |
"fmt" | |
"gopkg.in/mgo.v2" | |
"gopkg.in/mgo.v2/bson" | |
"time" | |
) | |
type Content struct { |
通过nginx反向代理go语言写的http服务器 | |
1. nginx 配置 | |
#列出所有服务器地址,nginx 自动均衡分发请求到各个服务器。 | |
upstream frontends { | |
ip_hash; | |
server 192.168.199.1:8088; | |
server 192.168.199.2:8089; | |
} | |
server { | |
listen 80; |