Skip to content

Instantly share code, notes, and snippets.

View ezienecker's full-sized avatar
👐
C.R.E.A.M.

Emanuel Zienecker ezienecker

👐
C.R.E.A.M.
View GitHub Profile
@rhamedy
rhamedy / README.md
Last active June 1, 2022 02:20
Configure HikariCP with Spring Boot JPA Hibernate and PostgreSQL as a database

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:

  1. Spring Boot Starter JPA (Web & Security - optional)
  2. Gradle build tool
  3. PostgreSQL running and setup with a database (i.e. schema, user, db)

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

@ibraheem4
ibraheem4 / postgres-brew.md
Last active September 13, 2024 11:16 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@maxpert
maxpert / Stopwatch.kt
Created March 16, 2016 04:16
A really simple stopwatch for Kotlin
object Stopwatch {
inline fun elapse(callback: () -> Unit): Long {
var start = System.currentTimeMillis()
callback()
return System.currentTimeMillis() - start
}
inline fun elapseNano(callback: () -> Unit): Long {
var start = System.nanoTime()