Skip to content

Instantly share code, notes, and snippets.

@tburch
tburch / keybase.md
Created August 22, 2017 16:20
keybase.md

Keybase proof

I hereby claim:

  • I am tburch on github.
  • I am tburch (https://keybase.io/tburch) on keybase.
  • I have a public key whose fingerprint is 540E 3C0F 1441 6F01 C573 566C B813 B8F0 0CC4 8F22

To claim this, I am signing this object:

@tburch
tburch / FizzBuzz.scala
Created July 27, 2012 16:31
FizzBuzz
(1 to 100) map { x =>
(x % 3, x % 5) match {
case (0, 0) => ”FizzBuzz”
case (0, _) => “Fizz”
case (_, 0) => “Buzz”
case _ => x.toString
}
} foreach println
@tburch
tburch / ObjectifyFactoryFactoryBean.java
Created April 5, 2012 15:58
ObjectifyFactory FactoryBean with automatic Entity registration
package com.tristanburch.objectify;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.core.type.filter.AnnotationTypeFilter;
@tburch
tburch / springConfig.xml
Created January 6, 2011 17:22
ScalateViewResolver Spring MVC integration
<bean id="scalateUrlBasedViewResolver" class="org.fusesource.scalate.spring.view.ScalateViewResolver" p:order="#{contentNegotiatingViewResolver.order+1}">
<property name="prefix" value="/WEB-INF/views/scalate/" />
<property name="suffix" value=".jade" />
</bean>
<bean id="urlBasedViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:order="#{scalateUrlBasedViewResolver.order+1}">
<property name="prefix" value="/WEB-INF/views/jsp/" />
<property name="suffix" value=".jsp" />
</bean>