Skip to content

Instantly share code, notes, and snippets.

View timoteoponce's full-sized avatar

Timoteo Ponce timoteoponce

View GitHub Profile
@timoteoponce
timoteoponce / TestPaginator.java
Created July 15, 2011 18:29
Paginator usage example
import java.util.Arrays;
import java.util.List;
import java.util.logging.Logger;
import org.timo.paginator.ListProvider;
import org.timo.paginator.Paginator;
import org.timo.paginator.Segment;
import org.timo.paginator.SegmentProvider;
/**
@timoteoponce
timoteoponce / gist:676291
Created November 15, 2010 01:10
example-gitconfig
#
# This is the config file, and
# a '#' or ';' character indicates
# a comment
#
; core variables
[core]
; Don't trust file modes
filemode = false
package org.timo.gitconfig;
import java.io.IOException;
import java.util.logging.Logger;
public class GitConfigurationExample {
private static final Logger LOG = Logger
.getLogger(GitConfigurationExample.class.getName());
@timoteoponce
timoteoponce / gist:671113
Created November 10, 2010 16:50
BaseFactory.java
package org.uagrm.addressbook.util;
import java.lang.reflect.Constructor;
import java.util.HashMap;
import java.util.Map;
/**
* Generic factory cache component, which binds an specific class definition
* with a class instance. It provides caching and creation facilities. Note: All
* bind classes should use classes(Boolean) as constructor parameters, native