Skip to content

Instantly share code, notes, and snippets.

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 June 5, 2018 06:33 — forked from tatocaster/RealPathUtil.java
Real Path Utility class for Android, works for all API
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 April 21, 2017 12:15 — forked from tommedema/db connector improved.js
annotated mongodb node.js driver replicaset connection example, please read the comments
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 December 14, 2016 12:51 — forked from premnirmal/GZipRequest.java
Parse GZip responses using volley
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;