Skip to content

Instantly share code, notes, and snippets.

View shercoder's full-sized avatar

Pardeep Singh Sanghera shercoder

View GitHub Profile
@shercoder
shercoder / README.md
Last active August 29, 2015 14:25 — forked from gabrielemariotti/README.md
How to manage the support libraries in a multi-module projects. Thanks to Fernando Cejas (http://fernandocejas.com/)

Centralize the support libraries dependencies in gradle

Working with multi-modules project, it is very useful to centralize the dependencies, especially the support libraries.

A very good way is to separate gradle build files, defining something like:

root
  --gradleScript
 ----dependencies.gradle
@shercoder
shercoder / mitmproxy_localytics.py
Created July 9, 2015 22:20
Script to parse Localytics data and display in readable format when using mitmproxy server
######################################################################
### How to run this script: mitmdump -q -s mitmproxy_localytics.py ###
######################################################################
import re
import gzip
from StringIO import StringIO
import json
from pprint import pprint
class color:
import android.util.Log;
import com.squareup.leakcanary.AnalysisResult;
import com.squareup.leakcanary.DisplayLeakService;
import com.squareup.leakcanary.HeapDump;
import retrofit.RestAdapter;
import retrofit.RetrofitError;
import retrofit.http.Multipart;
import retrofit.http.POST;
import retrofit.http.Part;
import retrofit.mime.TypedFile;
@shercoder
shercoder / README.md
Last active August 29, 2015 14:20 — forked from polbins/README.md

Android REST Controller with Cache-Control

Android REST Controller with Simple Cache Control Headers using Retrofit 1.9.0 + OkHttp 2.2.0

package com.example.yourapp;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import com.example.yourapp.AuthenticationModel;
import retrofit.client.Header;
import retrofit.client.OkClient;
package com.sjl.util;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import java.util.List;
@shercoder
shercoder / README.md
Last active August 29, 2015 14:18 — forked from polbins/README.md

Android REST Controller with Cache-Control

Android REST Controller with Simple Cache Control Headers using Retrofit 1.9.0 + OkHttp 2.2.0

#!/bin/bash
# Author: Tobias Preuss
# Version: 2014-08-01
echo "Creating symbolic links in Android SDK folder"
echo "============================================="
echo
if [ -z "$ANDROID_HOME" ] ; then
  • To list dependencies: gradlew -q dependencies

Docker Cheat Sheet

Why

Why Should I Care (For Developers)

"Docker interests me because it allows simple environment isolation and repeatability. I can create a run-time environment once, package it up, then run it again on any other machine. Furthermore, everything that runs in that environment is isolated from the underlying host (much like a virtual machine). And best of all, everything is fast and simple."

TL;DR, I just want a dev environment