Skip to content

Instantly share code, notes, and snippets.

View cescoffier's full-sized avatar
⚗️
Quarking...

Clement Escoffier cescoffier

⚗️
Quarking...
View GitHub Profile
package components;
import org.apache.felix.ipojo.annotations.*;
import org.apache.felix.ipojo.architecture.PropertyDescription;
import org.apache.felix.ipojo.dependency.interceptors.DefaultServiceTrackingInterceptor;
import org.apache.felix.ipojo.dependency.interceptors.ServiceTrackingInterceptor;
import org.apache.felix.ipojo.dependency.interceptors.TransformedServiceReference;
import org.apache.felix.ipojo.handlers.configuration.ConfigurationHandler;
import org.apache.felix.ipojo.handlers.configuration.ConfigurationHandlerDescription;
import org.apache.felix.ipojo.util.DependencyModel;
@cescoffier
cescoffier / TrackerAndRankerInterceptor.java
Created December 8, 2013 16:02
An iPOJO interceptor implementing both tracking and ranking interception.
package org.apache.felix.ipojo.runtime.core.test.interceptors;
import org.apache.felix.ipojo.annotations.Component;
import org.apache.felix.ipojo.annotations.Provides;
import org.apache.felix.ipojo.annotations.ServiceProperty;
import org.apache.felix.ipojo.dependency.interceptors.DefaultDependencyInterceptor;
import org.apache.felix.ipojo.dependency.interceptors.ServiceRankingInterceptor;
import org.apache.felix.ipojo.dependency.interceptors.ServiceTrackingInterceptor;
import org.apache.felix.ipojo.dependency.interceptors.TransformedServiceReference;
import org.apache.felix.ipojo.runtime.core.test.services.Setter;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF 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
*
* http://www.apache.org/licenses/LICENSE-2.0
package org.wisdom.ebean.mojo;
import java.util.Collection;
import java.util.concurrent.Callable;
/**
* Created by clement on 17/02/2014.
*/
public interface Crud<T> {
<!DOCTYPE html>
<html>
<head lang="en">
<title>Welcome to Wisdom</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="/libs/css/bootstrap.css" media="screen"/>
<link rel="stylesheet" href="/assets/main.css"/>
package org.wisdom.tutorial.models;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
@Entity
public class Task {
@cescoffier
cescoffier / except.xml
Created June 17, 2014 13:41
Check that firefox is accessible
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<id>enforce-beanshell</id>
<goals>
<goal>enforce</goal>
</goals>
@cescoffier
cescoffier / AsyncInputStream.java
Last active March 11, 2024 10:20
Async Input Stream VertX Read Stream
/*
* #%L
* Wisdom-Framework
* %%
* Copyright (C) 2013 - 2014 Wisdom Framework
* %%
* 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
*
@cescoffier
cescoffier / regular.conf
Created September 9, 2014 11:31
HOCON very close to properties
# Project
application.group=${project.groupId}
application.name=${project.artifactId}
application.version=${project.version}
# Application Secret
application.secret="7/19T8CiU@paf[9bF7ll<1/5@P:7xBQhFkxx??9ALJ[3B<cjoKm_k50yA_Ib2uT2"
# Configure ports.
http.port=9000
@cescoffier
cescoffier / hocon.conf
Created September 9, 2014 11:32
Structured HOCON
# Project
application {
group = ${project.groupId}
name = ${project.artifactId}
version = ${project.version}
# Application Secret
secret = "7/19T8CiU@paf[9bF7ll<1/5@P:7xBQhFkxx??9ALJ[3B<cjoKm_k50yA_Ib2uT2"
}