Skip to content

Instantly share code, notes, and snippets.

View mraible's full-sized avatar

Matt Raible mraible

View GitHub Profile
/* Logo */
#logo a {background-image:url('http://wufoo.com/images/themes/logos/shark.png'); min-height:0; height:40px}
* html #logo a {/* IE6 png Support */
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://wufoo.com/images/themes/logos/shark.png", sizingMethod="crop");
}
/* Backgrounds */
html{background-image:none;background-color:#99cc00}
#logo{background-image:none;background-color:#669900}
@mraible
mraible / pom.diff
Last active August 29, 2015 14:03
POM after Spring IO Platform 1.0
diff --git a/pom.xml b/pom.xml
index 4a63dd2..7f2bb32 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,9 +3,20 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<camel.version>2.14-SNAPSHOT</camel.version>
<cxf.version>3.0.0</cxf.version>
- <spring.version>4.0.5.RELEASE</spring.version>
</properties>
@mraible
mraible / HelloWorldController.java
Created September 29, 2014 13:11
Returning JAXBElement
import org.ncpdp.schema.transport.MessageType;
import org.ncpdp.schema.transport.ObjectFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.xml.bind.JAXBElement;
@RestController
public class HelloWorldController {
@mraible
mraible / swagger.json
Created December 4, 2014 17:35
Swagger sample from Restlet Studio
{
"swagger": "2.0",
"info": {
"description": "Articles at InfoQ",
"version": "1.0.0",
"title": "Articles API",
"contact": {},
"license": {
"name": "TBD"
}
@mraible
mraible / boot.log
Created January 5, 2015 20:01
SAML Okta Spring Boot Stacktrace
[2015-01-05 12:56:30.201] boot - 13519 DEBUG [http-nio-8080-exec-2] --- SAMLProcessingFilter: Request is to process authentication
[2015-01-05 12:56:30.201] boot - 13519 DEBUG [http-nio-8080-exec-2] --- SAMLProcessingFilter: Attempting SAML2 authentication using profile urn:oasis:names:tc:SAML:2.0:profiles:SSO:browser
[2015-01-05 12:56:30.201] boot - 13519 DEBUG [http-nio-8080-exec-2] --- SAMLProcessingFilter: Error determining metadata contracts
org.opensaml.saml2.metadata.provider.MetadataProviderException: No local entity found for alias defaultAlias, verify your configuration.
at org.springframework.security.saml.context.SAMLContextProviderImpl.populateLocalEntityId(SAMLContextProviderImpl.java:279)
at org.springframework.security.saml.context.SAMLContextProviderImpl.getLocalEntity(SAMLContextProviderImpl.java:106)
at org.springframework.security.saml.SAMLProcessingFilter.attemptAuthentication(SAMLProcessingFilter.java:76)
at org.springframework.security.web.authentication.AbstractAuthenticationProces
@mraible
mraible / talks-2015.md
Last active August 29, 2015 14:13
2015 Conference Talks

Below is a list of talks I'd like to present at various conferences in 2015. If you have other suggestions, please leave a comment.

  • The Art of AngularJS in 2015
  • Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap
  • Developing, Testing and Scaling with Apache Camel
  • Java Web Application Security with Java EE, Spring Security and Apache Shiro
  • #NoXML: Eliminating XML in your Java projects
  • Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js
  • Scalability Architecture: Principles, Processes, Teams and Applications
@mraible
mraible / Gruntfile.js
Created April 17, 2015 23:20
Gruntfile.js
'use strict';
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
watch: {
web: {
files: ['build/asciidoc/html5/chapters/**/*.html']
}
@mraible
mraible / Procfile
Created May 15, 2015 16:09
Procfile for JHipster on Heroku
web: java $JAVA_OPTS -jar target/*.war --spring.profiles.active=prod --server.port=$PORT --spring.datasource.heroku-url=$DATABASE_URL --metrics.jmx.enabled=false --spring.datasource.jmx-enabled=false --spring.jmx.enabled=false --management.security.enabled=false --endpoints.jmx.enabled=false
@mraible
mraible / account.js
Created May 21, 2015 16:26
Setting expectations when making direct server calls with Protractor
it('should delete account successfully', function (done) {
req.post({json: true, url: constants.apiHostname() + '/api/v1/login/', form: {username: generatedEmail, password: password}}, function(error, message, body) {
var userId = body.user.id;
expect(userId).not.toBe(null);
req.del(constants.apiHostname() + '/api/v1/users/' + userId, done, function (error, message, body) {
expect(userId).toBe(204);
done();
});
});
@mraible
mraible / console.log
Created July 13, 2015 19:03
spring-boot with Shiro Startup
2015-07-13 13:02:13.117 INFO 10456 --- [lication.main()] security.Application : Starting Application on mraible-2.local with PID 10456 (/Users/mraible/dev/java-webapp-security-examples/apache-shiro/target/classes started by mraible in /Users/mraible/dev/java-webapp-security-examples/apache-shiro)
2015-07-13 13:02:13.145 INFO 10456 --- [lication.main()] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@5accd554: startup date [Mon Jul 13 13:02:13 MDT 2015]; root of context hierarchy
2015-07-13 13:02:13.473 INFO 10456 --- [lication.main()] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'beanNameViewResolver': replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfigura