Skip to content

Instantly share code, notes, and snippets.

View jonikarppinen's full-sized avatar

Joni Karppinen jonikarppinen

View GitHub Profile
@jonikarppinen
jonikarppinen / proguard-project.txt
Last active August 1, 2017 09:56
Example ProGuard config for a project using RxJava, Guava and Gson
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
@jonikarppinen
jonikarppinen / markdown-comments.md
Last active April 21, 2024 23:44
How to comment out stuff in Markdown on GitHub?

Comments in GitHub flavour of Markdown

As answers to this Stack Overflow question reveal, using <!--- and ---> or <!-- and --> works (view source by clicking "Raw"):

@jonikarppinen
jonikarppinen / Question20442265.java
Last active December 30, 2015 17:39
Answer for this question about Gson: http://stackoverflow.com/questions/20442265/how-to-decode-json-with-unknown-field-using-gson. This demonstrates how to use custom deserialiser to parse a big list of properties of the same type but unknown/random/varying names. Besides JDK, depends on Guava library.
import com.google.common.base.Charsets;
import com.google.common.io.Files;
import com.google.gson.*;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;