Skip to content

Instantly share code, notes, and snippets.

@ieugen
ieugen / JcrQueryLibrary.md
Created March 7, 2018 10:59 — forked from floriankraft/JcrQueryLibrary.md
Some useful JCR queries (XPATH, SQL2) for AEM/CQ development.

SQL2

All nodes with a specific name

SELECT * FROM [nt:unstructured] AS node
WHERE ISDESCENDANTNODE(node, "/search/in/path")
AND NAME() = "nodeName"

All pages below content path

@ieugen
ieugen / MutateQuestionnaireDataFetchers.java
Last active May 30, 2017 11:02
graphql-java schema wiring factory
@Data
@AllArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@Configuration
public class MutateQuestionnaireDataFetchers {
@Autowired
DataCollectionService dataCollectionService;
@Autowired
@ieugen
ieugen / Account
Created May 4, 2017 04:55
Graphql-apigen
@Component
public class Account implements gr8pi.graphql.core.api.Account {
@Override
public String getId() {
return "demo";
}
@Override
public List<Respondent> getRespondents() {
@ieugen
ieugen / VertxOdataHandlerImpl.java
Created March 31, 2017 13:19
Oling 3 handler for odata
package ro.trusted.web;
import com.google.common.base.Throwables;
import io.vertx.core.Handler;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.ext.web.RoutingContext;
import lombok.Data;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
@ieugen
ieugen / alfio
Last active November 7, 2020 04:42
alf.io debian deployment
/etc/default/alfio
----
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre
MODE=service
#PORT=9001
JAVA_OPTS="-Ddatasource.driver=org.postgresql.Driver -Ddatasource.url=jdbc:postgresql://localhost:5433/alfio -Ddatasource.username=alfio -Ddatasource.password=secret -Ddatasource.dialect=PGSQL -Ddatasource.validationQuery='SELECT 1'"
@ieugen
ieugen / jbake-build.gradle
Last active March 6, 2016 08:57
My gradle recipe to build and deploy static websites with Jbake
plugins {
id 'org.ajoberstar.github-pages' version '1.4.2'
}
githubPages {
repoUri = 'git@github.com:ieugen/ieugen.ro.git'
pages {
from 'output'
}
}
@ieugen
ieugen / build.gradle
Created February 16, 2016 11:40
querydsl sql integration with flyway database migration
plugins {
id "org.flywaydb.flyway" version "3.2.1"
id 'java'
id 'idea'
}
description = 'GR8PI :: Database Model'
sourceCompatibility = 1.8
import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import io.vertx.core.VertxException;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.file.FileSystem;
import io.vertx.ext.web.RoutingContext;
import io.vertx.ext.web.impl.Utils;
import io.vertx.ext.web.templ.ThymeleafTemplateEngine;
import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import io.vertx.core.VertxException;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.file.FileSystem;
import io.vertx.ext.web.RoutingContext;
import io.vertx.ext.web.impl.Utils;
import io.vertx.ext.web.templ.ThymeleafTemplateEngine;
@ieugen
ieugen / bpmn-sample.js
Created August 12, 2015 19:49
bpmn test
var bpmn = require("bpmn");
console.log("Start process")
bpmn.createUnmanagedProcess(__dirname + "/bpmn/simpleRegistration.bpmn", function(err, myProcess) {
console.log(err)
// we start the process
myProcess.triggerEvent("Start_registration");