Skip to content

Instantly share code, notes, and snippets.

View cheinema's full-sized avatar

Christian Heinemann cheinema

View GitHub Profile
@cheinema
cheinema / wildfly-9.0.2.Final-standalone-full-ha.cli
Created November 29, 2015 19:17
WildFly CLI scripts to build the default configurations
embed-server --server-config=custom-full-ha.xml --empty-config --remove-existing
# Extensions first
batch
/extension=org.jboss.as.clustering.infinispan:add
/extension=org.jboss.as.clustering.jgroups:add
/extension=org.jboss.as.connector:add
/extension=org.jboss.as.deployment-scanner:add
/extension=org.jboss.as.ee:add
/extension=org.jboss.as.ejb3:add
/extension=org.jboss.as.jaxrs:add
// To be run with the Jenkins EnvInject plugin in the section
// "Prepare an environment for the run/Evaluated Groovy script" of the job configuration
def url = JOB_URL + 'lastStableBuild/api/json?tree=changeSet[revisions[revision]]'
def json = new groovy.json.JsonSlurper().parseText(url.toURL().text)
return ['LAST_SVN_REVISION': json.changeSet.revisions[0].revision]
@cheinema
cheinema / Dockerfile
Last active August 29, 2015 14:05
Dockerfiles/ubuntu-jenkins-slave
FROM ubuntu:14.04
MAINTAINER Christian Heinemann <ch@chlab.net>
RUN apt-get update
RUN apt-get install -y openssh-server
RUN apt-get install -y openjdk-7-jre-headless
RUN apt-get install -y git-core
# Setup SSH server
RUN mkdir -p /var/run/sshd
@cheinema
cheinema / Lambda.java
Created November 19, 2011 09:53
Demo of Lambda Expressions
import java.util.HashMap;
import java.util.Map;
public class Lambda {
enum Attribute { NAME, AGE };
interface ToString<T> { String toString(T object); };
public static void main(final String[] args) throws Exception {
final Map<Attribute, ToString<Person>> mapping = new HashMap<>();
CREATE TABLE bulk (x NUMBER(9), y NUMBER(9));
INSERT INTO bulk(x,y) VALUES (0,0);
INSERT INTO bulk(x,y) VALUES (1,1);
DECLARE
CURSOR vac_bulk IS
SELECT t.ROWID AS tRowID, t.x, t.y FROM bulk t;
TYPE t_bulk IS TABLE OF vac_bulk%ROWTYPE;
vaa_bulk_tmp t_bulk;