Skip to content

Instantly share code, notes, and snippets.

View rahulgautam's full-sized avatar

Rahul Gautam rahulgautam

View GitHub Profile
@rahulgautam
rahulgautam / UseApiKey.java
Created November 4, 2015 09:35 — forked from curioustechizen/UseApiKey.java
Android: Loading API Keys and other secrets from properties file using gradle
String apiKey = BuildConfig.API_KEY
import android.graphics.Bitmap;
import android.media.MediaMetadataRetriever;
import com.squareup.picasso.Picasso;
import com.squareup.picasso.Request;
import com.squareup.picasso.RequestHandler;
import java.io.IOException;
import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import android.util.Log;
import java.io.*;
import java.net.CookieStore;
import java.net.HttpCookie;
import java.net.URI;
import java.net.URISyntaxException;
sudo sed -i '' 's/>10.9</>10.10</' /System/Library/CoreServices/SystemVersion.plist
///**********************
/// Project build.gradle
///**********************
buildscript {
repositories {
maven { url "https://github.com/layerhq/releases-gradle/raw/master/releases" }
mavenCentral()
jcenter()
}
package com.layer.sample.adapters;
import android.database.DataSetObserver;
import android.net.Uri;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Adapter;
import com.layer.sdk.LayerChange;
import com.layer.sdk.LayerChangeEvent;
@protocol LYRClientDelegate <NSObject>
@optional
/**
@abstract Called when client status changes.
@param client The client calling the delegate method.
@param status The new status of the client.
@param error An `NSError` object that contains error information in case the action was not successful.
*/
#
# Varnish VCL file for Ghost blogging platform.
# http://ghost.org/
#
# Written for Ghost v0.3.0.
#
# This is a low-hanging-fruit type of VCL. TTL of objects are overridden to 2
# minutes, and everything below /ghost/ is pass()-ed so the user sessions
# work.
#
{loglevel, 5}.
%%% ================
%%% SERVED HOSTNAMES
{hosts, ["127.0.0.1"]}.
%%%
%%% ejabberd configuration file
%%%
%%% The parameters used in this configuration file are explained in more detail
%%% in the ejabberd Installation and Operation Guide.
%%% Please consult the Guide in case of doubts, it is included in
%%% your copy of ejabberd, and is also available online at
%%% http://www.process-one.net/en/ejabberd/docs/