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: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

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;

Java 7 (JDK, JRE, java browser plugin)

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
s
set wrapmargin=8
set ruler
set number
" ts = tabstop, sw = shiftwidth, sts = softtabstop
set ts=4 sw=4 sts=2
" expandtab: appropriate number of spaces in insert mode
set expandtab