Skip to content

Instantly share code, notes, and snippets.

Josh Feinberg joshafeinberg

Block or report user

Report or block joshafeinberg

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
@joshafeinberg
joshafeinberg / index.js
Created Apr 30, 2017
CTA Bus Lookup With Permissions
View index.js
/*
* Copyright (C) 2017 Josh Feinberg
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@joshafeinberg
joshafeinberg / index.js
Created Apr 29, 2017
CTA Bus Lookup for API.AI
View index.js
/*
* Copyright (C) 2017 Josh Feinberg
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
View CrashTree.java
class CrashTree extends Timber.Tree {
@Override
protected void log(int priority, String tag, String message, Throwable t) {
if (t != null && priority == Log.ERROR) {
throw new RuntimeException(t);
}
}
}
@joshafeinberg
joshafeinberg / HostSelectionInterceptor.java
Last active Sep 26, 2016 — forked from swankjesse/HostSelectionInterceptor.java
This OkHttp application interceptor will replace the destination hostname in the request URL.
View HostSelectionInterceptor.java
import java.io.IOException;
import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.Request;
/** An interceptor that allows runtime changes to the URL hostname. */
public final class HostSelectionInterceptor implements Interceptor {
private volatile String host;
You can’t perform that action at this time.