This file contains hidden or 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
| <?php | |
| /** | |
| * Created by PhpStorm. | |
| * User: tconte | |
| * Date: 08/03/2016 | |
| * Time: 17:44 | |
| */ | |
| namespace tconte\AzureIoTHub; |
This file contains hidden or 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
| #!/usr/bin/python | |
| # Send messages to an Azure IoT Hub using the Apache Qpid Proton AMQP library. | |
| import urllib | |
| from proton import * | |
| # IoT Hub address & credentials | |
| # The Device ID |
This file contains hidden or 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 http = require('http'); | |
| var https = require('https'); | |
| var crypto = require('crypto'); | |
| // Event Hubs parameters | |
| var namespace = 'demohub'; | |
| var hubname ='hub1'; | |
| var devicename = 'device-01'; | |
| // Shared access key (from Event Hub configuration) |
This file contains hidden or 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
| #!/usr/bin/python | |
| # Receive messages from an Azure Event Hub using the Apache Qpid Proton AMQP library. | |
| import sys | |
| from async import * | |
| # Event Hub address & credentials | |
| # amqps://<keyname>:<key>@<namespace>.servicebus.windows.net/<eventhubname>/ConsumerGroup/<consumergroup>/Partitions/<partition> | |
| # You can find <keyname> and <key> in your Service Bus connection information |
This file contains hidden or 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
| #!/usr/bin/python | |
| # Receive messages from an Azure Event Hub using the Apache Qpid Proton AMQP library. | |
| import sys | |
| import commands | |
| import re | |
| import uuid | |
| import serial | |
| from proton import * |
This file contains hidden or 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
| #!/usr/bin/python | |
| # Send messages to an Azure Event Hub using the Apache Qpid Proton AMQP library. | |
| import sys | |
| import commands | |
| from proton import * | |
| # Event Hub address & credentials | |
| # amqps://<keyname>:<key>@<namespace>.servicebus.windows.net/<eventhubname> |
This file contains hidden or 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
| #!/usr/bin/python | |
| import sys | |
| import commands | |
| import re | |
| import uuid | |
| import serial | |
| from proton import * | |
| # Device ID |
This file contains hidden or 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 tessel = require('tessel'); | |
| var https = require('https'); | |
| // Upload parameters | |
| var blob_host = 'tconeu.blob.core.windows.net'; | |
| var blob_container = 'tessel-uploads'; | |
| // Use any tool to generate a Shared Access Key e.g. Azure Management Studio | |
| var blob_sas = '?sr=c&sv=2014-02-14&si=tessel&sig=xxxxRv%2xxxxUTd8xxxxMKc0xxxxi%2Fxxxxw6VsxxxxGjdJxxxx'; |
This file contains hidden or 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 fs = require('fs'); | |
| var https = require('https'); | |
| var blob_host = 'tconeu.blob.core.windows.net'; | |
| var blob_container = 'tessel-uploads'; | |
| // Use any tool to generate a Shared Access Key e.g. Azure Management Studio | |
| var blob_sas = '?sr=c&sv=2014-02-14&si=tessel&sig=xxxxRv%2xxxxUTd8xxxxMKc0xxxxi%2Fxxxxw6VsxxxxGjdJxxxx'; | |
| var blob_name = 'test.jpg'; |