Skip to content

Instantly share code, notes, and snippets.

Nathan Esquenazi nesquena

Block or report user

Report or block nesquena

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nesquena
nesquena / MainThreadCallback.java
Last active Jun 6, 2018 — forked from petitviolet/MainThreadCallback.java
OkHttp Callback on Main Thread.
View MainThreadCallback.java
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);
@Override
public void onFailure(final Request request, final IOException e) {
@nesquena
nesquena / CursorRecyclerAdapter.java
Created Apr 3, 2017
Cursor Adapters for RecyclerView
View CursorRecyclerAdapter.java
/*
* 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
nesquena / PatternEditableBuilder.java
Last active Nov 10, 2019
PatternEditableBuilder - Easy way to create colored clickable spans within a TextView!
View PatternEditableBuilder.java
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextPaint;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.view.View;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.regex.Matcher;
@nesquena
nesquena / SnappyRecyclerView.java
Last active Oct 30, 2019
Snap-to-Center RecyclerView Extension
View SnappyRecyclerView.java
// From: http://stackoverflow.com/a/37816976
public class SnappyRecyclerView extends RecyclerView {
// Use it with a horizontal LinearLayoutManager
// Based on http://stackoverflow.com/a/29171652/4034572
public SnappyRecyclerView(Context context) {
super(context);
}
@nesquena
nesquena / Contact.java
Last active Oct 29, 2019 — forked from rogerhu/Contact.java
Endless Scrolling with RecyclerVIew
View Contact.java
package codepath.com.recyclerviewfun;
import java.util.ArrayList;
import java.util.List;
public class Contact {
private String mName;
private boolean mOnline;
public Contact(String name, boolean online) {
@nesquena
nesquena / ItemClickSupport.java
Last active Nov 8, 2019
Click handling for RecyclerView
View ItemClickSupport.java
/*
Source: http://www.littlerobots.nl/blog/Handle-Android-RecyclerView-Clicks/
USAGE:
ItemClickSupport.addTo(mRecyclerView).setOnItemClickListener(new ItemClickSupport.OnItemClickListener() {
@Override
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
end
post :create, map: "" do
end
View test.md

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
end
def self.test_mode=(mode)
@test_mode = mode
end
View top_100_mobile_companies.txt
Advertising
AdColony
adcolony.com
Los Angeles, CA
Appia
appia.com
Durham, NC
You can’t perform that action at this time.