Skip to content

Instantly share code, notes, and snippets.

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

Clement Escoffier cescoffier

⚗️
Quarking...
View GitHub Profile
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 / 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"
}
@cescoffier
cescoffier / Dockerfile
Last active August 29, 2015 14:07
Dockerfile for wisdom application
###
# Build:
# docker build -t wisdom/acme-sample .
#
# Run:
# docker run -d -p 9000:9000 wisdom/acme-sample
#
# Optional volumes:
# - Logs: /root/wisdom/logs
# - Applications (where app bundles live): /root/wisdom/application
@cescoffier
cescoffier / UploadControllerSnippet.java
Created October 23, 2014 09:09
Ajax-based file upload with Wisdom Framework
@Requires
Json json;
@Route(method = HttpMethod.POST, uri = "/file2")
public Result upload2(final @FormParameter("file") FileItem file) throws
IOException {
if (file == null) {
logger().error("No uploaded file !");
flash("error", "true");
### Keybase proof
I hereby claim:
* I am cescoffier on github.
* I am cescoffier (https://keybase.io/cescoffier) on keybase.
* I have a public key whose fingerprint is 75D0 E0CE 2CA3 7E06 4CB8 3D39 02DE 2EE1 067B 2D75
To claim this, I am signing this object:
@cescoffier
cescoffier / logger.xml
Last active August 29, 2015 14:16
Wisdom - Example of logger configuration generating two files
<!--
#%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