Skip to content

Instantly share code, notes, and snippets.

View jacobtabak's full-sized avatar

Jacob Tabak jacobtabak

View GitHub Profile
package me.tabak.jacob.war
class Game(private val deck1: Deck, private val deck2: Deck) {
fun play() : Int {
println("Starting game!")
printDecks()
var winner = 0
while (deck1.isNotEmpty() && deck2.isNotEmpty()) {
winner = battle()
}
package com.dramafever.common.gson;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
public final class AutoValueTypeAdapterFactory implements TypeAdapterFactory {
private static final String AUTOVALUE_PREFIX = "AutoValue_";
@jacobtabak
jacobtabak / PicassoVideoFrameRequestHandler.java
Last active March 11, 2017 11:39
Picasso Video Frame RequestHandler
import android.graphics.Bitmap;
import android.media.MediaMetadataRetriever;
import com.squareup.picasso.Picasso;
import com.squareup.picasso.Request;
import com.squareup.picasso.RequestHandler;
import java.io.IOException;
import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import android.util.Log;
import java.io.*;
import java.net.CookieStore;
import java.net.HttpCookie;
import java.net.URI;
import java.net.URISyntaxException;