Skip to content

Instantly share code, notes, and snippets.

Avatar

Jan Galinski jangalinski

View GitHub Profile
@thomasdarimont
thomasdarimont / KeycloakAdminClientExample.java
Created Jun 7, 2017
Simple example for creating a User with Keycloaks Admin Client - with credentials, custom roles, and user attributes
View KeycloakAdminClientExample.java
package de.tdlabs.keycloak.client;
import java.util.Arrays;
import java.util.Collections;
import javax.ws.rs.core.Response;
import org.keycloak.OAuth2Constants;
import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.KeycloakBuilder;
View A_FindFirstFindAnyReduceToOnlyElement.java
package org.codefx.lab.stream;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BinaryOperator;
import java.util.function.Supplier;
/**
* Finds a certain customer in a collection of customers.
@tomsquest
tomsquest / logback-test.xml
Last active Sep 4, 2020
logback-test.xml that suits well for testing.Includes the method and line of the call (not suitable for production).
View logback-test.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%date %highlight(%-5level) [%thread] %highlight(%class.%method:%line) - %msg%n</pattern>
</encoder>
</appender>
<!--
View jboss-deployment-structure.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
<!--
I have a ear deployment, I'm specifying only the module which is client of the EJB Remote module running in AS5.
My client class is itself an EJB 3.1 running in JBoss AS7. It is client of an EJB 2.0 running in JBoss AS5.
-->
<sub-deployment name="my-ejb-module-on-as7-${project.version}.jar">
<dependencies>
@pendor
pendor / SystemPropertiesService.java
Created Sep 21, 2012
SystemPropertiesService forward-ported for JBoss 7.x
View SystemPropertiesService.java
package ucs.jb4compat;
/***************************************
* *
* JBoss: The OpenSource J2EE WebOS *
* *
* Distributable under LGPL license. *
* See terms of license at gnu.org. *
* *
***************************************/