Skip to content

Instantly share code, notes, and snippets.

Avatar

Eric Frohnhoefer efrohnhoefer

  • Twitter
  • San Francisco
View GitHub Profile
@efrohnhoefer
efrohnhoefer / ApiMetricsInterceptor.java
Created Apr 5, 2016
Code demonstrating how to measure API performance using Answers and OkHttp 2.2+.
View ApiMetricsInterceptor.java
import com.crashlytics.android.answers.Answers;
import com.crashlytics.android.answers.CustomEvent;
import com.squareup.okhttp.Interceptor;
import com.squareup.okhttp.MediaType;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.RequestBody;
import com.squareup.okhttp.Response;
import com.squareup.okhttp.ResponseBody;
import java.io.IOException;
@efrohnhoefer
efrohnhoefer / MiniJSON.cs
Created Oct 8, 2015 — forked from darktable/MiniJSON.cs
Unity3D: MiniJSON Decodes and encodes simple JSON strings. Not intended for use with massive JSON strings, probably < 32k preferred. Handy for parsing JSON from inside Unity3d.
View MiniJSON.cs
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining
@efrohnhoefer
efrohnhoefer / VerifyCredentialsController.scala
Last active Jul 11, 2016
Code demonstrating call to verify_credentials API using OAuth Echo. Written in Scala on the Play Framework.
View VerifyCredentialsController.scala
package controllers
import play.api.libs.ws.WS
import play.api.mvc.{Action, Controller}
import scala.concurrent.Future
class VerifyCredentialsController extends Controller {
implicit val context = scala.concurrent.ExecutionContext.Implicits.global