Skip to content

Instantly share code, notes, and snippets.

View nesquena's full-sized avatar

Nathan Esquenazi nesquena

View GitHub Profile
@nesquena
nesquena / default.vcl
Created September 27, 2012 04:35 — forked from alanmackenzie/default.c
Add X-Request-Start header so we can track queue times in New Relic RPM beginning at Varnish. - Modified by me for varnish 2.X
#
# Add X-Request-Start header so we can track queue times in New Relic RPM beginning at Varnish.
# Taken from https://gist.github.com/494265 & modified to compile on OSX.
#
sub vcl_recv {
// NewRelic X-Request-Start tracking
C{
#include </etc/varnish/newrelic.h>
}C
@nesquena
nesquena / default.vcl
Created September 27, 2012 04:52 — forked from alanmackenzie/default.c
Add X-Request-Start header so we can track queue times in New Relic RPM beginning at Varnish. - Fixed for Varnish 3.0.2-1 on Ubuntu.
# For Varnish NewRelic Tracking
# https://gist.github.com/2820068
C{
#include <stddef.h>
#include <stdio.h>
#include <sys/time.h>
}C
sub vcl_recv {
@nesquena
nesquena / MainThreadCallback.java
Last active June 6, 2018 08:16 — forked from petitviolet/MainThreadCallback.java
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);
@Override
public void onFailure(final Request request, final IOException e) {
@nesquena
nesquena / Contact.java
Last active January 15, 2023 13:03 — forked from rogerhu/Contact.java
Endless Scrolling with RecyclerVIew
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) {