Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am uiktiomasfeliz on github.
  • I am uiktiomasfeliz (https://keybase.io/uiktiomasfeliz) on keybase.
  • I have a public key ASA8iTMwHNxQkiw-nq8LB_e7xObb4DqOdcjbrhfERU2hoQo

To claim this, I am signing this object:

@uiktiomasfeliz
uiktiomasfeliz / RealPathUtil.java
Created Jun 5, 2018 — forked from tatocaster/RealPathUtil.java
Real Path Utility class for Android, works for all API
View RealPathUtil.java
public class RealPathUtil {
public static String getRealPath(Context context, Uri fileUri) {
String realPath;
// SDK < API11
if (Build.VERSION.SDK_INT < 11) {
realPath = RealPathUtil.getRealPathFromURI_BelowAPI11(context, fileUri);
}
// SDK >= 11 && SDK < 19
else if (Build.VERSION.SDK_INT < 19) {
@uiktiomasfeliz
uiktiomasfeliz / db connector improved.js
Created Apr 21, 2017 — forked from tommedema/db connector improved.js
annotated mongodb node.js driver replicaset connection example, please read the comments
View db connector improved.js
module.exports = function(mediator) {
var mongo = require('mongodb'),
Server = mongo.Server,
Db = mongo.Db,
ReplSet = mongo.ReplSet,
config = require('../../config'),
replSetName = config.mongo.rsname,
servers = config.mongo.servers,
dbName = config.mongo.dbname;
@uiktiomasfeliz
uiktiomasfeliz / GZipRequest.java
Created Dec 14, 2016 — forked from premnirmal/GZipRequest.java
Parse GZip responses using volley
View GZipRequest.java
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Response;
import com.android.volley.toolbox.HttpHeaderParser;
import com.android.volley.toolbox.StringRequest;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStreamReader;