Skip to content

Instantly share code, notes, and snippets.

View eivinhb's full-sized avatar

Eivind Bergstøl eivinhb

  • Bekk Consulting as
  • Oslo
View GitHub Profile
@eivinhb
eivinhb / SecureKeyGenerator
Created May 24, 2012 08:27
Code for use in a blogg
public class SecureKeyGenerator implements KeyGenerator {
@Override
public Object generate(Object target, Method method, Object... params) {
Object keyPostFix = new DefaultKeyGenerator().generate(target, method, params);
if (target instanceof SecureKeyAware && ((SecureAware) target).getSecureKey() != null) {
return ((SecureKeyAware) target).getSecureKey() + keyPostFix;
} else {
@eivinhb
eivinhb / ehcahce.xml
Created May 24, 2012 10:19
Ehcache used in blogpost
<ehcache>
<diskStore path="java.io.tmpdir"/>
<defaultCache
name="name_of_cache"
maxEntriesLocalHeap="1000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true"
maxEntriesLocalDisk="10000000"
@eivinhb
eivinhb / vaffel_pannekake_oppskrift.md
Last active August 4, 2019 06:49
Vaffel- og pannekakeoppskrift (Sund og mettende)

Vaffel

1 porsjon metter to sultne

  • 1½ dl hvetemel
  • 1½ dl sammalt hvetemel, fin
  • 1 dl havregryn
  • ½ ts salt
  • ½ ts bakepulver
  • 4 dl lettmelk (0.5%/0.7% aka ekstra lett)