This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying my Blockstack ID is secured with the address 1Fqp6zQfSmDqLq21z3AygQwULMoLy9vaar https://explorer.blockstack.org/address/1Fqp6zQfSmDqLq21z3AygQwULMoLy9vaar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MockApiInterceptor implements Interceptor { | |
@Override | |
public Response intercept(Interceptor.Chain chain) { | |
Request request = chain.request(); | |
MockResponse mockResponse = getResponse(request); | |
return new Response.Builder().request(request) | |
.code(mockResponse.code) | |
.protocol(Protocol.HTTP_2) | |
.body(ResponseBody.create(MediaType.parse("text/json"), mockResponse.body)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.annotation.LayoutRes; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import java.util.List; | |
public class RecyclerAdapter<T, VH extends RecyclerViewHolder<T>> extends RecyclerView.Adapter<VH> { | |
private final List<T> adapterList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActiveRecord | |
class Base | |
def self.tp(attribute = nil) | |
if attribute | |
t(attribute).pluralize(I18n.locale) | |
else | |
t.pluralize(I18n.locale) | |
end | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Wait { | |
private static final int CHECK_INTERVAL = 100; | |
private static final int TIMEOUT = 10000; | |
public interface Condition { | |
boolean check(); | |
} | |
private Condition mCondition; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.annotation.Nullable; | |
// Based on http://google-collections.googlecode.com/svn-history/r78/trunk/javadoc/com/google/common/base/Preconditions.html | |
public class Preconditions { | |
public static void checkArgument(boolean expression, @Nullable Object errorMessage) { | |
if (!expression) { | |
throw new IllegalArgumentException(String.valueOf(errorMessage)); | |
} |