Skip to content

Instantly share code, notes, and snippets.

View bjpbakker's full-sized avatar

Bart Bakker bjpbakker

View GitHub Profile
(autoload 'web-mode "web-mode")
(add-to-list 'auto-mode-alist '("\\.jsx\\'" . web-mode))
(defadvice web-mode-highlight-part (around tweak-jsx activate)
(if (equal web-mode-content-type "jsx")
(let ((web-mode-enable-part-face nil))
ad-do-it)
ad-do-it))
@bjpbakker
bjpbakker / StatelessPageMatcher.java
Created September 26, 2013 19:35
Hamcrest matcher for asserting that a Wicket page is stateless
package com.github.bjpbakker.gist;
import org.apache.wicket.Component;
import org.apache.wicket.Page;
import org.apache.wicket.util.visit.IVisit;
import org.apache.wicket.util.visit.IVisitor;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeDiagnosingMatcher;
@bjpbakker
bjpbakker / JndiCapableJdbcAppender.java
Created February 7, 2011 22:14
Extension of the log4j JDBCAppender to allow using a JNDI data source
package nl.iprofs.blogs.log4j.databaselogging;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.naming.Context;
import javax.naming.InitialContext;
package nl.iprofs.blogs.junit4features.runner;
import java.io.File;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.LinkedList;
import java.util.List;
import org.junit.Test;
import org.junit.runners.Suite;
import org.junit.runners.model.InitializationError;