This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Fiddler; | |
using System.IO; | |
using System.Diagnostics; | |
using Newtonsoft.Json; | |
using MockHttpServer.Data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.microsoft.windowsazure.messaging.*; | |
import com.microsoft.windowsazure.notifications.*; | |
//full source at https://github.com/sedouard/AMSCrossPlatPush/blob/master/GoogleAndriod/CrossPlatformPush/src/com/example/crossplatformpush/MainActivity.java | |
public class MainActivity extends ActionBarActivity { | |
private final String PROJECT_NUMBER = "<YOUR PROJECT NUMBER FROM GOOGLE PLAY>"; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.crossplatformpush; | |
import android.content.Context; | |
import com.microsoft.windowsazure.notifications.NotificationsHandler; | |
import com.microsoft.windowsazure.messaging.*; | |
public class Handler extends NotificationsHandler { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var azure = require('azure'); | |
//call POST https://<service-name>.azure-mobile.net/api/<endpoint name> with the tag you want in the query parameter | |
exports.post = function(request, response) { | |
var hub = azure.createNotificationHubService("crossplatpushdemohub", "Endpoint=sb://crossplatpushdemohub-ns.servicebus.windows.net/;SharedAccessKeyName=DefaultFullSharedAccessSignature;SharedAccessKey=AGeyP6352Hg585VK88XkjrXwKy37st/dp4xVGrpdyO4="); | |
var sendMessage = function(tag, message){ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows.Security.Authentication.Web.WebAuthenticationBroker | |
.authenticateAsync(Windows.Security.Authentication.Web.WebAuthenticationOptions.default, startURI, endURI) | |
.then(function(result){ | |
console.log('handle your provider specific token inside ' + result.responseData); | |
}, function(error){ | |
console.error(error); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try{ | |
//Windows 8/8.1 | |
Windows.Security.Authentication.Web.WebAuthenticationBroker | |
.authenticateAsync(Windows.Security.Authentication.Web.WebAuthenticationOptions.default, startURI, endURI) | |
.then(function(result){ | |
console.log('handle your provider specific token inside ' + result.responseData); | |
}, function(error){ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.addEventListener("activated", function (args) { | |
if (args.detail.kind == activation.ActivationKind.webAuthenticationBrokerContinuation) { | |
//take oauth response and continue login process | |
mobileSerivce.login(args.detail.webAuthenticationResult); | |
} | |
//Handle normal activiation...(hidden) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
import time | |
import hmac | |
import hashlib | |
import base64 | |
def _sign_string(uri, key, key_name): | |
''' | |
100000 = milsecond expiry | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:trusty | |
MAINTAINER Steven Edouard <steven.edouard1@gmail.com> | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update -y | |
RUN apt-get -qq update -y | |
RUN apt-get install -y nodejs npm -y | |
#install any specific things you need on this ubuntu box |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import DS from 'ember-data'; | |
import serializer from '../serializers/azure-storage'; | |
import accountUtils from '../utilities/account'; | |
export default DS.Adapter.extend({ | |
serializer: serializer.create(), | |
nodeServices: Ember.inject.service(), | |
find: function (store, type, snapshot) { | |
var blobService = this.get('azureStorage').createBlobService(store.account_name, store.account_key); | |
return new Ember.RSVP.Promise(function (resolve, reject) { | |
blobService.getBlobProperties(snapshot.get('container').name, snapshot.get('name'), function (error, result) { |
OlderNewer