Skip to content

Instantly share code, notes, and snippets.

@pradeepkumargali
pradeepkumargali / redirect.sh
Created December 10, 2016 19:55
Android Redirect Command
/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/jre/bin/keytool -storepass myPassword -exportcert -alias mycertname -keystore /Users/J1012748/keystore/android.jks| openssl sha1 -binary | openssl base64
@pradeepkumargali
pradeepkumargali / prepareredirect.sh
Created December 10, 2016 19:40
Prepare Redirect
#!/bin/bash
#
# Requirements
# Install and setup Java We assume $JAVA_HOME is set
# Install openssl either through your linux package manager or macOS package manager (we like brew)
# Update to keystore folders for debug and release
set -o errtrace
set -o pipefail
@pradeepkumargali
pradeepkumargali / build.gradle
Last active November 27, 2016 06:34
Gradle file for Salesforce SDK in Android Studio
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.xxx.xxx.xxx.xxx"
minSdkVersion 17
targetSdkVersion 21
}
@pradeepkumargali
pradeepkumargali / spsearchrestpost.js
Last active November 26, 2016 16:40
SharePoint Search REST POST function
//Note: This is an angular implementation
function getRequestDigest() {
var deferred = $q.defer();
var config = {
'DataServiceVersion': '3.0',
'Accept': 'application/json; odata=nometadata',
'Content-Type': 'application/json;odata=verbose'
}
var data = {};
$http.post("../../_api/contextinfo", data, config).success(function (data, status, headers, config) {
@pradeepkumargali
pradeepkumargali / smartsync.js
Created June 30, 2015 05:33
Salesforce Mobile SDK - SmartSync.js with Ionic/Angular.js
(function ($, _, forcetk) {
"use strict";
// Save a reference to the global object (`window` in the browser).
var root = this;
// Save the previous value of the `Force` variable, so that it can be
// restored later on, if `noConflict` is used.
var previousForce = root.Force;
@pradeepkumargali
pradeepkumargali / appengine-web.xml
Last active August 29, 2015 14:23
Hosting a static website on Google AppEngine - Java
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>sree-kumar</application>
<version>2</version>
<static-files>
<include path="/static/**" expiration="30d 5h" />
</static-files>
<public-root>/static</public-root>
<!--
Allows App Engine to send multiple requests to one instance in parallel:
@pradeepkumargali
pradeepkumargali / XHRHelper.cs
Last active August 29, 2015 14:13 — forked from anonymous/gist:5bf4d9ba9cdb5d0f3f3e
Changes to XHRHelper.cs to make Ionic Work
using Microsoft.Phone.Controls;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.IsolatedStorage;
using System.Linq;
using System.Text;
using System.Windows;
<link rel="import" href="../../salesforce/mobile-ui-elements/elements/force-ui-list/force-ui-list.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
<link rel="import" href="../../salesforce/s1-elements/scaffold/s1AppScaffold.html">
<link rel="import" href="../../salesforce/s1-elements/scaffold/s1PageContainer.html">
<link rel="import" href="../../salesforce/s1-elements/s1StagedNavigationStageLeft.html">
<link rel="import" href="../../salesforce/s1-elements/s1StagedNavigationNotifications.html">
<link rel="import" href="../../salesforce/s1-elements/s1AnchorLightDefault.html">
<link rel="import" href="../../salesforce/s1-elements/s1ListWithLabels.html">
<link rel="import" href="../../salesforce/s1-elements/s1AnchorDark.html">
<link rel="import" href="../../salesforce/s1-elements/s1IndicatorDotsLightBackground.html">
<link rel="import" href="../../salesforce/s1-elements/s1ButtonGroups.html">
<link rel="import" href="../../salesforce/s1-elements/scaffold/s1DetailView.html">