Skip to content

Instantly share code, notes, and snippets.

package internal;
import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Assert;
import org.junit.Test;
/**
* Created by nikita on 16.06.16.
@kronar
kronar / pom2.yml
Created April 26, 2016 15:04
Inlined plugins
modelVersion: 4.0.0
groupId: org.examples
artifactId: mvn-polyglot
version: 0.0.1-SNAPSHOT
name: 'YAML Maven Love'
dependencies:
- { groupId: junit, artifactId: junit, version: 4.12, scope: test }
build:
@kronar
kronar / pom.yml
Created April 26, 2016 15:03
pom.ym1
modelVersion: 4.0.0
groupId: org.examples
artifactId: mvn-polyglot
version: 0.0.1-SNAPSHOT
name: 'YAML Maven Love'
dependencies:
- { groupId: junit, artifactId: junit, version: 4.12, scope: test }
build:
@kronar
kronar / build.gradle
Created March 17, 2016 07:49
gradle example
compileJava {
sourceCompatibility = '1.7'
}
compileTestJava {
sourceCompatibility = '1.8'
}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<testSource>1.8</testSource>
<testTarget>1.8</testTarget>
</configuration>
@kronar
kronar / grabber.js
Last active August 29, 2015 14:26 — forked from XOP/grabber.js
(function(undefined, body, selectors){
var collection = [];
var current;
var isAttr;
for(var key in selectors){
current = body.querySelectorAll(selectors[key]);
current = [].slice.call(current);
@kronar
kronar / gist:d19686ce05a978330f4e
Created March 1, 2015 16:02
Reverse implementation
public class AAA implements StringMirror {
@Override
public String mirror(String input) {
return new StringBuilder(input).reverse().toString();
}
}
public class StringMirrorImpl implements StringMirror {
@Override
public String mirror(String input) {
return input;
}
}
Class aClass = groovyClassLoader.parseClass(sourceCodeSupplier.get());
/*
Copyright 2007-2011 Selenium committers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software