Instantly share code, notes, and snippets.


How to create Android distribution certificate

Use keytool to create a signing key:

keytool -genkey -v -keystore redhat.keystore -alias rhmap -keyalg RSA -keysize 2048 -validity 10000

Export the java keystore key intp pkcs#12 format:


Keybase proof

I hereby claim:

  • I am danielpassos on github.
  • I am passos ( on keybase.
  • I have a public key whose fingerprint is 65A4 C36C 691C BE66 A107 06A5 1A0C 01BD 9F81 42B2

To claim this, I am signing this object:

View gist:4021866
View gist:3998149


public final class PipeConfig {

    private final String name;
    private final String endpoint;
    private final Type type;
* JBoss, Home of Professional Open Source
* Copyright 2012, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
View Pipe

Builder for Pipe creation

// http://myServer/myProject/foo
Pipe<Foo> fooPipe = pipeline.pipe(Foo.class).buildAndAdd();

// http://myServer/myProject/my-crazy-endpoint
Pipe<Bar> barPipe = pipeline.pipe(Bar.class)
        .name("bad name")
View gist:3924227
// From
public void read(final Callback<T[]> callback) {
Runnable runner = new Runnable() {
public void run() {
final T[] result;
try {
result = gson.fromJson(new String(httpProvider.get()), exemplar);
} catch (Exception e) {
View AliasToBeanResultAdvancedTransformer
import java.util.Collection;
import java.util.List;
import net.vidageek.mirror.dsl.Mirror;
import org.hibernate.HibernateException;
import org.hibernate.transform.ResultTransformer;