Skip to content

Instantly share code, notes, and snippets.

Avatar

Joni Karppinen jonikarppinen

View GitHub Profile
@jonikarppinen
jonikarppinen / proguard-project.txt
Last active Aug 1, 2017
Example ProGuard config for a project using RxJava, Guava and Gson
View proguard-project.txt
# 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 Apr 21, 2022
How to comment out stuff in Markdown on GitHub?
View markdown-comments.md

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 Dec 30, 2015
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.
View Question20442265.java
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;