Skip to content

Instantly share code, notes, and snippets.

@rwinch
rwinch / DoocbookToAsciidoctor.groovy
Created October 4, 2013 14:21
Script for approximate conversion of Docbook to Asciidoctor
import javax.xml.parsers.SAXParserFactory
import org.xml.sax.helpers.DefaultHandler
import org.xml.sax.*
String EOL = "---EOL---"
File doc = new File("/home/rwinch/git/spring-security-3.2.x/docs/manual/src/docbook/index.xml")
class Docbook5Handler extends DefaultHandler {
File doc
@rwinch
rwinch / DocbookToAsciidoctorForSpring.groovy
Created October 4, 2013 21:16
Script for approximate conversion of Docbook to Asciidoctor modified for Spring
import javax.xml.parsers.SAXParserFactory
import org.xml.sax.helpers.DefaultHandler
import org.xml.sax.*
String EOL = "---EOL---"
File doc = new File("/home/rwinch/git/spring-framework/src/reference/docbook/index.xml")
class Docbook5Handler extends DefaultHandler {
File doc
@rwinch
rwinch / Test.java
Created October 15, 2013 17:53
Imported Configuration can reference beans from Configuration that imported it
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
public class Test {
public static void main(String[] args) {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(A.class);
@rwinch
rwinch / build.gradle
Created December 11, 2013 14:39
Gradle DependencyResolveDetails example
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
compile 'org.springframework:spring-core', // spring-core has no version specified
// security brings in spring version 3.0.7
'org.springframework.security:spring-security-core:3.1.4.RELEASE'
Jun 25, 2014 11:34:19 AM org.apache.catalina.session.StandardSession expire
SEVERE: Session event listener threw exception
java.lang.NullPointerException
	at org.apache.tomcat.websocket.server.WsServerContainer.unregisterAuthenticatedSession(WsServerContainer.java:367)
	at org.apache.tomcat.websocket.server.WsServerContainer.unregisterSession(WsServerContainer.java:344)
	at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:494)
	at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:417)
	at org.apache.tomcat.websocket.WsSession.close(WsSession.java:394)
	at org.apache.tomcat.websocket.server.WsServerContainer.closeAuthenticatedSession(WsServerContainer.java:377)
@rwinch
rwinch / nested-tables.adoc
Created February 18, 2015 19:33
nested-tables.adoc

Events

Event name Description

setup

Keybase proof

I hereby claim:

  • I am rwinch on github.
  • I am rwinch (https://keybase.io/rwinch) on keybase.
  • I have a public key whose fingerprint is 3E61 ACA9 32AF 3DE7 02DC 5276 B5AA 7D62 F584 E2CD

To claim this, I am signing this object:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':docs:manual:referencePdf'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExe
@rwinch
rwinch / AesGsmMain.java
Created March 27, 2015 18:53
AesGsmMain.java
/*
* Copyright 2002-2015 the original author or authors.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@Autowired
public void configureGlobal(AuthenticationMangaerBuilder auth) {
auth
.authenticationProvider(adLdapAuthenticationProvier());
}
@Bean
public ActiveDirectoryAuthenticationProvider adLdapAuthenticationProvider() {
ActiveDirectoryAuthenticationProvider provider = ...