Skip to content

Instantly share code, notes, and snippets.

@startuml
hide empty description
skinparam linetype ortho
[*] -d-> CREATED
note right of CREATED
After the <b>PluginManager</b> was initialised or added the plugin
to the <b>PluginRepository</b> manually.
At this time a plugin wrapper is created, but the plugin class
is not loaded. Of course, the plugin can't be invoked yet.
end note
@aadrian
aadrian / mysql_duplicates.sql
Created March 1, 2020 09:21
MySQL find duplicate rows for deleteion based on one column!
-- ddl and data ('name' will be duplicated)
CREATE TABLE dupli (id INT(10) NOT NULL, name VARCHAR(100) NOT NULL, PRIMARY KEY (id));
INSERT INTO dupli (id, name) VALUES (1, 'aa');
INSERT INTO dupli (id, name) VALUES (2, 'aa');
INSERT INTO dupli (id, name) VALUES (3, 'bb');
INSERT INTO dupli (id, name) VALUES (4, 'cc');
INSERT INTO dupli (id, name) VALUES (5, 'cc');
INSERT INTO dupli (id, name) VALUES (6, 'aa');
-- count with partition the duplicates ( where 'cnt' > 1 will need cleanup)
@startuml
!include <cloudinsight/apache>
!include <cloudinsight/nginx>
!include <cloudinsight/iis>
!include <cloudinsight/tomcat>
!include <cloudinsight/kafka>
!include <cloudinsight/java>
!include <cloudinsight/docker>
!include <cloudinsight/gearman>
// fix for Windows limited CLI ERROR due to long class path
windowsScript.text = windowsScript.text.replaceAll('set CLASSPATH=.*', 'set CLASSPATH=.;%APP_HOME%/lib/*')
@aadrian
aadrian / build_tool.gradle
Created May 19, 2019 21:06
Gradle snippets for tools
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
compileJava.options.encoding = 'UTF-8'
jar {
manifest {
attributes 'Main-Class': mainClassName,
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Implementation-Version': version
}
https://github.com/metabase/metabase/issues/5737 -> Solr
https://github.com/metabase/metabase/issues/6094 -> CSV Upload
https://github.com/metabase/metabase/pull/7534 -> CSV Implementation
https://github.com/metabase/metabase/issues/3745 -> Prometheus
https://github.com/metabase/metabase/issues/2561 -> InfluxDB
https://github.com/metabase/metabase/issues/1309 -> RethinkDB
https://github.com/metabase/metabase/issues/1300 -> ElasticSearch
https://github.com/metabase/metabase/issues/3101 -> OAuth
https://github.com/metabase/metabase/issues/3210 -> SSO Modular
@aadrian
aadrian / build.gradle
Last active June 29, 2017 15:46
Gradle getWebAppVersion based on time and GIT hash
We couldn’t find that file to show.
@aadrian
aadrian / scalatra26.md
Last active June 6, 2017 09:10 — forked from takezoe/scalatra26.md
[Draft]The plan of Scalatra 2.6.0

[Draft]Plan for Scalatra 2.6.0

The main goal of Scalatra 2.6.x is to decrease future maintenance efforts and costs, since there are not enough active committers to maintain the existing huge codebase. To achieve this goal, I propose the followings:

  • Follow the Scala standards (e.g. Twirl instead of Scalate, ScalaTest instead of Specs2)
  • Deprecate modules that are not used much or not maintained enough

More specific tasks:

Overall

@aadrian
aadrian / error.gsp
Created April 21, 2015 09:33
Grails Improved error messages in production mode.
<%@ page import="org.codehaus.groovy.grails.web.errors.GrailsExceptionResolver" %>
<!DOCTYPE html>
<html>
<head>
<title><g:if env="development">Grails Runtime Exception</g:if><g:else>Error</g:else></title>
<meta name="layout" content="main">
<g:if env="development"><link rel="stylesheet" href="${resource(dir: 'css', file: 'errors.css')}" type="text/css"></g:if>
</head>
<body>
<g:if env="development">