Skip to content

Instantly share code, notes, and snippets.


Nathan Esquenazi nesquena

View GitHub Profile
nesquena /
Last active Jun 6, 2018 — forked from petitviolet/
OkHttp Callback on Main Thread.
public abstract class MainThreadCallback implements Callback {
private static final String TAG = MainThreadCallback.class.getSimpleName();
abstract public void onFail(final Exception error);
abstract public void onSuccess(final String responseBody);
public void onFailure(final Request request, final IOException e) {
nesquena /
Created Apr 3, 2017
Cursor Adapters for RecyclerView
* The MIT License (MIT)
* Copyright (c) 2015 ARNAUD FRUGIER
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
nesquena /
Last active May 9, 2022
PatternEditableBuilder - Easy way to create colored clickable spans within a TextView!
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextPaint;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.regex.Matcher;
nesquena /
Last active Jun 22, 2022
Snap-to-Center RecyclerView Extension
// From:
public class SnappyRecyclerView extends RecyclerView {
// Use it with a horizontal LinearLayoutManager
// Based on
public SnappyRecyclerView(Context context) {
nesquena /
Last active Oct 7, 2020 — forked from rogerhu/
Endless Scrolling with RecyclerVIew
import java.util.ArrayList;
import java.util.List;
public class Contact {
private String mName;
private boolean mOnline;
public Contact(String name, boolean online) {
nesquena /
Last active Jun 28, 2022
Click handling for RecyclerView
ItemClickSupport.addTo(mRecyclerView).setOnItemClickListener(new ItemClickSupport.OnItemClickListener() {
public void onItemClicked(RecyclerView recyclerView, int position, View v) {
// do it
View app.rb
Api::App.controllers :posts, map: "api/v1/posts" do
get :index, map: "" do
post :create, map: "" do

Hey Team,

In preparation for Demo Day as finalists, there are a few things that you should do before latest August 3rd at 10pm:

  • README: If you haven't yet, send a github readme with a) paragraph about non-profit, b) paragraph about app, c) gif walkthrough ASAP
  • Presentation: Upload your slide presentation in your desired format to this Google Drive. We will make the presentation available to you on a shared laptop with support for powerpoint, keynote and PDFs.
  • App Demo
    • (iOS) Make sure to have your app ready to go on an iPhone device which will be projected onto the screen
    • (Android) Make sure to have a Nexus 4 or 5 with your app installed OR send us the APK for your app which we will install on a Nexus 5
  • There is no easy way to present more than one device at a time at the New Relic setup
View backburner_test_helper.rb
if Rails.env.test?
module Backburner
def self.test_mode
@test_mode ||= :fake
def self.test_mode=(mode)
@test_mode = mode
View top_100_mobile_companies.txt
Los Angeles, CA
Durham, NC