Skip to content

Instantly share code, notes, and snippets.

<div>
${toolbar()}
</div>
<div>
${table()}
</div>
<plan>
<operation name="SELECT STATEMENT" id="0" depth="0" pos="1843">
<card>9287</card>
<bytes>35076999</bytes>
<cost>1843</cost>
<io_cost>1809</io_cost>
<cpu_cost>482733685</cpu_cost>
<time>00:00:23 </time>
</operation>
<operation name="FILTER" id="1" depth="1" pos="1">
@nithril
nithril / gist:1276426
Created October 10, 2011 20:31
Plan with element value
<plan>
<operation name="SELECT STATEMENT" id="0" depth="0" pos="18911">
<card>9597</card>
<bytes>220731</bytes>
<cost>18911</cost>
<io_cost>18901</io_cost>
<cpu_cost>141769650</cpu_cost>
<time>00:03:47 </time>
</operation>
<operation name="FILTER" id="1" depth="1" pos="1">
@nithril
nithril / gist:1893519
Created February 23, 2012 16:22
Intellij TestNG integration
java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838)
at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747)
at java.io.ObjectOutputStream.<init>(ObjectOutputStream.java:226)
at org.testng.remote.strprotocol.SerializedMessageSender.sendMessage(SerializedMessageSender.java:24)
at org.testng.remote.strprotocol.MessageHub.sendMessage(MessageHub.java:44)
at org.testng.remote.strprotocol.RemoteTestListener.onTestSuccess(RemoteTestListener.java:92)
[DEBUG] effective simulationsFolder: C:\Users\nlabrot\Projet\AgileViewer\tools\stress\src\test\scala
[DEBUG] resolved simulation classes: [basic.BasicExampleSimulation]
[DEBUG] plugin jar to add :c:\maven\repo\net\alchim31\maven\scala-maven-plugin\3.1.3\scala-maven-plugin-3.1.3.jar
[DEBUG] cmd: C:\Program Files\Java\jdk1.7.0_09\jre\bin\java -classpath C:\Users\nlabrot\Projet\AgileViewer\tools\stress\target\test-classes;C:\Users\nlabrot\Projet\AgileViewer\tools\stress\target\classes;c:\maven\repo\com\excilys\ebi\gatling\highcharts\gatling-charts-highcharts\1.4.6\gatling-charts-highcharts-1.4.6.jar;c:\maven\repo\com\excilys\ebi\gatling\gatling-app\1.4.6\gatling-app-1.4.6.jar;c:\maven\repo\com\excilys\ebi\gatling\gatling-http\1.4.6\gatling-http-1.4.6.jar;c:\maven\repo\com\ning\async-http-client\1.7.12\async-http-client-1.7.12.jar;c:\maven\repo\org\glassfish\grizzly\grizzly-websockets\2.2.16\grizzly-websockets-2.2.16.jar;c:\maven\repo\org\glassfish\grizzly\grizzly-framework\2.2.16\grizzly-framework-2.2.16.jar;c:
@nithril
nithril / gist:6094771
Last active December 20, 2015 07:39
Why groovy does not complain ? https://jira.codehaus.org/browse/GROOVY-5168
@TypeChecked
File doSomething(){
//Oops, return nothing explicitly
}
assert doSomething() == null
@nithril
nithril / Script CRON 1
Last active December 29, 2015 14:29
Sauvegarde Elasticsearch
#!/bin/bash
_now=$(date +"%Y_%m_%d_%H_%M");
curl -X POST "http://localhost.fr:9200/_export?target=/usr/local/lilactu/save/${_now}.tar.gz"
@nithril
nithril / gist:8881495
Created February 8, 2014 10:17
spring-loaded
@Override
public void reloadEvent(String typename, Class<?> clazz, String encodedTimestamp) {
log.info("typename=" + typename + "\nclazz=" + clazz.getName() + "\ntimestamp=" + encodedTimestamp);
if (!lastTimestamp.equals(encodedTimestamp)) {
log.info("Hot reloading in progress...");
lastTimestamp = encodedTimestamp;
CachedIntrospectionResults.clearClassLoader(clazz.getClassLoader());
Introspector.flushFromCaches(clazz);
DefaultListableBeanFactory beanFactory = (DefaultListableBeanFactory) applicationContext.getBeanFactory();
@nithril
nithril / gist:8926105
Last active August 29, 2015 13:56
Detect new class file
package org.springsource.loaded.agent;
import java.io.File;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URISyntaxException;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
@nithril
nithril / AstTest.groovy
Last active August 29, 2015 13:57
AST Test
import groovy.transform.TypeChecked
import org.nigajuan.lilactu.indexer.core.Coerce
import org.testng.annotations.Test
class AstTest {
static class MyBean {
public MyBean(int a, int b) {
}
}