Skip to content

Instantly share code, notes, and snippets.

@sirdantas
sirdantas / docker-compose.yml
Created August 13, 2020 17:29
Kong + Konga
version: "3.7"
volumes:
kong_data: {}
networks:
kong-net:
services:
@pedroufv
pedroufv / logger sql to laravel
Created November 30, 2018 19:45
show all sql add this code in boot method of appServiceProvider
DB::listen(function(QueryExecuted $query){
Logger(
vsprintf(str_replace('?', '%s', $query->sql), collect($query->bindings)->map(function($binding){
return is_numeric($binding) ? $binding : "'{$binding}'";
})->toArray())
);
});
@rcaneppele
rcaneppele / Bd2.java
Created January 15, 2015 11:49
CDI Multiple EntityManager producers
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR})
public @interface Bd2 {
}
@yongzhy
yongzhy / gist:9045121
Created February 17, 2014 05:16
golang logging with different level and output to different file
// from http://www.goinggo.net/2013/11/using-log-package-in-go.html
import (
"io"
"log"
)
var (
_TRACE *log.Logger
_INFO *log.Logger