Skip to content

Instantly share code, notes, and snippets.

View splatch's full-sized avatar

Łukasz Dywicki splatch

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Austrian Association for Software Tool Integration (AASTI)
under one or more contributor license agreements. See the NOTICE file
distributed with this work for additional information regarding copyright
ownership. The AASTI licenses this file to you 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
@splatch
splatch / MapMatcher.java
Created June 30, 2015 08:41
Simple hamcrest map matcher which ensures that argument contains given keys and values.
import org.hamcrest.Description;
import org.mockito.ArgumentMatcher;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
public class MapMatcher extends ArgumentMatcher<Map> {
@splatch
splatch / timer.java
Created July 17, 2015 12:28
Gather metrics using codahale stuff
Counter failCounter = new Counter();
Counter successCounter = new Counter();
Timer timer = new Timer();
@Override
public Y transform(X x) {
Timer.Context time = timer.time();
try {
Y transform = delegate.transform(x);
@splatch
splatch / main.xml
Created April 12, 2011 09:03
New assembly packaging of Karaf
<component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2
http://maven.apache.org/xsd/component-1.1.2.xsd
">
<fileSets>
<!-- Copy over everything that needs to get unix line endings -->
<fileSet>
@splatch
splatch / jquery.http.js
Created April 14, 2011 16:17
Extra http methods for jQuery based on X-HTTP-Method-Override header.
function _ajax_request(url, data, callback, type, method) {
if (jQuery.isFunction(data)) {
callback = data;
data = {};
}
return jQuery.ajax({
type: "POST",
url: url,
data: data,
21:21:10,468 | ERROR | qtp893036286-68 | Objects | 219 - org.ops4j.pax.wicket.pax-wicket-service - 0.7.2 | Error serializing object class org.apache.karaf.webconsole.core.DashboardPage [object=[Page class = org.apache.karaf.webconsole.core.DashboardPage, id = 0, version = 0]]
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: Unable to serialize class: org.apache.felix.framework.BundleContextImpl
Field hierarchy is:
0 [class=org.apache.karaf.webconsole.core.DashboardPage, path=0]
private java.lang.Object org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
java.lang.Object org.apache.wicket.Component.data[1] [class=org.apache.karaf.webconsole.core.BasePage$1, path=0:tabs]
java.lang.Object org.apache.wicket.Component.data [class=org.apache.wicket.model.util.WildcardListModel]
private java.lang.Object org.apache.wicket.model.util.GenericBaseModel.object [class=org.ops4j.pax.wicket.util.proxy.$Proxy87]
package org.code_house.webconsole.monitor.jmx;
import org.joda.time.DateTime;
import org.rrd4j.ConsolFun;
import org.rrd4j.core.FetchData;
import org.rrd4j.core.FetchRequest;
import org.rrd4j.core.RrdDb;
import org.rrd4j.core.Util;
public class Fetch {
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${code-house.plugin.javadoc.version}</version>
<configuration>
<stylesheetfile>javadoc-${division}.css</stylesheetfile>
<docencoding>${project.build.sourceEncoding}</docencoding>
<doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
<docletArtifact>
<groupId>org.umlgraph</groupId>
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
">
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
">